diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-18 10:23:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-03 14:33:36 +0000 |
commit | e848484989307ae6826ba0f5217f7702322181e3 (patch) | |
tree | 90f416d74be4d553b50cf52eba85ce1cdc04edd8 /scripts/oe-pkgdata-util | |
parent | 5102848f97a1821b12e83b2c415ce730c1b35f1b (diff) | |
download | openembedded-core-e848484989307ae6826ba0f5217f7702322181e3.tar.gz openembedded-core-e848484989307ae6826ba0f5217f7702322181e3.tar.bz2 openembedded-core-e848484989307ae6826ba0f5217f7702322181e3.zip |
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 master rev: d4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@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 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index bf8754749e..28a9f8362b 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -28,7 +28,7 @@ import re import optparse from collections import defaultdict -def glob(args, usage, debug=False): +def glob(args, usage, debug=False, exclude=""): if len(args) < 3: usage() sys.exit(1) @@ -45,7 +45,10 @@ def glob(args, usage, debug=False): print('ERROR: Unable to find package list file %s' % pkglist_file) sys.exit(1) - skipregex = re.compile("-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-") + skipval = "-locale-|^locale-base-|-dev$|-doc$|-dbg$|-staticdev$|^kernel-module-" + if exclude: + skipval += "|" + exclude + skipregex = re.compile(skipval) mappedpkgs = set() with open(pkglist_file, 'r') as f: @@ -305,6 +308,9 @@ Available commands: parser.add_option("-d", "--debug", help = "Enable debug output", action="store_true", dest="debug", default=False) + parser.add_option("-x", "--exclude", + help = "Exclude packages matching specified regex from the glob operation", + action="store", type="string", dest="exclude", default="") options, args = parser.parse_args(sys.argv) args = args[1:] @@ -314,7 +320,7 @@ Available commands: sys.exit(1) if args[0] == "glob": - glob(args[1:], parser.print_help, options.debug) + glob(args[1:], parser.print_help, options.debug, options.exclude) elif args[0] == "lookup-pkg": lookup_pkg(args[1:], parser.print_help, options.debug) elif args[0] == "lookup-recipe": |