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 CE968138CEE for ; Sun, 5 Jul 2015 16:11:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3D6CFE090A; Sun, 5 Jul 2015 16:11:19 +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 D14D9E090A for ; Sun, 5 Jul 2015 16:11:18 +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 B750F340792 for ; Sun, 5 Jul 2015 16:11:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 466B673C for ; Sun, 5 Jul 2015 16:11:13 +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: <1436112819.a41470af307df90f2be041900dceeed7114d4b74.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: a41470af307df90f2be041900dceeed7114d4b74 X-VCS-Branch: master Date: Sun, 5 Jul 2015 16:11:13 +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: ff8b6d65-b687-4b8a-a829-33ff399ce74f X-Archives-Hash: 909099e39716ac3963742d86271c3956 commit: a41470af307df90f2be041900dceeed7114d4b74 Author: Anthony G. Basile gentoo org> AuthorDate: Sun Jul 5 16:13:39 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Jul 5 16:13:39 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=a41470af make-worldconf: change structure of world.conf. make-worldconf | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/make-worldconf b/make-worldconf index 4b962d4..85f63b0 100755 --- a/make-worldconf +++ b/make-worldconf @@ -66,8 +66,7 @@ def useflags(config, p): # Insert nicely sorted flags. if len(flags) > 0: flags.sort() - config[p.slot_atom]['package.use/%s' % re.sub('[/:]', '_', p.slot_atom)] = \ - p.slot_atom + ' ' + ' '.join(flags) + config[p.slot_atom]['package.use'] = p.slot_atom + ' ' + ' '.join(flags) def keywords(config, p): @@ -84,33 +83,14 @@ def keywords(config, p): except AttributeError: pass if keyword: - config[p.slot_atom]['package.accept_keywords/%s' % re.sub('[/:]', '_', p.slot_atom)] = \ - '=%s %s' % (p.cpv, keyword) - - -def envvars(config, p): - fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, 'package.env') - if os.path.isfile(fpath): - with open(fpath, 'r') as g: - for l in g.readlines(): - # This matching needs to be made more strick. - if re.search('%s' % re.escape(p.cpv_split[1]), l): - p_slot_atom = re.sub('[/:]', '_', p.slot_atom) - config[p.slot_atom]['package.env/%s' % p_slot_atom] = \ - '%s %s' % (p.slot_atom, p_slot_atom) - m = re.search('(\S+)\s+(\S+)', l) - env_file = os.path.join(CONST.PORTAGE_CONFIGDIR, 'env') - env_file = os.path.join(env_file, m.group(2)) - with open(env_file, 'r') as h: - config[p.slot_atom]['env/%s' % p_slot_atom] = h.read() + config[p.slot_atom]['package.accept_keywords'] = '=%s %s' % (p.cpv, keyword) def others(config, p, subdir): - rpath = '%s/%s' % (subdir, re.sub('[/:]', '_', p.slot_atom)) - fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, rpath) + fpath = os.path.join(CONST.PORTAGE_CONFIGDIR, subdir) if os.path.isfile(fpath): with open(fpath, 'r') as g: - config[p.slot_atom][rpath] = g.read() + config[p.slot_atom][subdir] = g.read() def main(): @@ -140,10 +120,9 @@ def main(): # Populate package.accept_keywords - these are read out of p keywords(config, p) - # Populate package.env and env/* - these are read out of /etc/portage - envvars(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')