Bug 1247140

Summary: Build failure due to bogus complaints about "Trigger fired by the same package is already defined in spec file"
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jzeleny, lkardos, novyjindrich, packaging-team-maint, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-27 13:31:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mattias Ellert 2015-07-27 12:26:46 UTC
Description of problem:

If a package has more than one %triggerun on the same package but with different versions the build fails with the error

Trigger fired by the same package is already defined in spec file

E.g. the openssh-server package in the openssh specfile has two %triggerun as follows:

$ grep triggerun openssh.spec 
%triggerun -n openssh-server -- openssh-server < 5.8p2-12
%triggerun -n openssh-server -- openssh-server < 5.9p1-22

A scratch build of this package in Fedora Rawhide is here:

https://koji.fedoraproject.org/koji/taskinfo?taskID=10492777

The buildlog from the buildSRPMFromSCM task of this build:

https://kojipkgs.fedoraproject.org//work/tasks/2778/10492778/build.log

says: "Trigger fired by the same package is already defined in spec file"

In the rpm git history the commit message for the following commit:

https://github.com/rpm-software-management/rpm/commit/77146f94b598079a24ab779f71e6c2ebf151cd24

reads: "Allow multiple triggers fired by the some package of different versions"

(I assume there is a typo here s/some/same/)

So there seems to have been an attept to fix this problem, but it doesn't seem to have worked since it still trips on this check and fails.


Version-Release number of selected component (if applicable):

rpm-build-4.12.90-1.fc24

How reproducible:

Always

Steps to Reproduce:
1. See above

Actual results:

Failed build

Expected results:

Successful build

Comment 1 Ľuboš Kardoš 2015-07-27 13:31:40 UTC
The problem is that given version intervals overlap, so in some cases both version conditions are fulfilled (e.g for openssh-server-5.6p1-30) but rpm always sets off only one trigger that's why build of that package is refused. Previously rpm didn't refuse to build packages with overlapping version intervals but rpm always set off only one trigger. So probably triggers in your package didn't work as you expected also in previous version of rpm. 

This is expected behavior, closing as not a bug.

Comment 2 Ľuboš Kardoš 2015-07-27 13:34:23 UTC
See also: #585384 and #702378