summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-28 10:31:41 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-28 10:31:41 +0000
commite55e6e7f456155a7484a265131c869454a04e9e0 (patch)
tree0242a555e0dff22030bf80365fe69d63ec8ba0ec
parentae7b7091f9292671aa4b77b8af5c51ad0d26b1c4 (diff)
downloadportage-e55e6e7f456155a7484a265131c869454a04e9e0.tar.gz
portage-e55e6e7f456155a7484a265131c869454a04e9e0.tar.bz2
portage-e55e6e7f456155a7484a265131c869454a04e9e0.zip
Catch EACCESS when running env-update, orignal patch by <phajdan.jr@gmail.com> (bug #106061)
svn path=/main/trunk/; revision=5803
-rwxr-xr-xbin/env-update9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/env-update b/bin/env-update
index b245b3990..b919a1267 100755
--- a/bin/env-update
+++ b/bin/env-update
@@ -28,4 +28,11 @@ try:
except ImportError:
sys.path.insert(0, "/usr/lib/portage/pym")
import portage
-portage.env_update(makelinks)
+try:
+ portage.env_update(makelinks)
+except IOError, e:
+ if e.errno == 13:
+ print "env-update: Need superuser access"
+ sys.exit(1)
+ else:
+ raise