From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bastet.se.axis.com (bastet.se.axis.com [195.60.68.11]) by mail.openembedded.org (Postfix) with ESMTP id E0DB4744AA for ; Sat, 2 Jun 2018 19:30:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 2F4C91816A for ; Sat, 2 Jun 2018 21:30:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id Wwpb-kZM2EJq for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 96E3C1814A for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83D241E057 for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7830D1E056 for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from seth.se.axis.com (unknown [10.0.2.172]) by boulder03.se.axis.com (Postfix) with ESMTP for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from saur-2.se.axis.com (saur-2.se.axis.com [10.92.3.2]) by seth.se.axis.com (Postfix) with ESMTP id 6A21C2534 for ; Sat, 2 Jun 2018 21:30:43 +0200 (CEST) Received: from saur-2.se.axis.com (localhost [127.0.0.1]) by saur-2.se.axis.com (8.14.5/8.14.5) with ESMTP id w52JUYJN014691 for ; Sat, 2 Jun 2018 21:30:34 +0200 Received: (from pkj@localhost) by saur-2.se.axis.com (8.14.5/8.14.5/Submit) id w52JUYMw014690 for openembedded-core@lists.openembedded.org; Sat, 2 Jun 2018 21:30:34 +0200 From: Peter Kjellerstedt To: openembedded-core@lists.openembedded.org Date: Sat, 2 Jun 2018 21:30:33 +0200 Message-Id: <20180602193033.14641-2-pkj@axis.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180602193033.14641-1-pkj@axis.com> References: <20180602193033.14641-1-pkj@axis.com> X-TM-AS-GCONF: 00 Subject: [PATCHv2 2/2] oe-pkgdata-util: package-info: Re-add support for the --extra option X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jun 2018 19:30:44 -0000 Commit 64d3ce83 broke the --extra option. Signed-off-by: Peter Kjellerstedt --- scripts/oe-pkgdata-util | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 965f473725..bd12047ea5 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -287,8 +287,11 @@ def lookup_recipe(args): def package_info(args): def parse_pkgdatafile(pkgdatafile): vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE'] + if args.extra: + vars += args.extra with open(pkgdatafile, 'r') as f: vals = dict() + extra = '' for line in f: for var in vars: m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line) @@ -306,7 +309,12 @@ def package_info(args): recipe_version = vals['PE'] + ":" + recipe_version if 'PR' in vals: recipe_version = recipe_version + "-" + vals['PR'] - print("%s %s %s %s %s" % (pkg, pkg_version, recipe, recipe_version, pkg_size)) + if args.extra: + for var in args.extra: + if var in vals: + val = re.sub(r'\s+', ' ', vals[var]) + extra += ' "%s"' % val + print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, recipe_version, pkg_size, extra)) # Handle both multiple arguments and multiple values within an arg (old syntax) packages = [] -- 2.12.0