diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package_manager.py | 15 | ||||
-rw-r--r-- | meta/lib/oe/rootfs.py | 5 |
2 files changed, 12 insertions, 8 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 69bef1dfbc..c9a8084bf2 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -578,7 +578,8 @@ class RpmPM(PackageManager): | |||
578 | self.fullpkglist = list() | 578 | self.fullpkglist = list() |
579 | self.deploy_dir = self.d.getVar('DEPLOY_DIR_RPM', True) | 579 | self.deploy_dir = self.d.getVar('DEPLOY_DIR_RPM', True) |
580 | self.etcrpm_dir = os.path.join(self.target_rootfs, "etc/rpm") | 580 | self.etcrpm_dir = os.path.join(self.target_rootfs, "etc/rpm") |
581 | self.install_dir = os.path.join(self.target_rootfs, "install") | 581 | self.install_dir_name = "oe_install" |
582 | self.install_dir_path = os.path.join(self.target_rootfs, self.install_dir_name) | ||
582 | self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm") | 583 | self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm") |
583 | self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart") | 584 | self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart") |
584 | self.smart_opt = "--quiet --data-dir=" + os.path.join(target_rootfs, | 585 | self.smart_opt = "--quiet --data-dir=" + os.path.join(target_rootfs, |
@@ -749,9 +750,9 @@ class RpmPM(PackageManager): | |||
749 | bb.utils.mkdirhier(self.etcrpm_dir) | 750 | bb.utils.mkdirhier(self.etcrpm_dir) |
750 | 751 | ||
751 | # Setup temporary directory -- install... | 752 | # Setup temporary directory -- install... |
752 | if os.path.exists(self.install_dir): | 753 | if os.path.exists(self.install_dir_path): |
753 | bb.utils.remove(self.install_dir, True) | 754 | bb.utils.remove(self.install_dir_path, True) |
754 | bb.utils.mkdirhier(os.path.join(self.install_dir, 'tmp')) | 755 | bb.utils.mkdirhier(os.path.join(self.install_dir_path, 'tmp')) |
755 | 756 | ||
756 | channel_priority = 5 | 757 | channel_priority = 5 |
757 | platform_dir = os.path.join(self.etcrpm_dir, "platform") | 758 | platform_dir = os.path.join(self.etcrpm_dir, "platform") |
@@ -838,7 +839,7 @@ class RpmPM(PackageManager): | |||
838 | self._invoke_smart('config --set rpm-dbpath=/var/lib/rpm') | 839 | self._invoke_smart('config --set rpm-dbpath=/var/lib/rpm') |
839 | self._invoke_smart('config --set rpm-extra-macros._var=%s' % | 840 | self._invoke_smart('config --set rpm-extra-macros._var=%s' % |
840 | self.d.getVar('localstatedir', True)) | 841 | self.d.getVar('localstatedir', True)) |
841 | cmd = 'config --set rpm-extra-macros._tmppath=/install/tmp' | 842 | cmd = "config --set rpm-extra-macros._tmppath=/%s/tmp" % (self.install_dir_name) |
842 | 843 | ||
843 | prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True) | 844 | prefer_color = self.d.getVar('RPM_PREFER_ELF_ARCH', True) |
844 | if prefer_color: | 845 | if prefer_color: |
@@ -992,7 +993,7 @@ class RpmPM(PackageManager): | |||
992 | cmd += "--dbpath=/var/lib/rpm " | 993 | cmd += "--dbpath=/var/lib/rpm " |
993 | cmd += "--define='_cross_scriptlet_wrapper %s' " % \ | 994 | cmd += "--define='_cross_scriptlet_wrapper %s' " % \ |
994 | self.scriptlet_wrapper | 995 | self.scriptlet_wrapper |
995 | cmd += "--define='_tmppath /install/tmp' %s" % ' '.join(pkgs) | 996 | cmd += "--define='_tmppath /%s/tmp' %s" % (self.install_dir_name, ' '.join(pkgs)) |
996 | else: | 997 | else: |
997 | # for pkg in pkgs: | 998 | # for pkg in pkgs: |
998 | # bb.note('Debug: What required: %s' % pkg) | 999 | # bb.note('Debug: What required: %s' % pkg) |
@@ -1027,7 +1028,7 @@ class RpmPM(PackageManager): | |||
1027 | bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/opkg'), True) | 1028 | bb.utils.remove(os.path.join(self.target_rootfs, 'var/lib/opkg'), True) |
1028 | 1029 | ||
1029 | # remove temp directory | 1030 | # remove temp directory |
1030 | bb.utils.remove(self.d.expand('${IMAGE_ROOTFS}/install'), True) | 1031 | bb.utils.remove(self.install_dir_path, True) |
1031 | 1032 | ||
1032 | def backup_packaging_data(self): | 1033 | def backup_packaging_data(self): |
1033 | # Save the rpmlib for increment rpm image generation | 1034 | # Save the rpmlib for increment rpm image generation |
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): | |||
409 | # __db.00* (Berkeley DB files that hold locks, rpm specific environment | 409 | # __db.00* (Berkeley DB files that hold locks, rpm specific environment |
410 | # settings, etc.), that should not get into the final rootfs | 410 | # settings, etc.), that should not get into the final rootfs |
411 | self.pm.unlock_rpm_db() | 411 | self.pm.unlock_rpm_db() |
412 | bb.utils.remove(self.image_rootfs + "/install", True) | 412 | if os.path.isdir(self.pm.install_dir_path + "/tmp") and not os.listdir(self.pm.install_dir_path + "/tmp"): |
413 | bb.utils.remove(self.pm.install_dir_path + "/tmp", True) | ||
414 | if os.path.isdir(self.pm.install_dir_path) and not os.listdir(self.pm.install_dir_path): | ||
415 | bb.utils.remove(self.pm.install_dir_path, True) | ||
413 | 416 | ||
414 | 417 | ||
415 | class DpkgRootfs(Rootfs): | 418 | class DpkgRootfs(Rootfs): |