public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/grss:master commit in: /
Date: Sat, 25 Jul 2015 01:24:12 +0000 (UTC)	[thread overview]
Message-ID: <1437787605.60492d29bc4cad13e376b17b6efc63a51c8729e4.blueness@gentoo> (raw)

commit:     60492d29bc4cad13e376b17b6efc63a51c8729e4
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 25 01:26:45 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jul 25 01:26:45 2015 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=60492d29

grsrun: add 'select' flag -s.

 grsrun | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/grsrun b/grsrun
index 86b33ea..2e69c71 100755
--- a/grsrun
+++ b/grsrun
@@ -15,11 +15,13 @@ from getopt import getopt, GetoptError
 
 def usage(rc=1):
     usage = """
-usage: grsrun [-m|-u|-h]
+usage: grsrun [-m|-u|-h|-s <name>]
 
-flags: -m  Mock run.  Don't really execute.
-     : -u  Update run.
-     : -h  print this help file
+flags:             Release run.  Do every step in build script.
+     : -u          Update run.  Do only '+' steps.
+     : -m          Mock run.  Log what would be done.
+     : -s <name>.  Only run for GRS system <name>.
+     : -h          Print this help file.
 """
     print(usage)
     sys.exit(rc)
@@ -28,12 +30,13 @@ flags: -m  Mock run.  Don't really execute.
 
 def main():
     try:
-        opts, x = getopt(sys.argv[1:], 'muh')
+        opts, x = getopt(sys.argv[1:], 'mus:h')
     except GetoptError as e:
         usage()
 
     mock_run = False
     update_run = False
+    grsname = None
     for o, a in opts:
         if o == '-h':
             usage(0)
@@ -41,6 +44,8 @@ def main():
             mock_run = True
         elif o == '-u':
             update_run = True
+        elif o == '-s':
+            grsname = a
 
     os.makedirs(CONST.GRS_CGROUPDIR, mode=0o555, exist_ok=True)
     if not os.path.ismount(CONST.GRS_CGROUPDIR):
@@ -49,6 +54,9 @@ def main():
 
     count = 0
     for name in CONST.names:
+        if grsname:
+            if name != grsname:
+                continue
         if not os.fork():
             subcgroup    = 'run-%s' % name
             subcgroupdir = os.path.join(CONST.GRS_CGROUPDIR, subcgroup)


             reply	other threads:[~2015-07-25  1:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25  1:24 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-04-02 22:06 [gentoo-commits] proj/grss:master commit in: / Anthony G. Basile
2015-08-08 20:26 Anthony G. Basile
2015-08-08 17:52 Anthony G. Basile
2015-08-04 21:41 Anthony G. Basile
2015-08-04 19:32 Anthony G. Basile
2015-08-04 19:25 Anthony G. Basile
2015-07-25 22:06 Anthony G. Basile
2015-07-25 15:32 Anthony G. Basile
2015-07-25  1:51 Anthony G. Basile
2015-07-10 21:13 Anthony G. Basile
2015-07-07 12:38 Anthony G. Basile
2015-07-07  0:41 Anthony G. Basile
2015-07-06 19:57 Anthony G. Basile
2015-07-06 19:49 Anthony G. Basile
2015-07-06  1:39 Anthony G. Basile
2015-07-05 23:56 Anthony G. Basile
2015-07-05 16:33 Anthony G. Basile
2015-07-05 16:20 Anthony G. Basile
2015-07-05 16:11 Anthony G. Basile
2015-07-05 15:19 Anthony G. Basile
2015-07-05 12:40 Anthony G. Basile
2015-07-04 14:13 Anthony G. Basile
2015-07-02 16:51 Anthony G. Basile
2015-07-01 18:12 Anthony G. Basile

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=1437787605.60492d29bc4cad13e376b17b6efc63a51c8729e4.blueness@gentoo \
    --to=blueness@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