public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/tools/
Date: Wed, 10 Jul 2013 15:10:40 +0000 (UTC)	[thread overview]
Message-ID: <1373463291.e27a07c62d33a317562f6623600b4ad4b4a4496e.dywi@gentoo> (raw)

commit:     e27a07c62d33a317562f6623600b4ad4b4a4496e
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 10 13:34:51 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 10 13:34:51 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=e27a07c6

roverlay/tools/ebuild: doebuild_fetch_and_manifest

A combined fetch/manifest command which can be used when importing ebuilds.

---
 roverlay/tools/ebuild.py | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/roverlay/tools/ebuild.py b/roverlay/tools/ebuild.py
index e8f7e37..0ca0b8a 100644
--- a/roverlay/tools/ebuild.py
+++ b/roverlay/tools/ebuild.py
@@ -20,9 +20,15 @@ _EBUILD_CMDV = (
 def doebuild (
    ebuild_file, command, logger, env=None, opts=(), return_success=True
 ):
-   logger.debug ( "doebuild: {c}, {e!r}".format ( e=ebuild_file, c=command ) )
+   if isinstance ( command, str ):
+      cmdv = ( _EBUILD_CMDV + opts + ( ebuild_file, command ) )
+   else:
+      cmdv = ( _EBUILD_CMDV + opts + ( ebuild_file, ) + command )
+
+   logger.debug ( "doebuild: {cmdv}".format ( cmdv=cmdv ) )
+
    return roverlay.tools.runcmd.run_command (
-      cmdv           = ( _EBUILD_CMDV + opts + ( ebuild_file, command ) ),
+      cmdv           = cmdv,
       env            = env,
       logger         = logger,
       return_success = return_success
@@ -54,3 +60,16 @@ def doebuild_fetch (
       return_success = return_success,
    )
 # --- end of doebuild_fetch (...) ---
+
+def doebuild_fetch_and_manifest (
+   ebuild_file, logger, env=None, opts=(), return_success=True
+):
+   return doebuild (
+      ebuild_file    = ebuild_file,
+      command        = ( "fetch", "manifest" ),
+      logger         = logger,
+      env            = env,
+      opts           = opts,
+      return_success = return_success,
+   )
+# --- end of doebuild_fetch_and_manifest (...) ---


WARNING: multiple messages have this Message-ID (diff)
From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/tools/
Date: Wed, 10 Jul 2013 16:16:53 +0000 (UTC)	[thread overview]
Message-ID: <1373463291.e27a07c62d33a317562f6623600b4ad4b4a4496e.dywi@gentoo> (raw)
Message-ID: <20130710161653.nFvmJzQEO9VvsuuyzKYzBpsRP8AlCAIdYpHEp7PY1iU@z> (raw)

commit:     e27a07c62d33a317562f6623600b4ad4b4a4496e
Author:     André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jul 10 13:34:51 2013 +0000
Commit:     André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jul 10 13:34:51 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=e27a07c6

roverlay/tools/ebuild: doebuild_fetch_and_manifest

A combined fetch/manifest command which can be used when importing ebuilds.

---
 roverlay/tools/ebuild.py | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/roverlay/tools/ebuild.py b/roverlay/tools/ebuild.py
index e8f7e37..0ca0b8a 100644
--- a/roverlay/tools/ebuild.py
+++ b/roverlay/tools/ebuild.py
@@ -20,9 +20,15 @@ _EBUILD_CMDV = (
 def doebuild (
    ebuild_file, command, logger, env=None, opts=(), return_success=True
 ):
-   logger.debug ( "doebuild: {c}, {e!r}".format ( e=ebuild_file, c=command ) )
+   if isinstance ( command, str ):
+      cmdv = ( _EBUILD_CMDV + opts + ( ebuild_file, command ) )
+   else:
+      cmdv = ( _EBUILD_CMDV + opts + ( ebuild_file, ) + command )
+
+   logger.debug ( "doebuild: {cmdv}".format ( cmdv=cmdv ) )
+
    return roverlay.tools.runcmd.run_command (
-      cmdv           = ( _EBUILD_CMDV + opts + ( ebuild_file, command ) ),
+      cmdv           = cmdv,
       env            = env,
       logger         = logger,
       return_success = return_success
@@ -54,3 +60,16 @@ def doebuild_fetch (
       return_success = return_success,
    )
 # --- end of doebuild_fetch (...) ---
+
+def doebuild_fetch_and_manifest (
+   ebuild_file, logger, env=None, opts=(), return_success=True
+):
+   return doebuild (
+      ebuild_file    = ebuild_file,
+      command        = ( "fetch", "manifest" ),
+      logger         = logger,
+      env            = env,
+      opts           = opts,
+      return_success = return_success,
+   )
+# --- end of doebuild_fetch_and_manifest (...) ---


             reply	other threads:[~2013-07-10 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 15:10 André Erdmann [this message]
2013-07-10 16:16 ` [gentoo-commits] proj/R_overlay:master commit in: roverlay/tools/ André Erdmann
  -- strict thread matches above, loose matches on Subject: below --
2013-07-11 16:44 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-06-22 15:24 [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-06-20 23:40 ` [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann

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=1373463291.e27a07c62d33a317562f6623600b4ad4b4a4496e.dywi@gentoo \
    --to=dywi@mailerd.de \
    --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