All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <yocto@yoctoproject.org>
Cc: paul.eggleton@linux.intel.com
Subject: [PATCH 02/12] upgradehelper.py: support upgrade multiple recipes
Date: Thu, 7 Dec 2017 15:37:07 +0800	[thread overview]
Message-ID: <a8691b895a4f243eeeb91418800f95c6bd98906d.1512630627.git.liezhi.yang@windriver.com> (raw)
In-Reply-To: <cover.1512630627.git.liezhi.yang@windriver.com>

Now we can use:
$ upgradehelper.py recipe1 recipe2

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 upgradehelper.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index d439a4c..220e459 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -74,7 +74,7 @@ def parse_cmdline():
     parser = argparse.ArgumentParser(description='Package Upgrade Helper',
                                      formatter_class=argparse.RawTextHelpFormatter,
                                      epilog=help_text)
-    parser.add_argument("recipe", help="recipe to be upgraded")
+    parser.add_argument("recipe", nargs = '+', action='store', default='', help="recipe to be upgraded")
 
     parser.add_argument("-t", "--to_version",
                         help="version to upgrade the recipe to")
@@ -928,7 +928,7 @@ if __name__ == "__main__":
                     level=debug_levels[args.debug_level - 1])
     settings, maintainer_override = parse_config_file(args.config_file)
 
-    recipes = args.recipe.split()
+    recipes = args.recipe
 
     if len(recipes) == 1 and recipes[0] == "all":
         updater = UniverseUpdater()
@@ -942,9 +942,12 @@ if __name__ == "__main__":
             args.maintainer = "Upgrade Helper <%s>" % \
                 settings.get('from', 'uh@not.set')
 
-        pkg_list = [(args.recipe, args.to_version, args.maintainer)]
+        pkg_list = [(recipes[0], args.to_version, args.maintainer)]
         updater = Updater(args.auto_mode, args.send_emails, args.skip_compilation)
         updater.run(pkg_list)
+    elif len(recipes) > 1 and args.to_version:
+        E(" -t is only supported when upgrade one recipe\n")
+        exit(1)
     else:
         updater = UniverseUpdater(recipes)
         updater.run()
-- 
2.7.4



  parent reply	other threads:[~2017-12-07  7:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  7:37 [PATCH 00/12] [auh] make it easy to use by recipe maintainer Robert Yang
2017-12-07  7:37 ` [PATCH 01/12] upgradehelper.py: fix checking for do_checkpkg Robert Yang
2017-12-07  7:37 ` Robert Yang [this message]
2017-12-07  7:37 ` [PATCH 03/12] upgradehelper.py: use UniverseUpdater for all cases Robert Yang
2017-12-07  7:37 ` [PATCH 04/12] modules/steps.py: fix warn when skip compilation Robert Yang
2017-12-07  7:37 ` [PATCH 05/12] " Robert Yang
2017-12-07 12:47   ` Alexander Kanavin
2017-12-07  7:37 ` [PATCH 06/12] upgradehelper.py: only check email settings when -e is specified Robert Yang
2017-12-07  7:37 ` [PATCH 07/12] upgradehelper.py: always do upgrade when recipes are specified Robert Yang
2017-12-07  7:37 ` [PATCH 08/12] upgradehelper.py: clean repo only once " Robert Yang
2017-12-07 12:58   ` Alexander Kanavin
2017-12-08  1:43     ` Robert Yang
2017-12-08  2:00       ` Robert Yang
2017-12-08 14:18         ` Alexander Kanavin
2017-12-11  6:13           ` Robert Yang
2017-12-12 12:26             ` Alexander Kanavin
2017-12-13  1:16               ` Robert Yang
2017-12-13 13:18                 ` Alexander Kanavin
2017-12-14  2:13                   ` Robert Yang
2017-12-14 16:38                     ` Alexander Kanavin
2017-12-15 13:35                       ` Alexander Kanavin
2017-12-19  7:20                         ` Robert Yang
2017-12-07  7:37 ` [PATCH 09/12] upgradehelper.py: use git user in commit " Robert Yang
2017-12-07 13:02   ` Alexander Kanavin
2017-12-08  1:51     ` Robert Yang
2017-12-08 14:07       ` Alexander Kanavin
2017-12-08 16:20         ` Burton, Ross
2017-12-11  6:14           ` Robert Yang
2017-12-07  7:37 ` [PATCH 10/12] upgradehelper.py: add --apply-failed option Robert Yang
2017-12-07 13:05   ` Alexander Kanavin
2017-12-08  2:02     ` Robert Yang
2017-12-07  7:37 ` [PATCH 11/12] upgradehelper.py: print info when recipe is skipped to upgrade Robert Yang
2017-12-07  7:37 ` [PATCH 12/12] upgradehelper.py: don't build gcc-runtime when --skip-compilation Robert Yang
2017-12-07  7:46 ` [PATCH 00/12] [auh] make it easy to use by recipe maintainer Robert Yang
2017-12-07  8:53 ` Alexander Kanavin

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=a8691b895a4f243eeeb91418800f95c6bd98906d.1512630627.git.liezhi.yang@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=paul.eggleton@linux.intel.com \
    --cc=yocto@yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.