From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1D88C138CEE for ; Sun, 5 Jul 2015 16:20:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A45BEE08EA; Sun, 5 Jul 2015 16:20:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 51CB7E08EA for ; Sun, 5 Jul 2015 16:20:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 89BC43407A3 for ; Sun, 5 Jul 2015 16:20:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8C260739 for ; Sun, 5 Jul 2015 16:20:07 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1436113352.b5d9509982de6463c68c4c2dfd9ee248f3a31996.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: / X-VCS-Repository: proj/grss X-VCS-Files: make-worldconf X-VCS-Directories: / X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: b5d9509982de6463c68c4c2dfd9ee248f3a31996 X-VCS-Branch: master Date: Sun, 5 Jul 2015 16:20:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b996174d-2393-4a5f-8018-e07aea1b68d1 X-Archives-Hash: 20f4a237617e91ebe93ca034874c34ae commit: b5d9509982de6463c68c4c2dfd9ee248f3a31996 Author: Anthony G. Basile gentoo org> AuthorDate: Sun Jul 5 16:22:32 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Jul 5 16:22:32 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=b5d95099 make-worldconf: fix reading from /etc/portage. make-worldconf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/make-worldconf b/make-worldconf index 85f63b0..9408aef 100755 --- a/make-worldconf +++ b/make-worldconf @@ -86,8 +86,11 @@ def keywords(config, p): config[p.slot_atom]['package.accept_keywords'] = '=%s %s' % (p.cpv, keyword) -def others(config, p, subdir): - fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, subdir) +def from_etc_portage(config, p, subdir): + # We could add better matching intelligence here so as to match + # these subdirs+files for /etc/portage not maintained by GRS. + fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, '%s/%s' % \ + (subdir, re.sub('[/:]', '_', p.slot_atom))) if os.path.isfile(fpath): with open(fpath, 'r') as g: config[p.slot_atom][subdir] = g.read() @@ -121,10 +124,10 @@ def main(): keywords(config, p) # Others - these are read out of /etc/portage - others(config, p, 'env') - others(config, p, 'package.env') - others(config, p, 'package.mask') - others(config, p, 'package.unmask') + from_etc_portage(config, p, 'env') + from_etc_portage(config, p, 'package.env') + from_etc_portage(config, p, 'package.mask') + from_etc_portage(config, p, 'package.unmask') # Remove any empty sections if config[p.slot_atom] == {}: