Macro python38_version_nodots on Leap 15.2
Hello, I am trying to build some linked python packages in my project at [1]. Since a while some packages like gaupol [2] and protobuf are not building there anymore. Build fails with the following message on Leap 15.2:
error: syntax error in expression error: /home/abuild/rpmbuild/SOURCES/gaupol.spec:50: bad %if condition
Looking into the spec file for gaupol shows that there is the following if condition:
%if 0%{?python38_version_nodots}
Running rpm -E 0%{?python38_version_nodots} in the build environment for Leap 15.2 gives the following output:
0!!_%1_not_installed_!!
Trying it on my local Tumbleweed gives the expected 038. Current python-rpm-macros is linked to my project. The linked packages are building fine in the project where they are linked from. But I can not find the issue/reason why they are not building in my project. Can anyone help? Best regards Matthias Fehring [1] https://build.opensuse.org/project/show/home:buschmann23:weblate [2] https://build.opensuse.org/package/show/home:buschmann23:weblate/gaupol -- Das Gesetz hat zum Schneckengang verdorben, was Adlerflug geworden wäre. (Friedrich Schiller - Die Räuber) Und der Buschfunk spielt gerade „Merkel-Jugend“ von „Pascow“. www.buschmann23.de GPG-Key: 0x614C3258 GPG Fingerprint: B770 E0D0 69CF BFC1 5FE1 D78E 3A70 A936 614C 3258
Hi, Am 25.03.21 um 14:41 schrieb Matthias Fehring:
Looking into the spec file for gaupol shows that there is the following if condition:
%if 0%{?python38_version_nodots} Running rpm -E 0%{?python38_version_nodots} in the build environment for Leap 15.2 gives the following output:
0!!_%1_not_installed_!!
This happens because the gaupol specfile assumes that %python38_version_nodots is not defined for Leap at all. But your project builds a new python-rpm-macros which produces macros for that flavor, even if packages for the flavor are not present in Leap. multimedia:apps does not have a newer python-rpm-macros. Thus it is fine there.
Trying it on my local Tumbleweed gives the expected 038.
Because Tumbleweed has the python38 flavor.
Current python-rpm-macros is linked to my project. The linked packages are building fine in the project where they are linked from. But I can not find the issue/reason why they are not building in my project.
Do you need python-rpm-macros on your project instead of inheriting it?
Can anyone help?
A fix for the gaupol.spec or in python-rpm-macros directly would probably be the right thing.
Best regards Matthias Fehring
[1] https://build.opensuse.org/project/show/home:buschmann23:weblate [2] https://build.opensuse.org/package/show/home:buschmann23:weblate/gaupol
Cheers, Ben
Am 25.03.21 um 15:39 schrieb Ben Greiner:
A fix for the gaupol.spec or in python-rpm-macros directly would probably be the right thing.
https://build.opensuse.org/request/show/881349 https://github.com/openSUSE/python-rpm-macros/issues/107 Cheers, Ben
Am 25.03.21 um 15:39 schrieb Ben Greiner:
A fix for the gaupol.spec or in python-rpm-macros directly would probably be the right thing.
https://build.opensuse.org/request/show/881349 https://github.com/openSUSE/python-rpm-macros/issues/107 Cheers, Ben
Am Donnerstag, 25. März 2021, 18:02:20 CET schrieb Ben Greiner:
Am 25.03.21 um 15:39 schrieb Ben Greiner:
A fix for the gaupol.spec or in python-rpm-macros directly would probably be the right thing.
https://build.opensuse.org/request/show/881349 https://github.com/openSUSE/python-rpm-macros/issues/107
Cheers, Ben
Great, thanks a lot! Best regards Matthias -- Das Gesetz hat zum Schneckengang verdorben, was Adlerflug geworden wäre. (Friedrich Schiller - Die Räuber) Und der Buschfunk spielt gerade mal nichts... www.buschmann23.de GPG-Key: 0x614C3258 GPG Fingerprint: B770 E0D0 69CF BFC1 5FE1 D78E 3A70 A936 614C 3258
participants (3)
-
Ben Greiner
-
Matthias Fehring
-
packaging@lists.opensuse.org