If a package is masked by EAPI then don't show any other masking reasons.
authorZac Medico <zmedico@gentoo.org>
Fri, 27 Mar 2009 04:16:04 +0000 (04:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 27 Mar 2009 04:16:04 +0000 (04:16 -0000)
(trunk r13174)

svn path=/main/branches/2.1.6/; revision=13204

pym/_emerge/__init__.py

index c9480d3dc89e89bbd76893bce0ba49e4502429b0..86667a792766dfcc97329ac3a5399e9c758feb30 100644 (file)
@@ -1422,9 +1422,15 @@ def get_mask_info(root_config, cpv, pkgsettings,
        if metadata is None:
                mreasons = ["corruption"]
        else:
-               pkg = Package(type_name=pkg_type, root_config=root_config,
-                       cpv=cpv, built=built, installed=installed, metadata=metadata)
-               mreasons = get_masking_status(pkg, pkgsettings, root_config)
+               eapi = metadata['EAPI']
+               if eapi[:1] == '-':
+                       eapi = eapi[1:]
+               if not portage.eapi_is_supported(eapi):
+                       mreasons = ['EAPI %s' % eapi]
+               else:
+                       pkg = Package(type_name=pkg_type, root_config=root_config,
+                               cpv=cpv, built=built, installed=installed, metadata=metadata)
+                       mreasons = get_masking_status(pkg, pkgsettings, root_config)
        return metadata, mreasons
 
 def show_masked_packages(masked_packages):