mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 11:28:58 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3d2d158e34
commit
fdb5639e90
@@ -55,7 +55,10 @@ def glob(args):
|
||||
logger.error('Unable to find package list file %s' % args.pkglistfile)
|
||||
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 args.exclude:
|
||||
skipval += "|" + args.exclude
|
||||
skipregex = re.compile(skipval)
|
||||
|
||||
mappedpkgs = set()
|
||||
with open(args.pkglistfile, 'r') as f:
|
||||
@@ -466,6 +469,7 @@ def main():
|
||||
description='Expands one or more glob expressions over the packages listed in pkglistfile')
|
||||
parser_glob.add_argument('pkglistfile', help='File listing packages (one package name per line)')
|
||||
parser_glob.add_argument('glob', nargs="+", help='Glob expression for package names, e.g. *-dev')
|
||||
parser_glob.add_argument('-x', '--exclude', help='Exclude packages matching specified regex from the glob operation')
|
||||
parser_glob.set_defaults(func=glob)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user