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 7485C1381F3 for ; Sat, 15 Dec 2012 23:42:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5BCDD21C082; Sat, 15 Dec 2012 23:42:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF86721C082 for ; Sat, 15 Dec 2012 23:42:06 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E24E933DC81 for ; Sat, 15 Dec 2012 23:42:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 7ECC9E543C for ; Sat, 15 Dec 2012 23:42:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1355614908.37044b4493e8de520c7b394f5d7c43c26b9b064b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/repoman X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 37044b4493e8de520c7b394f5d7c43c26b9b064b X-VCS-Branch: master Date: Sat, 15 Dec 2012 23:42:04 +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: 29174073-9a80-4e0d-a874-83264aee3ed3 X-Archives-Hash: a949264925adf9c542debe4f3952ea1b commit: 37044b4493e8de520c7b394f5d7c43c26b9b064b Author: Zac Medico gentoo org> AuthorDate: Sat Dec 15 23:41:48 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Dec 15 23:41:48 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=37044b44 repoman: check deps for * and ~* keywords --- bin/repoman | 33 +++++++++++++++++++++++++++------ 1 files changed, 27 insertions(+), 6 deletions(-) diff --git a/bin/repoman b/bin/repoman index 41bce80..60792d7 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1881,18 +1881,31 @@ for x in effective_scanlist: arches = [[repoman_settings["ARCH"], repoman_settings["ARCH"], repoman_settings["ACCEPT_KEYWORDS"].split()]] else: - arches=[] - for keyword in myaux["KEYWORDS"].split(): + arches = set() + for keyword in keywords: if (keyword[0]=="-"): continue elif (keyword[0]=="~"): - arches.append([keyword, keyword[1:], [keyword[1:], keyword]]) + arch = keyword[1:] + if arch == "*": + for expanded_arch in profiles: + if expanded_arch == "**": + continue + arches.add((keyword, expanded_arch, (arch, keyword))) + else: + arches.add((keyword, arch, (arch, keyword))) else: - arches.append([keyword, keyword, [keyword]]) + if keyword == "*": + for expanded_arch in profiles: + if expanded_arch == "**": + continue + arches.add((keyword, expanded_arch, (keyword,))) + else: + arches.add((keyword, keyword, (keyword,))) if not arches: # Use an empty profile for checking dependencies of # packages that have empty KEYWORDS. - arches.append(['**', '**', ['**']]) + arches.add(('**', '**', ('**',))) unknown_pkgs = set() baddepsyntax = False @@ -2119,14 +2132,22 @@ for x in effective_scanlist: # user is intent on forcing the commit anyway. continue + relevant_profiles = [] for keyword,arch,groups in arches: if arch not in profiles: # A missing profile will create an error further down # during the KEYWORDS verification. continue + relevant_profiles.extend((keyword, groups, prof) + for prof in profiles[arch]) + + def sort_key(item): + return item[2].sub_path + + relevant_profiles.sort(key=sort_key) - for prof in profiles[arch]: + for keyword, groups, prof in relevant_profiles: if prof.status not in ("stable", "dev") or \ prof.status == "dev" and not options.include_dev: