[opensuse-packaging] Why doesn't this macro work properly anymore?
Hey, I noticed that this suddenly stopped working: ngompa@opensuse-tumbleweed-x86_64:~> rpm -E ".suse.tw%(. /etc/os-release; echo $VERSION_ID)" .suse.tw Why doesn't the date part work anymore? It used to work a few months ago... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
28.04.2019 4:23, Neal Gompa пишет:
Hey,
I noticed that this suddenly stopped working:
ngompa@opensuse-tumbleweed-x86_64:~> rpm -E ".suse.tw%(. /etc/os-release; echo $VERSION_ID)" .suse.tw
Why doesn't the date part work anymore? It used to work a few months ago...
It never worked (in any Bourne-compatible shell). $VERSION_ID is expanded by shell before rpm can see it. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, Apr 28, 2019 at 1:14 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
28.04.2019 4:23, Neal Gompa пишет:
Hey,
I noticed that this suddenly stopped working:
ngompa@opensuse-tumbleweed-x86_64:~> rpm -E ".suse.tw%(. /etc/os-release; echo $VERSION_ID)" .suse.tw
Why doesn't the date part work anymore? It used to work a few months ago...
It never worked (in any Bourne-compatible shell). $VERSION_ID is expanded by shell before rpm can see it.
So that was the trick! It should be something like this? $ rpm -E '%(sh -c "./etc/os-release; echo \$VERSION_ID")' 20190423 Thanks! -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sunday 2019-04-28 15:33, Neal Gompa wrote:
On Sun, Apr 28, 2019 at 1:14 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
28.04.2019 4:23, Neal Gompa пишет:
Hey,
I noticed that this suddenly stopped working:
ngompa@opensuse-tumbleweed-x86_64:~> rpm -E ".suse.tw%(. /etc/os-release; echo $VERSION_ID)" .suse.tw
Why doesn't the date part work anymore? It used to work a few months ago...
It never worked (in any Bourne-compatible shell). $VERSION_ID is expanded by shell before rpm can see it.
So that was the trick! It should be something like this?
$ rpm -E '%(sh -c "./etc/os-release; echo \$VERSION_ID")' 20190423
That's not a trick, it's basic quoting science. rpm --eval '.suse.tw%(. /etc/os-release; echo $VERSION_ID)' .suse.tw20190425 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, Apr 28, 2019 at 9:40 AM Jan Engelhardt <jengelh@inai.de> wrote:
On Sunday 2019-04-28 15:33, Neal Gompa wrote:
On Sun, Apr 28, 2019 at 1:14 AM Andrei Borzenkov <arvidjaar@gmail.com> wrote:
28.04.2019 4:23, Neal Gompa пишет:
Hey,
I noticed that this suddenly stopped working:
ngompa@opensuse-tumbleweed-x86_64:~> rpm -E ".suse.tw%(. /etc/os-release; echo $VERSION_ID)" .suse.tw
Why doesn't the date part work anymore? It used to work a few months ago...
It never worked (in any Bourne-compatible shell). $VERSION_ID is expanded by shell before rpm can see it.
So that was the trick! It should be something like this?
$ rpm -E '%(sh -c "./etc/os-release; echo \$VERSION_ID")' 20190423
That's not a trick, it's basic quoting science.
rpm --eval '.suse.tw%(. /etc/os-release; echo $VERSION_ID)' .suse.tw20190425
See, to me, this is a "trick", because "quoting science" is a crazy art to me... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Jan Engelhardt
-
Neal Gompa