summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-18 08:29:59 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-18 08:29:59 +0000
commit97d9ee9570e9c9cb6f56bc7898d15417bd02bfc0 (patch)
tree76fedba6863451d14ef9d83f73a08b1cd69caa7c /pym
parent7511b3776e4fb410042caed74fee6d64f60271ca (diff)
downloadportage-97d9ee9570e9c9cb6f56bc7898d15417bd02bfc0.tar.gz
portage-97d9ee9570e9c9cb6f56bc7898d15417bd02bfc0.tar.bz2
portage-97d9ee9570e9c9cb6f56bc7898d15417bd02bfc0.zip
Add a --use-ebuild-visibility option, for using unbuilt ebuild metadata
in visibility checks for built ebuilds. Thanks to Sebastian Mingramm (few) for reporting the problem and testing the patch. svn path=/main/trunk/; revision=14665
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/depgraph.py4
-rw-r--r--pym/_emerge/help.py6
-rw-r--r--pym/_emerge/main.py12
3 files changed, 21 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index de60bd801..3d9df8890 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2319,6 +2319,8 @@ class depgraph(object):
reinstall = False
noreplace = "--noreplace" in self._frozen_config.myopts
avoid_update = "--update" not in self._frozen_config.myopts
+ use_ebuild_visibility = self._frozen_config.myopts.get(
+ '--use-ebuild-visibility', 'n') != 'n'
# Behavior of the "selective" parameter depends on
# whether or not a package matches an argument atom.
# If an installed package provides an old-style
@@ -2392,7 +2394,7 @@ class depgraph(object):
# instances (installed or binary).
# If --usepkgonly is enabled, assume that
# the ebuild status should be ignored.
- if usepkgonly:
+ if not use_ebuild_visibility and usepkgonly:
if installed and \
pkgsettings._getMissingKeywords(
pkg.cpv, pkg.metadata):
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index bbeb2fb36..346d77712 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -538,6 +538,12 @@ def help(myopts, havecolor=1):
print(" a package's dependencies follow the package. Only really useful")
print(" in combination with --emptytree, --update or --deep.")
print()
+ print(" " + green("--use-ebuild-visibility") + "[=%s]" % turquoise("n"))
+ desc = "Use unbuilt ebuild metadata for visibility " + \
+ "checks on built packages."
+ for line in wrap(desc, desc_width):
+ print(desc_indent + line)
+ print()
print(" "+green("--usepkg")+ "[=%s]" % turquoise("n") + " ("+green("-k")+" short option)")
print(" Tell emerge to use binary packages (from $PKGDIR) if they are")
print(" available, thus possibly avoiding some time-consuming compiles.")
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index f8a8b6b46..535cb2ddd 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -391,6 +391,7 @@ def insert_optional_args(args):
'--root-deps' : ('rdeps',),
'--select' : ('n',),
'--selective' : ('n',),
+ "--use-ebuild-visibility": ('n',),
'--usepkg' : ('n',),
'--usepkgonly' : ('n',),
}
@@ -628,6 +629,12 @@ def parse_opts(tmpcmdline, silent=False):
"choices" : ("True", "n")
},
+ "--use-ebuild-visibility": {
+ "help" : "use unbuilt ebuild metadata for visibility checks on built packages",
+ "type" : "choice",
+ "choices" : ("True", "n")
+ },
+
"--usepkg": {
"shortopt" : "-k",
"help" : "use binary packages",
@@ -771,6 +778,11 @@ def parse_opts(tmpcmdline, silent=False):
myoptions.load_average = load_average
+ if myoptions.use_ebuild_visibility in ("True",):
+ myoptions.use_ebuild_visibility = True
+ else:
+ myoptions.use_ebuild_visibility = None
+
if myoptions.usepkg in ("True",):
myoptions.usepkg = True
else: