From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r10658 - main/trunk/pym/_emerge
Date: Mon, 16 Jun 2008 08:10:50 +0000 [thread overview]
Message-ID: <E1K89ne-0003Ux-JR@stork.gentoo.org> (raw)
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
reply other threads:[~2008-06-16 8:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1K89ne-0003Ux-JR@stork.gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox