From cf7bf7667a56a28a6c6f360bc77a01d05d64bdd8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 21 Mar 2012 12:25:55 -0700 Subject: [PATCH] getmaskingreason: use remember_source_file This will fix bug #409179. --- pym/portage/package/ebuild/getmaskingreason.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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: -- 2.26.2