public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jesus Rivero" <neurogeek@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/metagen:v0.6 commit in: metagen/
Date: Sat, 13 Aug 2011 22:29:29 +0000 (UTC)	[thread overview]
Message-ID: <ddf1d9bb078a010915d576fb1ce50024c836fa2d.neurogeek@gentoo> (raw)
Message-ID: <20110813222929.CCS6hMDMGCOiG9b7T4S4i5yLTVFX1a3kuIJqMcfr8g0@z> (raw)

commit:     ddf1d9bb078a010915d576fb1ce50024c836fa2d
Author:     Jesus Rivero (Neurogeek) <jer <AT> acla-overseas <DOT> com>
AuthorDate: Sat Aug 13 18:06:30 2011 +0000
Commit:     Jesus Rivero <neurogeek <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 18:06:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/metagen.git;a=commit;h=ddf1d9bb

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
 
-
 """
 
 NAME     - metagen
-
 SYNOPSIS - Adds metadata.xml to current directory
-
-AUTHOR   - Rob Cakebread <pythonhead@gentoo.org>
-
+AUTHOR   - Rob Cakebread <cakebread@gmail.com>
+AUTHOR   - Jesus Rivero <neurogeek@gentoo.org>
 USE      - metagen --help
-
 EXAMPLES - man metagen
 
 """
 
-import sys
 import re
 import os
+import sys
 from optparse import OptionParser
 from commands import getstatusoutput
 
+from portage import config
+from repoman import herdbase
 from portage.output import red, blue
 
 from metagen.version import __version__
 from metagen import metagenerator
 
+PORTDIR = config(local_config=False)["PORTDIR"]
+HB = herdbase.make_herd_base(os.path.sep.join([PORTDIR, 'metadata', 'herds.xml']))
 
 def parse_echangelog_variable(name, email):
     """Extract developer name and email from ECHANGELOG_USER variable"""
@@ -64,6 +64,12 @@ def generate_xml(options):
         herds = options.herd.split(",")
     else:
         herds = ["no-herd"]
+
+    for herd in herds:
+        if not HB.known_herd(herd):
+            print red("!!! Error. Herd %s does not exist." % herd)
+            sys.exit(1) 
+            
     metadata.set_herd(herds)
 
     if options.echangelog:



             reply	other threads:[~2011-08-13 22:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-13 22:08 Jesus Rivero [this message]
2011-08-13 22:29 ` [gentoo-commits] proj/metagen:v0.6 commit in: metagen/ Jesus Rivero
  -- strict thread matches above, loose matches on Subject: below --
2011-09-09 13:16 [gentoo-commits] proj/metagen:master " Jesus Rivero
2011-09-09 13:42 Jesus Rivero
2011-09-25 14:04 Jesus Rivero
2011-09-25 14:04 Jesus Rivero
2011-09-25 14:04 Jesus Rivero
2011-09-28 14:46 Jesus Rivero
2015-10-30 15:13 Sebastian Pipping
2015-10-30 15:13 Sebastian Pipping
2016-02-21 22:14 Sebastian Pipping
2016-02-21 22:14 Sebastian Pipping
2016-02-21 22:14 Sebastian Pipping
2016-02-21 22:14 Sebastian Pipping
2016-02-21 22:17 Sebastian Pipping
2016-02-21 22:24 Sebastian Pipping
2016-02-21 22:27 Sebastian Pipping
2016-06-23 21:21 Sebastian Pipping
2016-06-23 21:23 Sebastian Pipping
2017-03-13 19:38 Sebastian Pipping
2020-01-31 17:55 Sebastian Pipping
2020-01-31 17:55 Sebastian Pipping
2022-01-25 18:06 Sebastian Pipping
2024-03-31  0:10 Sebastian Pipping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ddf1d9bb078a010915d576fb1ce50024c836fa2d.neurogeek@gentoo \
    --to=neurogeek@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox