diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-16 17:57:03 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-17 14:20:45 +0000 |
commit | fdb5639e906779814e8454b8fc696c25e8c7a870 (patch) | |
tree | c6f81c2538306d0ee2a593146e8e7c01038c92e6 /scripts/oe-pkgdata-util | |
parent | 3d2d158e34224dff7ec27be341044332798c5e32 (diff) | |
download | poky-fdb5639e906779814e8454b8fc696c25e8c7a870.tar.gz |
lib/oe/package_manager: support exclusion from complementary glob process by regex
Sometimes you do not want certain packages to be installed when
installing complementary packages, e.g. when using dev-pkgs in
IMAGE_FEATURES you may not want to install all packages from a
particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY
variable to allow specifying regexes to match packages to exclude.
(From OE-Core rev: d4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pkgdata-util')
-rwxr-xr-x | scripts/oe-pkgdata-util | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 5a9f89b31b..b075775b8f 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util | |||
@@ -55,7 +55,10 @@ def glob(args): | |||
55 | logger.error('Unable to find package list file %s' % args.pkglistfile) | 55 | logger.error('Unable to find package list file %s' % args.pkglistfile) |
56 | sys.exit(1) | 56 | sys.exit(1) |
57 | 57 | ||
58 | skipregex = re.compile("-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-") | 58 | skipval = "-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-" |
59 | if args.exclude: | ||
60 | skipval += "|" + args.exclude | ||
61 | skipregex = re.compile(skipval) | ||
59 | 62 | ||
60 | mappedpkgs = set() | 63 | mappedpkgs = set() |
61 | with open(args.pkglistfile, 'r') as f: | 64 | with open(args.pkglistfile, 'r') as f: |
@@ -466,6 +469,7 @@ def main(): | |||
466 | description='Expands one or more glob expressions over the packages listed in pkglistfile') | 469 | description='Expands one or more glob expressions over the packages listed in pkglistfile') |
467 | parser_glob.add_argument('pkglistfile', help='File listing packages (one package name per line)') | 470 | parser_glob.add_argument('pkglistfile', help='File listing packages (one package name per line)') |
468 | parser_glob.add_argument('glob', nargs="+", help='Glob expression for package names, e.g. *-dev') | 471 | parser_glob.add_argument('glob', nargs="+", help='Glob expression for package names, e.g. *-dev') |
472 | parser_glob.add_argument('-x', '--exclude', help='Exclude packages matching specified regex from the glob operation') | ||
469 | parser_glob.set_defaults(func=glob) | 473 | parser_glob.set_defaults(func=glob) |
470 | 474 | ||
471 | 475 | ||