From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SEQCr-00033z-B3 for garchives@archives.gentoo.org; Sun, 01 Apr 2012 19:12:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91E10E0A7D; Sun, 1 Apr 2012 19:12:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 64B38E044C for ; Sun, 1 Apr 2012 19:12:45 +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 C90CF1B4013 for ; Sun, 1 Apr 2012 19:12:44 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 91607E5403 for ; Sun, 1 Apr 2012 19:12:43 +0000 (UTC) From: "Nirbheek Chauhan" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nirbheek Chauhan" Message-ID: <1333307549.47392a028ee246f124d03f4c25851111dff5e2d5.nirbheek@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: scripts/ X-VCS-Repository: proj/gnome X-VCS-Files: scripts/gen_archlist.py X-VCS-Directories: scripts/ X-VCS-Committer: nirbheek X-VCS-Committer-Name: Nirbheek Chauhan X-VCS-Revision: 47392a028ee246f124d03f4c25851111dff5e2d5 X-VCS-Branch: master Date: Sun, 1 Apr 2012 19:12:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9581fdbe-4ea2-42c0-a803-0cd5a7797dcd X-Archives-Hash: eb82905db284c1eec6e0485371e790eb commit: 47392a028ee246f124d03f4c25851111dff5e2d5 Author: Nirbheek Chauhan gentoo org> AuthorDate: Sun Apr 1 19:12:23 2012 +0000 Commit: Nirbheek Chauhan gentoo org> CommitDate: Sun Apr 1 19:12:29 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3D47392a02 scripts/gen_archlist.py: add the ability to append slot info * As requested by pacho --- scripts/gen_archlist.py | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/scripts/gen_archlist.py b/scripts/gen_archlist.py index ffef7eb..8f0e9a8 100755 --- a/scripts/gen_archlist.py +++ b/scripts/gen_archlist.py @@ -44,6 +44,7 @@ LINE_SEP =3D '' DEBUG =3D False EXTREME_DEBUG =3D False CHECK_DEPS =3D False +APPEND_SLOTS =3D False # Check for stable keywords STABLE =3D True =20 @@ -80,6 +81,9 @@ else: if os.environ.has_key('CHECK_DEPS'): CHECK_DEPS =3D os.environ['CHECK_DEPS'] =20 +if os.environ.has_key('APPEND_SLOTS'): + APPEND_SLOTS =3D os.environ['APPEND_SLOTS'] + if not STABLE: print 'Currently broken for anything except STABLEREQ' print 'Please set STABLE to True' @@ -384,6 +388,15 @@ def consolidate_dupes(cpv_kws): =20 return deduped_cpv_kws =20 +def append_slots(cpv_kws): + "Append slots at the end of cpv atoms" + slotifyed_cpv_kws =3D [] + for (cpv, kws) in cpv_kws: + slot =3D portage.portage.portdb.aux_get(cpv, ['SLOT'])[0] + cpv =3D "%s:%s" % (cpv, slot) + slotifyed_cpv_kws.append([cpv, kws]) + return slotifyed_cpv_kws + # FIXME: This is broken def prettify(cpv_kws): "Takes a list of [cpv, [kws]] and prettifies it" @@ -468,6 +481,8 @@ if __name__ =3D=3D "__main__": ALL_CPV_KWS.append(LINE_SEP) =20 ALL_CPV_KWS =3D consolidate_dupes(ALL_CPV_KWS) + if APPEND_SLOTS: + ALL_CPV_KWS =3D append_slots(ALL_CPV_KWS) =20 for i in prettify(ALL_CPV_KWS): print i[0], flatten(i[1])