From da8a8e009d5bb51cbc023e17cb414cb10bcaacd2 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 2 May 2009 09:30:11 +0000 Subject: [PATCH] Merged from trunk -r13575:13580 | 13578 | Fix logic error which prevents repos.conf [DEFAULT] section | | zmedico | from applying to repos that don't have their own section. | | | Thanks to Markos Chandras for reporting. | | 13580 | Only generate KV when setting up the environment for a real | | zmedico | ebuild phase. This should preven "Permission Denied: | | | /usr/src/linux/.config" errors reported by repoman users | | | (repoman may trigger the error when it calls the fetch | | | phase). | svn path=/main/branches/prefix/; revision=13594 --- pym/portage/__init__.py | 5 ++++- pym/portage/dbapi/porttree.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ae984daff..c8cecfcd7 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5436,7 +5436,10 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["PORTAGE_BUILDDIR"], ".exit_status") #set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent. - if mydo != "depend" and "KV" not in mysettings: + if mydo != 'depend' and 'KV' not in mysettings and \ + mydo in ('compile', 'config', 'configure', 'info', + 'install', 'nofetch', 'postinst', 'postrm', 'preinst', + 'prepare', 'prerm', 'setup', 'test', 'unpack'): mykv,err1=ExtractKernelVersion(os.path.join(myroot, EPREFIX_LSTRIP, "usr/src/linux")) if mykv: # Regular source tree diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 318d00c11..2fc55ccc9 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -227,7 +227,7 @@ class portdbapi(dbapi): if local_repo_configs is not None: if repo_name is not None: loc_repo_conf = local_repo_configs.get(repo_name) - else: + if loc_repo_conf is None: loc_repo_conf = default_loc_repo_config layout_filename = os.path.join(path, "metadata/layout.conf") -- 2.26.2