Bug 1014511 - non-fatal devtoolset-2-runtime failure
Summary: non-fatal devtoolset-2-runtime failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: devtoolset-meta
Version: DTS 2.0 RHEL 6
Hardware: All
OS: Linux
low
low
Target Milestone: ---
: 2.4
Assignee: Marek Polacek
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 09:09 UTC by Miroslav Franc
Modified: 2016-02-01 02:28 UTC (History)
4 users (show)

Fixed In Version: devtoolset-2-2.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-11 06:34:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0278 0 normal SHIPPED_LIVE devtoolset-2 bug fix and enhancement update 2014-03-11 10:32:13 UTC

Description Miroslav Franc 2013-10-02 09:09:47 UTC
# rpm -e devtoolset-2-runtime
restorecon:  lstat(/opt/rh/devtoolset-2/root) failed:  No such file or directory
warning: %postun(devtoolset-2-runtime-2.0-19.el6.noarch) scriptlet failed, exit status 255


# rpm --scripts -q devtoolset-2-runtime
...
postuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
  /usr/sbin/semanage fcontext -d /opt/rh/devtoolset-2/root
  restorecon -R /opt/rh/devtoolset-2/root
fi


Happened during `yum remove devtooolset-2\*' as well.  It seems that on rhel6 /opt/rh/devtoolset-2/root belongs to devtoolset-2-runtime package and is removed before the postun scriptlet is run witch causes restorecon to end with 255 return code.

Comment 1 Marek Polacek 2013-10-02 09:20:10 UTC
Hopefully just adding '[ -d %{_scl_root} ] &&' will do; it does not make much sense to restore contexts on non-existing files.

Comment 2 Miroslav Franc 2013-10-02 10:29:54 UTC
(In reply to Marek Polacek from comment #1)
> Hopefully just adding '[ -d %{_scl_root} ] &&' will do; it does not make
> much sense to restore contexts on non-existing files.

Wouldn't adding '[ -d %{_scl_root} ] &&' just change the bad return code from 255 to 1?  if-then-fi would be better IMHO.

Comment 3 Marek Polacek 2013-10-02 10:57:50 UTC
You're right.  I meant '[ -d %{_scl_root} ] && ... || :'.

Comment 4 Marek Polacek 2013-10-03 09:53:44 UTC
I put the (untested) fix in, so hopefully fixed.

Comment 8 errata-xmlrpc 2014-03-11 06:34:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0278.html


Note You need to log in before you can comment on or make changes to this bug.