From: Zac Medico Date: Sat, 28 Aug 2010 21:44:42 +0000 (-0700) Subject: When evaluating USE conditional metadata for /var/db/pkg inside X-Git-Tag: v2.2_rc72~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=317f698a3c0f67cb124d2d535f81b806f549c050;p=portage.git 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. --- 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'),