diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-11-15 09:00:22 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-11-15 09:00:22 +0000 |
commit | 9c529238b8ec6cc410d4d20c568eab86527298ac (patch) | |
tree | e077f9e039e65b79376ac05893d124c7edaf9a32 | |
parent | a684fdcbe80bbbc934a7b702f1e34e09e951d6de (diff) | |
download | portage-9c529238b8ec6cc410d4d20c568eab86527298ac.tar.gz portage-9c529238b8ec6cc410d4d20c568eab86527298ac.tar.bz2 portage-9c529238b8ec6cc410d4d20c568eab86527298ac.zip |
Don't try to lock the vdb unless privileges are sufficient.
svn path=/main/trunk/; revision=5053
-rwxr-xr-x | bin/emerge | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index d51c9c609..41ad34e76 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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: |