Ticket #103 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Improve duplicate %trigger* handling in specfiles


Reported by: scop Assigned to: pmatilai Priority: minor Milestone:
Component: rpm Version: RPM Development Keywords: Cc:


Description

When a specfile contains more than one %post or one of the other "usual" scriptlets, rpmbuild refuses to build it and outputs an error message. However, this doesn't happen with duplicate %triggerin/%triggerun/%triggerpostun. The package builds fine but it seems that later duplicate definitions are simply silently discarded.

I think either the duplicates should error out builds like with duplicate %post and friends, or alternatively all of them should be kept and executed when appropriate.

For example:

%triggerin -- foo
echo footrigger1

%triggerin -- foo
echo footrigger2

If not failing the build, I think this should result in both triggers being run when the trigger for foo fires. As of rpm 4.7.1 the latter trigger seems to be discarded.

Change History

10/18/09 21:01:31 changed by pmatilai

Indeed, rpm 4.6.0 - 4.7.1 incorrectly discards triggers with identical conditions. Fixed already in HEAD, just pending maintenance updates to both 4.6.x and 4.7.x.

11/26/09 07:58:32 changed by pmatilai

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in the just-released rpm 4.7.2 too now.