[oe-commits] [openembedded-core] 04/06: oe-pkgdata-util: package-info: Re-add support for the --extra option

git at git.openembedded.org git at git.openembedded.org
Wed Aug 15 11:44:45 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo-next
in repository openembedded-core.

commit ab9e9e8cde1ab5fba3e1c291ccb6f163140c3386
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Sat Jun 2 21:30:33 2018 +0200

    oe-pkgdata-util: package-info: Re-add support for the --extra option
    
    Commit 64d3ce83 broke the --extra option.
    
    (From OE-Core rev: cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c)
    
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 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 a4e8413..e6c9df9 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 = []

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list