Discussion:
%triggerpostun fires all the time
Kai
2007-09-18 05:58:13 UTC
Permalink
Hi,

I've create an rpm package named mypackage-3.0-1.i386.rpm that contains a
triggerpostun section like this:

%triggerpostun -- mypackage < 2.0-1
echo Running trigger for %{version}-${release}

I expect the trigger to only run when upgrading a version of mypackage less
than 2.0-1. However, it appears the trigger is run no matter what version
is being upgraded.

Can someone explain me the syntax and semantics of the triggerpostun
directive?

Thanks,
-Kai
Jeff Johnson
2007-09-18 13:19:05 UTC
Permalink
Post by Kai
Hi,
I've create an rpm package named mypackage-3.0-1.i386.rpm that
%triggerpostun -- mypackage < 2.0-1
echo Running trigger for %{version}-${release}
I expect the trigger to only run when upgrading a version of
mypackage less than 2.0-1. However, it appears the trigger is run
no matter what version is being upgraded.
Can someone explain me the syntax and semantics of the triggerpostun
directive?
See /usr/share/doc/rpm-X.Y/triggers for syntax.

Note that %triggerpostun has always had an odd semantic that was
changed in 4.4.8
to agree with what was written in the scriptlet execution order at the
end of the triggers note.

Basically there has never been a usage case for %triggerpostun, the
same goal can be achieved in other ways.

See details in bugzilla #210626.

73 de Jeff
Kai
2007-09-18 17:57:40 UTC
Permalink
Thanks Jeff,

Maybe it'll be easier if I explain what I'm trying to accomplish. I want to
be able to run some migration code when upgrading the 'mypackage' from
version 1.x to 2.0. I thought the way to do this was by using the
%triggerpostun trigger (based on example of sendmail spec file). Is there
another hook I can use to run a scriptlet that only gets triggered for a
particular version upgrade? Is there a way to query the version/release of
the package that's being uninstalled during an upgrade?

Btw, is there a 4.4.8 rpm package available for RHEL4? The latest one on
the errata page is 4.3.3-22.

Thanks,
-Kai
Post by Jeff Johnson
Post by Kai
Hi,
I've create an rpm package named mypackage-3.0-1.i386.rpm that
%triggerpostun -- mypackage < 2.0-1
echo Running trigger for %{version}-${release}
I expect the trigger to only run when upgrading a version of
mypackage less than 2.0-1. However, it appears the trigger is run
no matter what version is being upgraded.
Can someone explain me the syntax and semantics of the triggerpostun
directive?
See /usr/share/doc/rpm-X.Y/triggers for syntax.
Note that %triggerpostun has always had an odd semantic that was
changed in 4.4.8
to agree with what was written in the scriptlet execution order at the
end of the triggers note.
Basically there has never been a usage case for %triggerpostun, the
same goal can be achieved in other ways.
See details in bugzilla #210626.
73 de Jeff
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Loading...