summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-10-17 17:50:08 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-18 10:38:57 +0100
commit6cc99d48c57cb22104980d0d758540e06cb7b80d (patch)
tree81225499b18d9f82175adec3cffc7018b46cc69f
parent954a7715763118ba8e15ce7a96a2b82680f4a6c4 (diff)
downloadopenembedded-core-contrib-6cc99d48c57cb22104980d0d758540e06cb7b80d.tar.gz
openembedded-core-contrib-6cc99d48c57cb22104980d0d758540e06cb7b80d.tar.bz2
openembedded-core-contrib-6cc99d48c57cb22104980d0d758540e06cb7b80d.zip
package_manager: implement PACKAGE_EXCLUDE for opkg
opkg has supported the --add-exclude option to install since 0.3.0, so use it to implement support for PACKAGE_EXCLUDE. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/package_manager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 8f4b42b0da..5964c61338 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1322,7 +1322,11 @@ class OpkgPM(OpkgDpkgPM):
if not pkgs:
return
- cmd = "%s %s install %s" % (self.opkg_cmd, self.opkg_args, ' '.join(pkgs))
+ cmd = "%s %s" % (self.opkg_cmd, self.opkg_args)
+ for exclude in (self.d.getVar("PACKAGE_EXCLUDE") or "").split():
+ cmd += " --add-exclude %s" % exclude
+ cmd += " install "
+ cmd += " ".join(pkgs)
os.environ['D'] = self.target_rootfs
os.environ['OFFLINE_ROOT'] = self.target_rootfs