]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oe/package_manager: make sure to not remove packages in apt install
authorJan Luebbe <jlu@pengutronix.de>
Wed, 1 Apr 2020 14:58:01 +0000 (16:58 +0200)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 6 Apr 2020 07:17:05 +0000 (15:17 +0800)
apt install can decide to remove already installed packages if there are
conflicts. Avoid this by explicitly specifying --no-remove. This will
then cause a "E: Packages need to be removed but remove is disabled."
message.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9605a488b55042add012e9aeef13ab3f4e70e6e5)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/lib/oe/package_manager.py

index 7c373715adf9ae3c69ec23a93d5e3e54dd958abb..61206daeaa8a608200594d9847097bf096b23fd8 100644 (file)
@@ -1619,7 +1619,7 @@ class DpkgPM(OpkgDpkgPM):
 
         os.environ['APT_CONFIG'] = self.apt_conf_file
 
-        cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \
+        cmd = "%s %s install --force-yes --allow-unauthenticated --no-remove %s" % \
               (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
 
         try: