diff options
author | Jan Luebbe <jlu@pengutronix.de> | 2020-04-01 16:58:05 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-02 15:24:59 +0100 |
commit | f07c7dfc3318bf2476be1f1bbc4dd105af73c81c (patch) | |
tree | 52e63ed1c773279099767bb6c5724e10b131da0e /meta/lib | |
parent | cb180dc45fbd8ad11658348e856e5f6b9d8dc2e8 (diff) | |
download | poky-f07c7dfc3318bf2476be1f1bbc4dd105af73c81c.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: fc974977cea389f54e7fc7de7b1c8fd3d8bafe58)
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package_manager.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 2a5d7ef539..b0660411ea 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -1796,8 +1796,7 @@ class DpkgPM(OpkgDpkgPM): | |||
1796 | open(os.path.join(target_dpkg_dir, "available"), "w+").close() | 1796 | open(os.path.join(target_dpkg_dir, "available"), "w+").close() |
1797 | 1797 | ||
1798 | def remove_packaging_data(self): | 1798 | def remove_packaging_data(self): |
1799 | bb.utils.remove(os.path.join(self.target_rootfs, | 1799 | bb.utils.remove(self.target_rootfs + self.d.getVar('opkglibdir'), True) |
1800 | self.d.getVar('opkglibdir')), True) | ||
1801 | bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True) | 1800 | bb.utils.remove(self.target_rootfs + "/var/lib/dpkg/", True) |
1802 | 1801 | ||
1803 | def fix_broken_dependencies(self): | 1802 | def fix_broken_dependencies(self): |