Re: Scriptlet Failure When Upgrading (F23)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2015-10-02 at 16:44 -0600, P.  Gueckel wrote:
> I read somewhere that, when a scriptlet fails during 
> upgrade, one need only turn off selinux, run the 
> upgrade, and then turn selinux back on.

That's basically woo - someone once hit a scriptlet fail that happened
to be SELinux related, and has thus concluded that *all* scriptlet
fails *ever* must be SELinux related. This is, of course, not true.
scriptlets are generic; practically speaking they can do absolutely
anything. It thus follows that they can fail in more or less any way.
Sometimes they can fail because of some SELinux problem, sure. They can
also fail for just about any other reason.

> Fine, but I won't know in advance that a scriptlet is 
> going to fail and I'm not disabling selinux every time 
> I upgrade some packages, just in case there are some 
> pesky failing scriptlets, so...
> 
> 1. Do I even need to worry about those scriptlets that 
> failed? Will something not be ungraded correctly and, 
> hence, not work or not be configured as intended?

Potentially, yes. scriptlets are there to *do* something, they're not
just decoration. If they fail then something which needed to happen may
not have happened.

> 2. Since the package already got upgraded, but the 
> scriptlets didn't, can I repeat the upgrade of the 
> package in question? How?

Not...easily.

This is one of the icky-ish little secret corners of RPM packaging.
scriptlets are often conditional: they do something when you're
upgrading the package but not when you're installing it fresh, or vice
versa, or when you're removing it but not upgrading it, etc etc. Thus
it's not really possible to have a magic button which just says Run The
Scriptlets For Package X, because which scriptlets were run and what
they actually do depends heavily on what you were *doing* to Package X.

There's also this fun: when you upgrade from foo-1.0-1 to foo-2.0-1,
some scriptlets that are *part of foo-1.0-1 specifically* get run - but
once the process is complete, those precise scriptlets no longer exist
anywhere on your system, so you *can't* re-run them. You now have the
scriptlets from foo-2.0-1 - but the %postun of foo-2.0-1 (which will
get run when it's removed or updated) may not be the same as the
%postun of foo-1.0-1 (which got run when you updated from foo-1.0-1 to
foo-2.0-1).

Yeah, it's a little tricky :/

In practice, the best thing to do about scriptlet fails is to file a
bug any time you see one, and try to figure out what specifically the
scriptlet that failed *was*, and what it was meant to do. If it
actually needed to do something in your particular context, re-do that
thing manually.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe:
https://admin.fedoraproject.org/mailman/listinfo/test




[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux