diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-30 03:21:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-30 03:21:33 +0000 |
commit | 059e00f68aba240ef6dee93b2ac68640872c4d4b (patch) | |
tree | a488be5b2f07a9f91b2ca99bce4b178acab39156 /bin/emerge | |
parent | 37ee90fe68ebd02a9a0ceae726dc0935445cb938 (diff) | |
download | portage-059e00f68aba240ef6dee93b2ac68640872c4d4b.tar.gz portage-059e00f68aba240ef6dee93b2ac68640872c4d4b.tar.bz2 portage-059e00f68aba240ef6dee93b2ac68640872c4d4b.zip |
Make all the python code respect USE conditionals in RESTRICT. It's already handled on the bash side since RESTRICT is assigned the value of PORTAGE_RESTRICT. (branches/2.1.2 r6763:6765)
svn path=/main/branches/2.1.2.9/; revision=7452
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index e1209640e..31868d2fb 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2418,6 +2418,8 @@ class depgraph: depth >= mylist[i+1][1]: del mylist[i] + from portage import flatten + from portage_dep import use_reduce, paren_reduce display_overlays=False # files to fetch list - avoids counting a same file twice # in size display (verbose mode) @@ -2456,6 +2458,7 @@ class depgraph: blockers.append(addl) else: mydbapi = self.trees[myroot][self.pkg_tree_map[pkg_type]].dbapi + pkg_status = x[3] binary_package = True if "ebuild" == pkg_type: if "merge" == x[3] or \ @@ -2476,9 +2479,19 @@ class depgraph: self.useFlags[myroot][pkg_key] = mydbapi.aux_get( pkg_key, ["USE"])[0].split() + try: + restrict = flatten(use_reduce(paren_reduce( + mydbapi.aux_get(pkg_key, ["RESTRICT"])[0]), + uselist=self.useFlags[myroot][pkg_key])) + except portage_exception.InvalidDependString, e: + if pkg_status != "nomerge": + restrict = mydbapi.aux_get(pkg_key, ["RESTRICT"])[0] + show_invalid_depstring_notice(x, restrict, str(e)) + del e + sys.exit(1) + restrict = [] if "ebuild" == pkg_type and x[3] != "nomerge" and \ - "fetch" in portdb.aux_get( - x[2], ["RESTRICT"])[0].split(): + "fetch" in restrict: fetch = red("F") if ordered: counters.restrict_fetch += 1 |