Don't try to lock the vdb unless privileges are sufficient.
authorZac Medico <zmedico@gentoo.org>
Wed, 15 Nov 2006 09:00:22 +0000 (09:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 15 Nov 2006 09:00:22 +0000 (09:00 -0000)
svn path=/main/trunk/; revision=5053

bin/emerge

index d51c9c609177403ce5a6d8c7288f3ba38b9adb34..41ad34e762e6cef87be605925e1b3e048405dc6d 100755 (executable)
@@ -2705,10 +2705,11 @@ def unmerge(settings, myopts, vartree, unmerge_action, unmerge_files,
        global_unmerge=0
        xterm_titles = "notitles" not in settings.features
 
+       vdb_path = os.path.join(settings["ROOT"], portage.VDB_PATH)
        vdb_lock = None
        try:
-               vdb_lock = portage_locks.lockdir(
-                       os.path.join(settings["ROOT"], portage.VDB_PATH))
+               if os.access(vdb_path, os.W_OK):
+                       vdb_lock = portage_locks.lockdir(vdb_path)
                realsyslist = getlist(settings, "system")
                syslist = []
                for x in realsyslist: