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 1QsMNf-0006Fp-0w for garchives@archives.gentoo.org; Sat, 13 Aug 2011 22:08:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A2B0E058A; Sat, 13 Aug 2011 22:08:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5E747E0574 for ; Sat, 13 Aug 2011 22:08:26 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DDF4464280 for ; Sat, 13 Aug 2011 22:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E939680040 for ; Sat, 13 Aug 2011 22:08:24 +0000 (UTC) From: "Jesus Rivero" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jesus Rivero" Message-ID: Subject: [gentoo-commits] proj/metagen:master commit in: metagen/ X-VCS-Repository: proj/metagen X-VCS-Files: metagen/main.py X-VCS-Directories: metagen/ X-VCS-Committer: neurogeek X-VCS-Committer-Name: Jesus Rivero X-VCS-Revision: ddf1d9bb078a010915d576fb1ce50024c836fa2d Date: Sat, 13 Aug 2011 22:08:24 +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: X-Archives-Hash: 30cd6ede89021a179e36dbd39eff4ab1 commit: ddf1d9bb078a010915d576fb1ce50024c836fa2d Author: Jesus Rivero (Neurogeek) acla-overseas com> AuthorDate: Sat Aug 13 18:06:30 2011 +0000 Commit: Jesus Rivero gentoo org> CommitDate: Sat Aug 13 18:06:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/metagen.git;a= =3Dcommit;h=3Dddf1d9bb Added checks for HERD existance --- metagen/main.py | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/metagen/main.py b/metagen/main.py index 06f0239..22abbd5 100755 --- a/metagen/main.py +++ b/metagen/main.py @@ -1,31 +1,31 @@ #!/usr/bin/python =20 - """ =20 NAME - metagen - SYNOPSIS - Adds metadata.xml to current directory - -AUTHOR - Rob Cakebread - +AUTHOR - Rob Cakebread +AUTHOR - Jesus Rivero USE - metagen --help - EXAMPLES - man metagen =20 """ =20 -import sys import re import os +import sys from optparse import OptionParser from commands import getstatusoutput =20 +from portage import config +from repoman import herdbase from portage.output import red, blue =20 from metagen.version import __version__ from metagen import metagenerator =20 +PORTDIR =3D config(local_config=3DFalse)["PORTDIR"] +HB =3D herdbase.make_herd_base(os.path.sep.join([PORTDIR, 'metadata', 'h= erds.xml'])) =20 def parse_echangelog_variable(name, email): """Extract developer name and email from ECHANGELOG_USER variable""" @@ -64,6 +64,12 @@ def generate_xml(options): herds =3D options.herd.split(",") else: herds =3D ["no-herd"] + + for herd in herds: + if not HB.known_herd(herd): + print red("!!! Error. Herd %s does not exist." % herd) + sys.exit(1)=20 + =20 metadata.set_herd(herds) =20 if options.echangelog: 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 1QsMi3-0007Jp-Dg for garchives@archives.gentoo.org; Sat, 13 Aug 2011 22:29:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B3F221C0CC; Sat, 13 Aug 2011 22:29:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DC8AD21C0CC for ; Sat, 13 Aug 2011 22:29:30 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 69BB71B402C for ; Sat, 13 Aug 2011 22:29:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6C1A580040 for ; Sat, 13 Aug 2011 22:29:29 +0000 (UTC) From: "Jesus Rivero" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jesus Rivero" Message-ID: Subject: [gentoo-commits] proj/metagen:v0.6 commit in: metagen/ X-VCS-Repository: proj/metagen X-VCS-Files: metagen/main.py X-VCS-Directories: metagen/ X-VCS-Committer: neurogeek X-VCS-Committer-Name: Jesus Rivero X-VCS-Revision: ddf1d9bb078a010915d576fb1ce50024c836fa2d Date: Sat, 13 Aug 2011 22:29:29 +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: X-Archives-Hash: 85a57cb2bf3dcfb8a8b0ea778aeaf8e6 Message-ID: <20110813222929.CCS6hMDMGCOiG9b7T4S4i5yLTVFX1a3kuIJqMcfr8g0@z> commit: ddf1d9bb078a010915d576fb1ce50024c836fa2d Author: Jesus Rivero (Neurogeek) acla-overseas com> AuthorDate: Sat Aug 13 18:06:30 2011 +0000 Commit: Jesus Rivero gentoo org> CommitDate: Sat Aug 13 18:06:30 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/metagen.git;a= =3Dcommit;h=3Dddf1d9bb Added checks for HERD existance --- metagen/main.py | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/metagen/main.py b/metagen/main.py index 06f0239..22abbd5 100755 --- a/metagen/main.py +++ b/metagen/main.py @@ -1,31 +1,31 @@ #!/usr/bin/python =20 - """ =20 NAME - metagen - SYNOPSIS - Adds metadata.xml to current directory - -AUTHOR - Rob Cakebread - +AUTHOR - Rob Cakebread +AUTHOR - Jesus Rivero USE - metagen --help - EXAMPLES - man metagen =20 """ =20 -import sys import re import os +import sys from optparse import OptionParser from commands import getstatusoutput =20 +from portage import config +from repoman import herdbase from portage.output import red, blue =20 from metagen.version import __version__ from metagen import metagenerator =20 +PORTDIR =3D config(local_config=3DFalse)["PORTDIR"] +HB =3D herdbase.make_herd_base(os.path.sep.join([PORTDIR, 'metadata', 'h= erds.xml'])) =20 def parse_echangelog_variable(name, email): """Extract developer name and email from ECHANGELOG_USER variable""" @@ -64,6 +64,12 @@ def generate_xml(options): herds =3D options.herd.split(",") else: herds =3D ["no-herd"] + + for herd in herds: + if not HB.known_herd(herd): + print red("!!! Error. Herd %s does not exist." % herd) + sys.exit(1)=20 + =20 metadata.set_herd(herds) =20 if options.echangelog: