Hello I asked a similar thing to Fedora mailing list. Anyway, I have the same question for my package into openSUSE. I must update the theme depending of Pango version. So I added %trigger sections (in addition of %prep section). Package submitted: https://build.opensuse.org/package/show/X11:common:Factory/human-theme-gtk With 15.4 and 15.5, the following error occurs: error: line 97: Trigger fired by the same package is already defined in spec file: %triggerin -- pango < 1.44 To fix the problem, I have an idea! (copy pasted from my debian/ubuntu package in PPA). But not sure if this is acceptable for my spec file. Updated spec: https://build.opensuse.org/package/show/home:luigifab:branches:X11:common:Fa... Only one %trigger section (and sed commands removed from %prep section) But usage of rpm command. Can I do that? If I'm not wrong, the trigger is executed: - when my package is installed or updated - when pango is updated Thanks!
On 09.06.2023 20:39, Fabrice wrote:
Hello
I asked a similar thing to Fedora mailing list. Anyway, I have the same question for my package into openSUSE.
I must update the theme depending of Pango version. So I added %trigger sections (in addition of %prep section).
Package submitted: https://build.opensuse.org/package/show/X11:common:Factory/human-theme-gtk With 15.4 and 15.5, the following error occurs: error: line 97: Trigger fired by the same package is already defined in spec file: %triggerin -- pango < 1.44
AFAICT this is a bug in rpm - it prints the wrong line. The actual error should be caused by %triggerin -- pango >= 1.50 followed by %triggerin -- pango >= 1.44 because versions overlap. rpmbuild consumes trigger script content and only then prints error message with the current line that points at the next %triggerin. Try %triggerin -- pango >= 1.50 and %triggerin -- (pango >= 1.44 and pango < 1.50) Actually, it should probably be (pango >= 1.44 with pango < 1.50).
To fix the problem, I have an idea! (copy pasted from my debian/ubuntu package in PPA). But not sure if this is acceptable for my spec file.
Updated spec: https://build.opensuse.org/package/show/home:luigifab:branches:X11:common:Fa...
Only one %trigger section (and sed commands removed from %prep section) But usage of rpm command.
Can I do that?
If I'm not wrong, the trigger is executed: - when my package is installed or updated - when pango is updated
Thanks!
Sadly no with 15.4 and 15.5: `Trigger fired by the same package is already defined in spec file: %triggerin -- pango < 1.44 or pango >= 1.50` With only: %triggerin -- pango >= 1.44 and pango < 1.50 ... %triggerin -- pango < 1.44 or pango >= 1.50 -or- %triggerin -- pango < 1.44, pango >= 1.50 ... With ( ) I get (depending on openSUSE series): - [ 37s] error: line 83: No rich dependencies allowed for this type: %triggerin -- (pango < 1.44 or pango >= 1.50) - [ 24s] error: line 83: Dependency tokens must begin with alpha-numeric, '_' or '/': %triggerin -- (pango < 1.44 or pango >= 1.50)
participants (2)
-
Andrei Borzenkov
-
Fabrice