On Sep 10, 2012, at 1:48 AM, Jan Rękorajski wrote: > On Sun, 09 Sep 2012, Jeffrey Johnson wrote: > >> >> On Sep 9, 2012, at 3:57 PM, Jan Rękorajski <bagg...@sith.mimuw.edu.pl> wrote: >> >>> >>> Looks it's not a ldconfig optimization that's the problem, just that >>> scriplets with only '-p /sbin/ldconfig' interpreter and empty body are >>> not run. >>> Function runInstScript() in lib/psm.c exits on 'headerGet(fi->, She, 0)' in >>> such cases. >> >> Yes busted with %post -p /sbin/ldconfig (though the >> cause may be not adding the script tag when empty >> during build, entirely different root cause: will look). >> >>> I don't want to blindly poke in the code, so the question - would it be >>> okay if that function bailed out only if headerGet failed on both >>> psm->progTag and psm->scriptTag, instead of any of them? >>> >> >> The code looks scarier than it actually is, largely because >> of endless diddle-ups. >> >> When return code fails on non-existent script, malloc an empty string. >> >> So (untested) >> if (!headerGet(fi->h, She, 0)) >> She->p.str = xstrdup(""); >> >> See if that fixes %post -p /sbin/ldconfig for you. > > Close, but no cigar: > > /sbin/ldconfig: relative path `2' used to build cache > error: %post(libevent-2.0.14-2.x86_64) scriptlet failed, exit status 1 >
These are $1 $2 arguments passed to /sbin/ldconfig by RPM, another sick hack (in glibc) to permit %post -p /sbin/ldconfig > Putting empty script there must be doing harm because merging the > conditions like this: > > if (!headerGet(fi->h, She, 0) && !headerGet(fi->h, Phe, 0)) > goto exit; > > fixes my problem nicely. > As you've seen, not quite. There are likely other values than She->p.str that should be initialized that are changing logic flow. It would be nice to get a real fix, not just ignoring an error return, in place. Something else is occurring ... 73 de Jeff ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org