On Thursday 12 August 2004 03:11 pm, johannes.grumboeck@xxxxxxxxxxxxx wrote: > Hi, > > is there any documentation available about triggers and the exact > spec-syntax? > > TIA regards, > Johannes > > rpm-list-bounces@xxxxxxxxxx schrieb am 12.08.2004 11:49:29: > > Why wouldn't triggers work? I use them to perform all sorts of > > functions. If a > > rpm is uninstalled, then the patch's trigger section can perform rpm -e > > packagename-patch > > > > %triggerun -- packagename > > rpm -e packagename-patch > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/rpm-list The syntax is easy. %triggerin %triggerun %triggerprein %triggerpreun example: When I pivot root during a specific phase of system development, I need to change the path that gcc looks to find the libraries. This is done to a file that gcc owns and installs, but it needs to happen when glibc is installed. The %trigger line is just what the trigger is, everything that follows is simply a shell scriptlet. This trigger insures the change is made at the right time. %triggerin -- glibc PATH=/bin:/sbin:/usr/bin:/usr/sbin:/tools/bin:/tools/sbin if [ "$(rpm -qa --last --dbpath /tools/var/lib/rpm | head -n 1 | cut -d' ' -f 1)" != "%{name}-%{version}-%{release}" ]; then SPECFILE=/tools/lib/gcc-lib/*/*/specs sed -e 's@/lib/ld.so.1@/tools/lib/ld.so.1@g' \ -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \ $SPECFILE > tempspecfile mv tempspecfile $SPECFILE unset SPECFILE rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h} fi -- Scot Mc Pherson scot@xxxxxxxxxxxxxxxxxxxx Sarasota, Florida, USA MSN: behomet@xxxxxxxxxxxxx AIM: scotlfs ICQ: 342349 _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list