Merged from trunk -r13575:13580
authorFabian Groffen <grobian@gentoo.org>
Sat, 2 May 2009 09:30:11 +0000 (09:30 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 2 May 2009 09:30:11 +0000 (09:30 -0000)
   | 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 <hwoarang@g.o> 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
pym/portage/dbapi/porttree.py

index ae984daff2a9416c69218bfb8f67f1aea57cd228..c8cecfcd716bf02c4f7fa2bacadd8e1d15779b76 100644 (file)
@@ -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
index 318d00c112baf4375562800d4e39b0c87b68dde2..2fc55ccc924801d1dbe9965837fa82994cc5b2b6 100644 (file)
@@ -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")