[Rpm-maint] RPMTAG_TRIGGERUN (, others?) not available in rpm.tagnames

Panu Matilainen pmatilai at laiskiainen.org
Mon Jun 7 07:43:41 UTC 2010


On Sun, 6 Jun 2010, Ville Skyttä wrote:

> Hello,
>
> It seems that RPMTAG_TRIGGERUN (maybe others too?) is not available in
> rpm.tagnames or rpm.RPMTAG_TRIGGERUN in Python.  Is this on purpose?

Sort of yes and no. How's that for a useless answer? :)

> I believe this causes yum to output messages like "Non-fatal <unknown>
> scriptlet failure in rpm package foo" (the "<unknown>" part) for failing
> triggerun scripts.

Indeed, and a known (to me at least) issue.

The long story is that the various RPMTAG_TRIGGERUN/IN etc trigger tags 
are only "internal pseudotags" in that they never exist in actual headers, 
whereas the tags for non-trigger scripts such as RPMTAG_POST/POSTUN are 
"real" tags presenting the actual script. The internal tags got exposed 
due to my oversight (not realizing the trigger tags were internal) 
when introducing RPMCALLBACK_SCRIPT_ERROR callback, which uses the partly 
internal tag numbers to tell the callback which of the scripts failed.

I've been pondering what to do about it:

Just exporting them would be the easy way out but it seems wrong as they 
don't really exist. One possibility might be turning them into tag 
extensions to retrieve the script contents similarly to RPMTAG_POST etc, 
but dunno if its worth the trouble.

Another, saner option overall would be adding an separate enumeration for 
rpm's scriptlet types, exporting them to python too and having 
RPMCALLBACK_SCRIPT_ERROR pass them instead of tag numbers to indicate 
which script had issues. But that would be an API change :-/

 	- Panu -



More information about the Rpm-maint mailing list