Catch EACCESS when running env-update, orignal patch by <phajdan.jr@gmail.com> (bug...
authorMarius Mauch <genone@gentoo.org>
Sun, 28 Jan 2007 10:31:41 +0000 (10:31 -0000)
committerMarius Mauch <genone@gentoo.org>
Sun, 28 Jan 2007 10:31:41 +0000 (10:31 -0000)
svn path=/main/trunk/; revision=5803

bin/env-update

index b245b39905d8f5438d19ae0e08b8da7c868e57b3..b919a12673c03f74fc502fc17508bc175a0a3381 100755 (executable)
@@ -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