From: Zac Medico Date: Wed, 21 Mar 2012 19:25:55 +0000 (-0700) Subject: getmaskingreason: use remember_source_file X-Git-Tag: v2.2.0_alpha94~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf7bf7667a56a28a6c6f360bc77a01d05d64bdd8;p=portage.git getmaskingreason: use remember_source_file This will fix bug #409179. --- diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py index f2af6387b..8a88c2f60 100644 --- a/pym/portage/package/ebuild/getmaskingreason.py +++ b/pym/portage/package/ebuild/getmaskingreason.py @@ -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: