diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-21 08:29:39 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-21 08:47:38 -0800 |
commit | 944dd516b4983aa06b8e7d60ba1ea75eb1d05706 (patch) | |
tree | 3af582425931626838fc46aedc316668b916eb7d | |
parent | 6222d0b0bf13cbbfac8e9a30c98f6ff9f40dc938 (diff) | |
download | portage-944dd516b4983aa06b8e7d60ba1ea75eb1d05706.tar.gz portage-944dd516b4983aa06b8e7d60ba1ea75eb1d05706.tar.bz2 portage-944dd516b4983aa06b8e7d60ba1ea75eb1d05706.zip |
doebuild: fix bug #349273
Since commit 75d3130fc8293fff68389b8fed44b8d47a0abe80, doebuild()
for the 'setup' phase triggers the actionmap_deps code path in order
to call the 'pretend' phase as a dependency. This path previously
assumed a portdbapi instance, which may not hold for some api consumers
such as entropy. Therefore, fix the code path to work with other dbapi
types.
-rwxr-xr-x | bin/ebuild | 2 | ||||
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/bin/ebuild b/bin/ebuild index 9b12e7ee5..87d974e48 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -239,7 +239,7 @@ build_dir_phases = set(["setup", "unpack", "prepare", "configure", "compile", # If the current metadata is invalid then force the ebuild to be # sourced again even if $T/environment already exists. ebuild_changed = False -if build_dir_phases.intersection(pargs): +if mytree == "porttree" and build_dir_phases.intersection(pargs): metadata, st, emtime = \ portage.portdb._pull_valid_cache(cpv, ebuild, ebuild_portdir) if metadata is None: diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 3071cf8d4..4761d3e60 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -686,7 +686,12 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, mydo not in ("digest", "manifest") and "noauto" not in features) alist = mysettings.configdict["pkg"].get("A") aalist = mysettings.configdict["pkg"].get("AA") - if alist is None or aalist is None or \ + if not hasattr(mydbapi, 'getFetchMap'): + if alist is None: + alist = set() + if aalist is None: + aalist = set() + elif alist is None or aalist is None or \ (not emerge_skip_distfiles and need_distfiles): # Make sure we get the correct tree in case there are overlays. mytree = os.path.realpath( @@ -746,7 +751,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, return 1 # See above comment about fetching only when needed - if not emerge_skip_distfiles and \ + if tree == 'porttree' and \ not digestcheck(checkme, mysettings, "strict" in features): return 1 @@ -754,7 +759,9 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, return 0 # remove PORTAGE_ACTUAL_DISTDIR once cvs/svn is supported via SRC_URI - if (mydo != "setup" and "noauto" not in features) or mydo == "unpack": + if tree == 'porttree' and \ + ((mydo != "setup" and "noauto" not in features) \ + or mydo == "unpack"): _prepare_fake_distdir(mysettings, alist) #initial dep checks complete; time to process main commands |