Fixes for PACKAGE_EXCLUDE_COMPLEMENTARY
cover Fixes for PACKAGE_EXCLUDE_COMPLEMENTARY
The first patch fix a problem with PACKAGE_EXCLUDE_COMPLEMENTARY where it could not contain a regular expression that began with a dash, and the second makes it possible to specify multiple, whitespace separated regular expressions in PACKAGE_EXCLUDE_COMPLEMENTARY.
//Peter
The following changes since commit 4189a1977e65f71ddb8fc0498bcef91754c673d8:
bitbake: toaster: add Font Awesome license (2016-10-05 10:28:53 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/complementary_packages
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/complementary_packages
Peter Kjellerstedt (2):
package_manager.py: Allow a leading - in PACKAGE_EXCLUDE_COMPLEMENTARY package_manager.py: Allow multiple regexps in
PACKAGE_EXCLUDE_COMPLEMENTARY
meta/lib/oe/package_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.9.0
PATCH 1/2 package_manager.py: Allow a leading - in PACKAGE_EXCLUDE_COMPLEMENTARY
This allows a regular expression specified in PACKAGE_EXCLUDE_COMPLEMENTARY to have a leading dash. Without this, the dash was treated by oe-pkgdata-util as the beginning of a command line argument. E.g., if PACKAGE_EXCLUDE_COMPLEMENTARY = "-foo$", it resulted in an error like:
ERROR: <imagename>-1.0-r0 do_populate_sdk: Could not compute complementary packages list. Command '<topdir>/scripts/oe-pkgdata-util -p <builddir>/tmp/sysroots/<machine>/pkgdata glob <workdir>/installed_pkgs.txt *-dev *-dbg -x -foo$' returned 2:
ERROR: argument -x/--exclude: expected one argument
usage: oe-pkgdata-util glob [-h] [-x EXCLUDE] pkglistfile glob [glob ...]
--- meta/lib/oe/package_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package_manager.py +1 -1
@@ -598,7 +598,7 @@ class PackageManager(object, metaclass=ABCMeta): globs] exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True) if exclude: - cmd.extend(['-x', exclude]) + cmd.extend(['--exclude=' + exclude]) try: bb.note("Installing complementary packages ...") bb.note('Running %s' % cmd)
Signature · 1 line
2.9.0
PATCH 2/2 package_manager.py: Allow multiple regexps in PACKAGE_EXCLUDE_COMPLEMENTARY
In reply to Peter KjellerstedtThe PACKAGE_EXCLUDE_COMPLEMENTARY variable can currently only contain one regular expression. This makes it hard to add to it from different configuration files and recipes.
Allowing it to contain multiple, whitespace separated regular expressions should be backwards compatible as it is assumed that whitespace is not used in package names and thus is not used in any existing instances of the variable.
After this change, the following three examples should be equivalent:
PACKAGE_EXCLUDE_COMPLEMENTARY = "foo|bar"
PACKAGE_EXCLUDE_COMPLEMENTARY = "foo bar"
PACKAGE_EXCLUDE_COMPLEMENTARY = "foo"
PACKAGE_EXCLUDE_COMPLEMENTARY += "bar"
--- meta/lib/oe/package_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package_manager.py +1 -1
@@ -598,7 +598,7 @@ class PackageManager(object, metaclass=ABCMeta): globs] exclude = self.d.getVar('PACKAGE_EXCLUDE_COMPLEMENTARY', True) if exclude: - cmd.extend(['--exclude=' + exclude]) + cmd.extend(['--exclude=' + '|'.join(exclude.split())]) try: bb.note("Installing complementary packages ...") bb.note('Running %s' % cmd)
Signature · 1 line
2.9.0