summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-28 14:44:42 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-28 14:44:42 -0700
commit317f698a3c0f67cb124d2d535f81b806f549c050 (patch)
treefb163a78ea0dd0de49dcce7d45eb0f0e809c6fb3
parent3b05d2eb59106413a923bbee0bfff5429548f722 (diff)
downloadportage-317f698a3c0f67cb124d2d535f81b806f549c050.tar.gz
portage-317f698a3c0f67cb124d2d535f81b806f549c050.tar.bz2
portage-317f698a3c0f67cb124d2d535f81b806f549c050.zip
When evaluating USE conditional metadata for /var/db/pkg inside
_post_src_install_uid_fix(), ensure non-empty entries are removed if the evaluation results in an empty value.
-rw-r--r--pym/portage/package/ebuild/doebuild.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 71b55be29..e26509a05 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -1472,6 +1472,17 @@ def _post_src_install_uid_fix(mysettings, out):
v = use_reduce(v, uselist=use, token_class=token_class)
v = paren_enclose(v)
if not v:
+ filename = os.path.join(build_info_dir, k)
+ try:
+ st = os.stat(filename)
+ except OSError:
+ pass
+ else:
+ if st.st_size != 0:
+ try:
+ os.unlink(filename)
+ except OSError:
+ pass
continue
codecs.open(_unicode_encode(os.path.join(build_info_dir,
k), encoding=_encodings['fs'], errors='strict'),