summaryrefslogtreecommitdiff
path: root/meta/lib/oe/rootfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r--meta/lib/oe/rootfs.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 7e8d5d15a2..a18472aeeb 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -409,7 +409,10 @@ class RpmRootfs(Rootfs):
# __db.00* (Berkeley DB files that hold locks, rpm specific environment
# settings, etc.), that should not get into the final rootfs
self.pm.unlock_rpm_db()
- bb.utils.remove(self.image_rootfs + "/install", True)
+ if os.path.isdir(self.pm.install_dir_path + "/tmp") and not os.listdir(self.pm.install_dir_path + "/tmp"):
+ bb.utils.remove(self.pm.install_dir_path + "/tmp", True)
+ if os.path.isdir(self.pm.install_dir_path) and not os.listdir(self.pm.install_dir_path):
+ bb.utils.remove(self.pm.install_dir_path, True)
class DpkgRootfs(Rootfs):