Remove "profile" mask support as per PMS 5.2.7.
authorZac Medico <zmedico@gentoo.org>
Tue, 9 Aug 2011 05:35:38 +0000 (22:35 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 9 Aug 2011 05:35:38 +0000 (22:35 -0700)
Since this is considered a "legacy" feature by PMS 5.2.7, there
shouldn't be any need to support it anymore. Profiles can use
package.mask to get similar results, and package.mask additionally
allows for comments which are conveniently displayed by emerge. This
will fix bug #377907.

man/portage.5
pym/_emerge/Package.py
pym/portage/dbapi/porttree.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/getmaskingstatus.py

index b2b0eb12cc255709efee9d0751025d3feaf8f890..b783f6239eb2226f312cb419b21fb2949e2ea47d 100644 (file)
@@ -280,6 +280,7 @@ Provides the list of packages that compose the special \fIsystem\fR set.
 \- comments begin with # (no inline comments)
 \- one DEPEND atom per line
 \- packages to be added to the system set begin with a *
+\- atoms without * only appear for legacy reasons
 .fi
 .I Note:
 In a cascading profile setup, you can remove packages in children 
index 20c72b481c0343358c1de122fa41c78b7d85d449..0790946a94ce342736f331f09c94e66c39bec2a8 100644 (file)
@@ -239,11 +239,6 @@ class Package(Task):
                if mask_atom is not None:
                        masks['package.mask'] = mask_atom
 
-               system_mask = settings._getProfileMaskAtom(
-                       self.cpv, self.metadata)
-               if system_mask is not None:
-                       masks['profile.system'] = system_mask
-
                try:
                        missing_licenses = settings._getMissingLicenses(
                                self.cpv, self.metadata)
index ecf275cd455c358d82a0e521660710962c15d06a..bf8ecd902ec6432df31a2f03381f5312e2be1441 100644 (file)
@@ -874,8 +874,6 @@ class portdbapi(dbapi):
                                        continue
                                if settings._getMaskAtom(cpv, metadata):
                                        continue
-                               if settings._getProfileMaskAtom(cpv, metadata):
-                                       continue
                                if local_config:
                                        metadata["USE"] = ""
                                        if "?" in metadata["LICENSE"] or "?" in metadata["PROPERTIES"]:
@@ -940,7 +938,6 @@ class portdbapi(dbapi):
                db_keys = ["SLOT"]
                visible = []
                getMaskAtom = self.settings._getMaskAtom
-               getProfileMaskAtom = self.settings._getProfileMaskAtom
                for cpv in mylist:
                        try:
                                metadata = dict(zip(db_keys, self.aux_get(cpv, db_keys)))
@@ -951,8 +948,6 @@ class portdbapi(dbapi):
                                continue
                        if getMaskAtom(cpv, metadata):
                                continue
-                       if getProfileMaskAtom(cpv, metadata):
-                               continue
                        visible.append(cpv)
                return visible
 
index a8c6ad6659e51364329c912858b3130185f0af0c..a591c9ad74ff8defe6eee1b4a96975eb77fdb2d7 100644 (file)
@@ -1462,6 +1462,9 @@ class config(object):
                @return: A matching profile atom string or None if one is not found.
                """
 
+               warnings.warn("The config._getProfileMaskAtom() method is deprecated.",
+                       DeprecationWarning, stacklevel=2)
+
                cp = cpv_getkey(cpv)
                profile_atoms = self.prevmaskdict.get(cp)
                if profile_atoms:
index 4c65fccaa0a2b612c789700e9756e04390432ae8..6eaa223f662bf4543eb438be424c4d8c7fd3d047 100644 (file)
@@ -72,10 +72,6 @@ def _getmaskingstatus(mycpv, settings, portdb, myrepo=None):
 
        rValue = []
 
-       # profile checking
-       if settings._getProfileMaskAtom(mycpv, metadata):
-               rValue.append(_MaskReason("profile", "profile"))
-
        # package.mask checking
        if settings._getMaskAtom(mycpv, metadata):
                rValue.append(_MaskReason("package.mask", "package.mask", _UnmaskHint("p_mask", None)))