aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2020-04-01 16:58:05 +0200
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-06 15:17:05 +0800
commit71711f5f20fc3744be4c9188a75606f60d524ff9 (patch)
tree208515bda0a1e7b016767846b1495d3961b9b244
parent978eeeb7c975441e5b05253a63b9d954af2b903b (diff)
downloadopenembedded-core-contrib-71711f5f20fc3744be4c9188a75606f60d524ff9.tar.gz
openembedded-core-contrib-71711f5f20fc3744be4c9188a75606f60d524ff9.tar.bz2
openembedded-core-contrib-71711f5f20fc3744be4c9188a75606f60d524ff9.zip
lib/oe/package_manager: don't try to rm /var/lib/opkg
As opkglibdir starts with a /, os.path.join will ignore self.target_rootfs, leading to an attempt to remove /var/lib/opkg. This only fails if it exists on the host, explaining why this remained undiscovered for long. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fc974977cea389f54e7fc7de7b1c8fd3d8bafe58) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--meta/lib/oe/package_manager.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 4d9e501f0ed..e0b15dc9b45 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1791,8 +1791,7 @@ class DpkgPM(OpkgDpkgPM):
open(os.path.join(target_dpkg_dir, "available"), "w+").close()
def remove_packaging_data(self):
- bb.utils.remove(os.path.join(self.target_rootfs,
- self.d.getVar('opkglibdir')), True)
+ bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True)
bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
def fix_broken_dependencies(self):