[2/2] rootfs: only use dnf to cleanup if package management is enabled

Message ID 20180427155823.30464-2-ross.burton@intel.com
State Accepted
Commit f23332dc6a0c5b49246b4d17ec4e6fcad0cb7d47
Headers show
Series
  • [1/2] package_manager: expand the removal list for RPM
Related show

Commit Message

Ross Burton April 27, 2018, 3:58 p.m.
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/lib/oe/rootfs.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index f8f717c0505..c51e76ddfcb 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -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):