Bug 702378 - triggers with satisfied conditions don't get run
triggers with satisfied conditions don't get run
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: 1287559 699198
  Show dependency treegraph
 
Reported: 2011-05-05 09:54 EDT by Tomas Heinrich
Modified: 2015-12-02 05:51 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1287559 (view as bug list)
Environment:
Last Closed: 2015-03-20 09:28:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tomas Heinrich 2011-05-05 09:54:16 EDT
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 17:56:57 EDT
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 07:46:51 EDT
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 08:06:03 EDT
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 08:14:57 EDT
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 07:59:46 EDT
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 11:33:11 EDT
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 16:02:11 EDT
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 08:24:42 EST
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 15:39:06 EDT
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 16:49:05 EST
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 11:06:10 EST
Can somebody, at least, add a short note to /usr/share/doc/rpm/triggers ?
Comment 12 Ľuboš Kardoš 2015-03-20 09:28:18 EDT
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 10:02:25 EDT
(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.