getmaskingreason: use remember_source_file
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Mar 2012 19:25:55 +0000 (12:25 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Mar 2012 19:25:55 +0000 (12:25 -0700)
This will fix bug #409179.

pym/portage/package/ebuild/getmaskingreason.py

index f2af6387b729f658982eba718e1052833af01517..8a88c2f60cacb2c28e43d5bd663d6543bc0d51cd 100644 (file)
@@ -83,7 +83,13 @@ def getmaskingreason(mycpv, metadata=None, settings=None,
        pmasklists = []
        for profile in locations:
                pmask_filename = os.path.join(profile, "package.mask")
-               pmasklists.append((pmask_filename, grablines(pmask_filename, recursive=1)))
+               node = None
+               for l, recursive_filename in grablines(pmask_filename,
+                       recursive=1, remember_source_file=True):
+                       if node is None or node[0] != recursive_filename:
+                               node = (recursive_filename, [])
+                               pmasklists.append(node)
+                       node[1].append(l)
 
        pmaskdict = settings._mask_manager._pmaskdict
        if mycp in pmaskdict: