aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py')
-rw-r--r--portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py b/portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py
index 4c65fcc..9bf605d 100644
--- a/portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py
+++ b/portage_with_autodep/pym/portage/package/ebuild/getmaskingstatus.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__all__ = ['getmaskingstatus']
@@ -7,11 +7,9 @@ import sys
import portage
from portage import eapi_is_supported, _eapi_is_deprecated
-from portage.dep import match_from_list, _slot_separator, _repo_separator
from portage.localization import _
from portage.package.ebuild.config import config
-from portage.versions import catpkgsplit, cpv_getkey
-from _emerge.Package import Package
+from portage.versions import catpkgsplit, _pkg_str
if sys.hexversion >= 0x3000000:
basestring = str
@@ -53,9 +51,6 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
metadata = pkg.metadata
installed = pkg.installed
- mysplit = catpkgsplit(mycpv)
- if not mysplit:
- raise ValueError(_("invalid CPV: %s") % mycpv)
if metadata is None:
db_keys = list(portdb._aux_cache_keys)
try:
@@ -70,11 +65,14 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
else:
metadata["USE"] = ""
- rValue = []
+ if not hasattr(mycpv, 'slot'):
+ try:
+ mycpv = _pkg_str(mycpv, slot=metadata['SLOT'],
+ repo=metadata.get('repository'))
+ except portage.exception.InvalidData:
+ raise ValueError(_("invalid CPV: %s") % mycpv)
- # profile checking
- if settings._getProfileMaskAtom(mycpv, metadata):
- rValue.append(_MaskReason("profile", "profile"))
+ rValue = []
# package.mask checking
if settings._getMaskAtom(mycpv, metadata):
@@ -85,8 +83,6 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
mygroups = settings._getKeywords(mycpv, metadata)
licenses = metadata["LICENSE"]
properties = metadata["PROPERTIES"]
- if eapi.startswith("-"):
- eapi = eapi[1:]
if not eapi_is_supported(eapi):
return [_MaskReason("EAPI", "EAPI %s" % eapi)]
elif _eapi_is_deprecated(eapi) and not installed: