diff mbox series

package_manager: implement PACKAGE_EXCLUDE for opkg

Message ID 20181017165008.5385-1-ross.burton@intel.com
State Accepted
Commit 6cc99d48c57cb22104980d0d758540e06cb7b80d
Headers show
Series package_manager: implement PACKAGE_EXCLUDE for opkg | expand

Commit Message

Ross Burton Oct. 17, 2018, 4:50 p.m. UTC
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>

---
 meta/lib/oe/package_manager.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 1ab3761c24a..b32d6464b21 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1334,7 +1334,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