aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/package_manager.py3
-rwxr-xr-xscripts/oe-pkgdata-util12
2 files changed, 12 insertions, 3 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 1c64205330..1c33b0fb64 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -519,6 +519,9 @@ class PackageManager(object):
cmd = [bb.utils.which(os.getenv('PATH'), "oe-pkgdata-util"),
"glob", self.d.getVar('PKGDATA_DIR', True), installed_pkgs_file,
globs]
+ exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True)
+ if exclude:
+ cmd.extend(['-x', exclude])
try:
bb.note("Installing complementary packages ...")
complementary_pkgs = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index a373116b2c..49009559bb 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 = "Report all SRCREV values, not just ones where AUTOREV has been used",
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":