What are trigger scriptlets and how they can be used during rpmbuild?

Solution Verified - Updated -

Issue

  • What are trigger scriptlets and how they can be used during rpmbuild?
  • There is some problem with trigger handling.
  • Let's analyze the example below: There is a sub package named test-test in the version 0.9-20
  • We have 2 triggers:
1)
%triggerin -n test-test -- test-test < 0.9-23
echo "triggerin TEST-TEST < 0.9-23"

2)
%triggerin -n test-test -- test-test < 0.9-22
echo "triggerin TEST-TEST < 0.9-22"
  • Scenario 1: Trigger 1 is before the trigger 2 in the test.spec file
rpm -Uvh test-test-0.9-23.rpm

Preparing...                ########################################### [100%]
   1:test-test              ########################################### [ 50%]
triggerin TEST-TEST < 0.9-23
  • Scenario 2: Trigger 2 is before the trigger 1 in the test.spec file
rpm -Uvh test-test-0.9-23.rpm

Preparing...                ########################################### [100%]
   1:test-test              ########################################### [ 50%]
triggerin TEST-TEST < 0.9-22
  • Why only one trigger is executed ?

Environment

  • Red Hat Enterprise Linux 6.5
  • rpmbuild

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content