summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-31 19:40:54 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-31 19:40:54 +0000
commita9dc0a4ce8de8ff77ced4c2d169b739578eb64c0 (patch)
tree3f6106ea1a4b77a2e38f61b6f8ef170f1b8e3e9e
parentMatch blockers against the correct $ROOT for bug #108449. This patch is from... (diff)
downloadportage-multirepo-2.1-r2.tar.gz
portage-multirepo-2.1-r2.tar.bz2
portage-multirepo-2.1-r2.zip
Allow binary packages to be installed with --usepkg even when there is no ebuild in tree (but not when there is a matching ebuild in the tree that is masked). See bugs #55871, #135834, and #140694. This patch is from trunk r3826:3829 and r3907.v2.1-r2
svn path=/main/branches/2.1/; revision=4075
-rwxr-xr-xbin/emerge12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index ed14f090..b7b3f3f1 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1129,6 +1129,12 @@ class depgraph:
return (0,[])
try:
mykey=portage.dep_expand(x,mydb=portage.portdb)
+ if mykey.startswith("null/"):
+ # If category expansion fails against the portage tree,
+ # remove the null/ prefix so that it may be given
+ # another chance to expand against the binary package
+ # tree in select_dep().
+ mykey = mykey[5:]
except ValueError, errpkgs:
print "\n\n!!! The short ebuild name \"" + x + "\" is ambiguous. Please specify"
print "!!! one of the following fully-qualified ebuild names instead:\n"
@@ -1260,9 +1266,9 @@ class depgraph:
myeb_pkg_matches=portage.db["/"]["bintree"].dbapi.match(x)
if ("--usepkgonly" not in myopts):
# Remove any binary package entries that are masked in the portage tree (#55871)
- for idx in range(len(myeb_pkg_matches)-1,-1,-1):
- if myeb_pkg_matches[idx] not in myeb_matches:
- del myeb_pkg_matches[idx]
+ myeb_pkg_matches = [pkg for pkg in myeb_pkg_matches \
+ if pkg in myeb_matches or \
+ not portage.portdb.cpv_exists(pkg)]
myeb_pkg = portage.best(myeb_pkg_matches)
if not myeb_pkg: