* [gentoo-commits] portage r10658 - main/trunk/pym/_emerge
@ 2008-06-16 8:10 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-16 8:10 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-06-16 08:10:49 +0000 (Mon, 16 Jun 2008)
New Revision: 10658
Modified:
main/trunk/pym/_emerge/__init__.py
Log:
Add some write access checks in post_merge() in order to avoid triggering
permission related exceptions.
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-06-15 04:51:12 UTC (rev 10657)
+++ main/trunk/pym/_emerge/__init__.py 2008-06-16 08:10:49 UTC (rev 10658)
@@ -6766,7 +6766,8 @@
if inforoot=='':
continue
- if not os.path.isdir(inforoot):
+ if not os.path.isdir(inforoot) or \
+ not os.access(inforoot, os.W_OK):
continue
errmsg = ""
file_list = os.listdir(inforoot)
@@ -6929,13 +6930,16 @@
vdb_path = os.path.join(target_root, portage.VDB_PATH)
portage.util.ensure_dirs(vdb_path)
- vdb_lock = portage.locks.lockdir(vdb_path)
+ vdb_lock = None
+ if os.access(vdb_path, os.W_OK):
+ vdb_lock = portage.locks.lockdir(vdb_path)
try:
if "noinfo" not in settings.features:
chk_updated_info_files(target_root, infodirs, info_mtimes, retval)
mtimedb.commit()
finally:
- portage.locks.unlockdir(vdb_lock)
+ if vdb_lock:
+ portage.locks.unlockdir(vdb_lock)
chk_updated_cfg_files(target_root, config_protect)
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-16 8:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-16 8:10 [gentoo-commits] portage r10658 - main/trunk/pym/_emerge Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox