]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs: only use dnf to cleanup if package management is enabled
authorRoss Burton <ross.burton@intel.com>
Fri, 27 Apr 2018 15:56:12 +0000 (16:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 May 2018 12:09:01 +0000 (13:09 +0100)
If package management has been disabled then we've already removed all the
state, and running 'dnf clean all' again will simply recreate a lot of the
files.

(From OE-Core rev: 4524068ad2248b37fb08a24828d018e2f7e6a761)

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

index f8f717c0505ff388c9be21ab04da13ff95071434..c51e76ddfcbcad4df1d8357cc5228ec7804373c1 100644 (file)
@@ -472,7 +472,8 @@ class RpmRootfs(Rootfs):
         self._log_check_error()
 
     def _cleanup(self):
-        self.pm._invoke_dnf(["clean", "all"])
+        if bb.utils.contains("IMAGE_FEATURES", "package-management", True, False, self.d):
+            self.pm._invoke_dnf(["clean", "all"])
 
 
 class DpkgOpkgRootfs(Rootfs):