]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-pkgdata-util: avoid returning skipped packages
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 16 Sep 2015 02:04:10 +0000 (19:04 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Sep 2015 16:52:49 +0000 (17:52 +0100)
The skipped packages may be pulled in by another package, for example,
when libc6-dbg is already installed and should be skipped, but it would
be pulled in by libsegfault, this patch fixes the issue.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-pkgdata-util

index b075775b8ff084090095cc9d18f40c5bec261a6a..116cfae742f18fcd9ba1bdbf2d42a0a2115f99db 100755 (executable)
@@ -60,6 +60,7 @@ def glob(args):
         skipval += "|" + args.exclude
     skipregex = re.compile(skipval)
 
+    skippedpkgs = set()
     mappedpkgs = set()
     with open(args.pkglistfile, 'r') as f:
         for line in f:
@@ -73,6 +74,7 @@ def glob(args):
             # Skip packages for which there is no point applying globs
             if skipregex.search(pkg):
                 logger.debug("%s -> !!" % pkg)
+                skippedpkgs.add(pkg)
                 continue
 
             # Skip packages that already match the globs, so if e.g. a dev package
@@ -84,6 +86,7 @@ def glob(args):
                     already = True
                     break
             if already:
+                skippedpkgs.add(pkg)
                 logger.debug("%s -> !" % pkg)
                 continue
 
@@ -152,7 +155,7 @@ def glob(args):
 
     logger.debug("------")
 
-    print("\n".join(mappedpkgs))
+    print("\n".join(mappedpkgs - skippedpkgs))
 
 def read_value(args):
     # Handle both multiple arguments and multiple values within an arg (old syntax)