[Rpm-maint] semantics of %posttrans?
Panu Matilainen
pmatilai at redhat.com
Thu Jun 28 14:01:26 UTC 2007
On Wed, 27 Jun 2007, Bill Nottingham wrote:
> Panu Matilainen (pmatilai at redhat.com) said:
>>>> 2) If so, does it imply the need for a (ugh) %postuntrans?
>>>
>>> Makes no sense, unless in the context of a "rollback" (an untrans, by
>>> some definition...)
>>
>> Well, a package might want to know whether it's being removed or
>> installed/upgraded in a transaction. So the %postuntrans does kinda
>> make sense when you think of it as "the transaction where this package got
>> removed." The terminology is confusing though, "pre/posttrans" makes you
>> immediately think of "before and after a transaction starts and stops" and
>> pre/postuntrans sounds, indeed, like some reverse transaction.
>
> So, my context is in the fixing of the 'excessive ldconfig' issue -
> instead of the hammer posted earlier, you could just fix the packaging,
> and replace all the %post/%postun with %posttrans. But if you want it
> to run on a just-removal transaction, you either need %posttrans to
> run for both, or %postuntrans.
Nod. But %postuntrans isn't workable at the moment due to reasons
explained in my earlier mail.
Yum and apt support pluggin in arbitrary scripts into (among other places)
before and right after transaction completes. Something like that on rpm
level, not tied to any single package but system level, would be an easy
way out for the purposes of just ensuring ldconfig gets called.
Or just add an unconditional ldconfig call at end of all non-zero
transactions, I doubt anybody would actually notice.
- Panu -
More information about the Rpm-maint
mailing list