summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2020-04-01 16:58:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-17 08:29:02 +0100
commit1ee8c1b72c2816852e13ae430a395c9ab1bac850 (patch)
tree6825ee5487c335bed1c618c906e26bbe4af25c9e /meta
parent7f1063ed94096a5f9d4965814c01e839df955307 (diff)
downloadpoky-1ee8c1b72c2816852e13ae430a395c9ab1bac850.tar.gz
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. (From OE-Core rev: 71711f5f20fc3744be4c9188a75606f60d524ff9) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 4d9e501f0e..e0b15dc9b4 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1791,8 +1791,7 @@ class DpkgPM(OpkgDpkgPM):
1791 open(os.path.join(target_dpkg_dir, "available"), "w+").close() 1791 open(os.path.join(target_dpkg_dir, "available"), "w+").close()
1792 1792
1793 def remove_packaging_data(self): 1793 def remove_packaging_data(self):
1794 bb.utils.remove(os.path.join(self.target_rootfs, 1794 bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True)
1795 self.d.getVar('opkglibdir')), True)
1796 bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True) 1795 bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True)
1797 1796
1798 def fix_broken_dependencies(self): 1797 def fix_broken_dependencies(self):