Ticket #179 (new defect)

Opened 1 year ago

Last modified 1 year ago

Duplicate triggers should be detected

Reported by: pterjan Assigned to: RpmTickets
Priority: major Milestone:
Component: rpm Version: RPM Development
Keywords: Cc:

Description

Currently when there are more than one trigger with same condition, only first one is run but all scripts are stored.

This leads to a segfault of rpmq --triggers.

I will attach a spec to reproduce, and an untested patch against git head. I tested a backported version on 4.6.0 and it works fine.

Fixing the segfault for existing invalid rpms may be nice to.

Attachments

0001-Fail-when-several-triggers-are-set-on-a-condition.patch (1.2 kB) - added by pterjan on 08/19/10 11:24:25.
trig.spec (242 bytes) - added by pterjan on 08/19/10 11:25:43.
Sample spec to reproduce the problem

Change History

08/19/10 11:24:25 changed by pterjan

  • attachment 0001-Fail-when-several-triggers-are-set-on-a-condition.patch added.

08/19/10 11:25:43 changed by pterjan

  • attachment trig.spec added.

Sample spec to reproduce the problem

08/19/10 11:57:46 changed by pterjan

Just for information, I had tried to instead allow duplicates if they are triggers, this prevents the segfault and both get listed, but only first one is run so this is misleading for the user and I did not want to go deeper in the code to see how they are run.

08/20/10 13:50:39 changed by scop

08/20/10 13:56:57 changed by pterjan

I guess this can be closed as invalid then, I should have tested with more recent rpm first