From 9e6e76c71217bb2dadcc521a85ba1007a2e9ccb7 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Mon, 25 Mar 2013 20:28:27 +0100 Subject: [PATCH] - do_localbuild: made "arch" argument optional --- osc/commandline.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index a6d15325..05b23f00 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4736,7 +4736,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. """${cmd_name}: Shows the build log of a local buildchroot usage: - osc lbl [REPOSITORY ARCH] + osc lbl [REPOSITORY [ARCH]] osc lbl # show log of newest last local build ${cmd_option_list} @@ -4746,10 +4746,13 @@ Please submit there instead, or use --nodevelproject to force direct submission. print >>sys.stderr, 'Not implemented for VMs' sys.exit(1) - if len(args) == 0: + if len(args) == 0 or len(args) == 1: package = store_read_package('.') import glob files = glob.glob(os.path.join(os.getcwd(), store, "_buildinfo-*")) + if args: + files = [f for f in files + if os.path.basename(f).replace('_buildinfo-', '').startswith(args[0] + '-')] if not files: self.print_repos() cfg = files[0]