portage.package.ebuild.getmaskingreason.getmaskingreason(): Stop using PORTDIR and...
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 23 Jul 2013 20:07:42 +0000 (22:07 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 23 Jul 2013 20:07:42 +0000 (22:07 +0200)
pym/portage/package/ebuild/getmaskingreason.py

index 1c167140ed7b9822a1ac0c95ac63c15677bcbf2d..53895749a4cb2854a0a33cb3a2f29a95c3bd73d1 100644 (file)
@@ -68,13 +68,10 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
 
        mycp = pkg.cp
 
-       # XXX- This is a temporary duplicate of code from the config constructor.
-       locations = [os.path.join(settings["PORTDIR"], "profiles")]
+       locations = []
+       for repo in settings.repositories[pkg.repo].masters + (settings.repositories[pkg.repo],):
+               locations.append(os.path.join(repo.location, "profiles"))
        locations.extend(settings.profiles)
-       for ov in portage.util.shlex_split(settings["PORTDIR_OVERLAY"]):
-               profdir = os.path.join(normalize_path(ov), "profiles")
-               if os.path.isdir(profdir):
-                       locations.append(profdir)
        locations.append(os.path.join(settings["PORTAGE_CONFIGROOT"],
                USER_CONFIG_PATH))
        locations.reverse()