Bug 702378 - triggers with satisfied conditions don't get run
Summary: triggers with satisfied conditions don't get run
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 699198 1287559
TreeView+ depends on / blocked
 
Reported: 2011-05-05 13:54 UTC by Tomas Heinrich
Modified: 2016-09-20 04:52 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1287559 (view as bug list)
Environment:
Last Closed: 2015-03-20 13:28:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1204183 0 unspecified CLOSED Warn about multiple %triggers with intersecting conditions 2021-02-22 00:41:40 UTC

Internal Links: 1204183

Description Tomas Heinrich 2011-05-05 13:54:16 UTC
Description of problem:
From a collection of triggers of a same type (triggerun) that should
be set off, only one gets run.

Version-Release number of selected component (if applicable):
rpm-4.9.0-7.fc16.x86_64
rpm-build-4.9.0-7.fc16.x86_64.rpm

How reproducible:
always

Steps to Reproduce:
Reproduced on F16, upgrading from one version of a package to a higher
version, both with simple spec files:

=== trgtst-1.1 spec ===
Name:           trgtst
Version:        1.1
<...>

=== trgtst-1.5 spec ===
Name:           trgtst
Version:        1.5
<...>
%triggerun -- trgtst < 1.2
echo "foo1"
%triggerun -- trgtst < 1.3
echo "foo2"
%triggerun -- trgtst < 1.4
echo "foo3"
%triggerun -- trgtst < 1.5
echo "foo4"
<...>

# rpm -i ~/rpmbuild/RPMS/x86_64/trgtst-1.1-1.fc16.x86_64.rpm
# rpm -U ~/rpmbuild/RPMS/x86_64/trgtst-1.5-1.fc16.x86_64.rpm
foo1

Actual results:
triggers with satisfied conditions don't get run.

Expected results:
All triggers that have met their conditions are executed.

Comment 1 Michal Schmidt 2011-05-06 21:56:57 UTC
This could be the cause of some services not being enabled after an upgrade from F14 to F15, such as bug 699198.

Comment 2 Panu Matilainen 2011-05-13 11:46:51 UTC
This is the intended and expected behavior (from rpm POV): only a single trigger is executed per each trigger target <-> source pair in a transaction.

Comment 3 Michal Schmidt 2011-05-13 12:06:03 UTC
Panu,
could you please take a look at the three %triggerun scriptlets in rsyslog.spec?:

http://pkgs.fedoraproject.org/gitweb/?p=rsyslog.git;a=blob;f=rsyslog.spec;h=86ac99230748e4d8ead1b5933c3685ce12d06e0e;hb=refs/heads/master#l211

Can you suggest a working way to achieve what it's trying to do?

The package maintainers do not seem to be aware of this limitation of RPM triggers. See NetworkManager.spec for another example. I'm sure there are more.

Comment 4 Panu Matilainen 2011-05-13 12:14:57 UTC
Right, I'll have a look and comment on the rsyslog bug.

Oh and FWIW, of course it would be technically possible to change rpm behavior wrt triggers, but it would introduce a problematic backs-compatibility quirk that can't be (AFAICS) automatically tracked by rpm. And without tracking, it would cause packages to behave rather differently depending on which rpm version they happen to get installed with (eg Koji runs on an older rpm version than what F15 has etc)

Comment 5 Marcela Mašláňová 2011-10-17 11:59:46 UTC
Ok, I agree that change of behaviour would be problematic. But could you add something which will complain during build? I wasn't aware that I can't use more than one triggerun in specfile. Warning might be enough.

Comment 6 Michal Schmidt 2012-06-14 15:33:11 UTC
Is there any solution in sight for this bug?
Today yet another packager stepped into the multiple triggers trap:
http://lists.fedoraproject.org/pipermail/devel/2012-June/168608.html
It really is not obvious to packagers that multiple triggers on the same package do not work.

Comment 7 Fedora End Of Life 2012-08-07 20:02:11 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Tomas Heinrich 2012-11-21 13:24:42 UTC
Is there any progress on this?
A build-time check would be nice or at least a note in the documentation.

Comment 9 Fedora End Of Life 2013-04-03 19:39:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 10 Fedora End Of Life 2015-01-09 21:49:05 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Tomas Heinrich 2015-01-12 16:06:10 UTC
Can somebody, at least, add a short note to /usr/share/doc/rpm/triggers ?

Comment 12 Ľuboš Kardoš 2015-03-20 13:28:18 UTC
Fixed in upstream. Command rpmbuild now complain about multiple triggers triggered by the same package in one spec file.

Comment 13 Tomas Heinrich 2015-03-20 14:02:25 UTC
(In reply to Ľuboš Kardoš from comment #12)
> Fixed in upstream. Command rpmbuild now complain about multiple triggers
> triggered by the same package in one spec file.

Thanks.

I guess it wouldn't hurt if rpmlint also complained.
I'll open a new bug.


Note You need to log in before you can comment on or make changes to this bug.