]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_manager/ipk: improve remove_packaging_data
authorRoss Burton <ross@burtonini.com>
Tue, 1 Dec 2020 15:23:05 +0000 (15:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 6 Dec 2020 23:16:50 +0000 (23:16 +0000)
/var/cache/opkg wasn't being deleted, and /var/lib/opkg doesn't need
to exist as there are no lockfiles that write into it after this step.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager/ipk/__init__.py

index 2753b139ed126b1c7052417cf3342111ed0d60d7..da488c1c7f0a08a4e7584c9d8b88c4a4a935432f 100644 (file)
@@ -403,9 +403,9 @@ class OpkgPM(OpkgDpkgPM):
             bb.fatal(result)
 
     def remove_packaging_data(self):
+        cachedir = oe.path.join(self.target_rootfs, self.d.getVar("localstatedir"), "cache", "opkg")
         bb.utils.remove(self.opkg_dir, True)
-        # create the directory back, it's needed by PM lock
-        bb.utils.mkdirhier(self.opkg_dir)
+        bb.utils.remove(cachedir, True)
 
     def remove_lists(self):
         if not self.from_feeds: