lib/oe/package_manager: make sure to not remove packages in apt install

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.

(From OE-Core rev: 15790fa224f405652e8ccc93c01dee04a7259246)

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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jan Luebbe
2020-04-01 16:58:01 +02:00
committed by Richard Purdie
parent 3e311128b2
commit 5ab3ff5dcc

View 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: