svn path=/main/branches/2.1.2/; revision=5829
# Distributed under the terms of the GNU General Public License v2
# $Id$
-import os,sys
+import os, sys, errno
def usage(status):
print "Usage: env-update [--no-ldconfig]"
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 == errno.EACCES:
+ print "env-update: Need superuser access"
+ sys.exit(1)
+ else:
+ raise