summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-02-10 23:39:16 +0000
committerZac Medico <zmedico@gentoo.org>2008-02-10 23:39:16 +0000
commite559940e19ac2d32109df4b275ea9744e57171e9 (patch)
tree005c573f3eca39dc1cb129f8888a00f99f72837f
parentFix CHOST masking logic wrt installed packages so that it's consistent (diff)
downloadportage-multirepo-e559940e19ac2d32109df4b275ea9744e57171e9.tar.gz
portage-multirepo-e559940e19ac2d32109df4b275ea9744e57171e9.tar.bz2
portage-multirepo-e559940e19ac2d32109df4b275ea9744e57171e9.zip
Bug #209538 - Disable annoying "masked by keyword" warnings for installed
packages. We can assume that if the user accepted the keywords at merge time then they never want to be bothered again. (trunk r9330) svn path=/main/branches/2.1.2/; revision=9331
-rwxr-xr-xbin/emerge4
-rw-r--r--pym/portage.py16
2 files changed, 16 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge
index 51b1a56d..2863b10d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1139,7 +1139,7 @@ def visible(pkgsettings, cpv, metadata, built=False, installed=False):
return False
if not portage.eapi_is_supported(metadata["EAPI"]):
return False
- if pkgsettings._getMissingKeywords(cpv, metadata):
+ if not installed and pkgsettings._getMissingKeywords(cpv, metadata):
return False
if pkgsettings._getMaskAtom(cpv, metadata):
return False
@@ -1150,7 +1150,7 @@ def visible(pkgsettings, cpv, metadata, built=False, installed=False):
def get_masking_status(pkg, pkgsettings, root_config):
mreasons = portage.getmaskingstatus(
- pkg.cpv, metadata=pkg.metadata, settings=pkgsettings,
+ pkg, settings=pkgsettings,
portdb=root_config.trees["porttree"].dbapi)
if pkg.built and not pkg.installed and \
diff --git a/pym/portage.py b/pym/portage.py
index e27e30a3..b63105ca 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5665,11 +5665,21 @@ def getmaskingreason(mycpv, metadata=None, settings=None, portdb=None, return_lo
else:
return None
-def getmaskingstatus(mycpv, metadata=None, settings=None, portdb=None):
+def getmaskingstatus(mycpv, settings=None, portdb=None):
if settings is None:
settings = config(clone=globals()["settings"])
if portdb is None:
portdb = globals()["portdb"]
+
+ metadata = None
+ installed = False
+ if not isinstance(mycpv, basestring):
+ # emerge passed in a Package instance
+ pkg = mycpv
+ mycpv = pkg.cpv
+ metadata = pkg.metadata
+ installed = pkg.installed
+
mysplit = catpkgsplit(mycpv)
if not mysplit:
raise ValueError("invalid CPV: %s" % mycpv)
@@ -5750,7 +5760,9 @@ def getmaskingstatus(mycpv, metadata=None, settings=None, portdb=None):
kmask="~"+myarch
break
- if kmask:
+ # Assume that the user doesn't want to be bothered about
+ # KEYWORDS of packages that are already installed.
+ if kmask and not installed:
rValue.append(kmask+" keyword")
return rValue