diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 2d8aeba037..1cba5ee968 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -668,7 +668,7 @@ class RpmPM(PackageManager): | |||
668 | self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name) | 668 | self.saved_packaging_data = self.d.expand('${T}/saved_packaging_data/%s' % self.task_name) |
669 | if not os.path.exists(self.d.expand('${T}/saved_packaging_data')): | 669 | if not os.path.exists(self.d.expand('${T}/saved_packaging_data')): |
670 | bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data')) | 670 | bb.utils.mkdirhier(self.d.expand('${T}/saved_packaging_data')) |
671 | self.packaging_data_dirs = ['var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf'] | 671 | self.packaging_data_dirs = ['etc/rpm', 'etc/rpmrc', 'etc/dnf', 'var/lib/rpm', 'var/lib/dnf', 'var/cache/dnf'] |
672 | self.solution_manifest = self.d.expand('${T}/saved/%s_solution' % | 672 | self.solution_manifest = self.d.expand('${T}/saved/%s_solution' % |
673 | self.task_name) | 673 | self.task_name) |
674 | if not os.path.exists(self.d.expand('${T}/saved')): | 674 | if not os.path.exists(self.d.expand('${T}/saved')): |
@@ -832,7 +832,10 @@ class RpmPM(PackageManager): | |||
832 | for i in self.packaging_data_dirs: | 832 | for i in self.packaging_data_dirs: |
833 | source_dir = oe.path.join(self.target_rootfs, i) | 833 | source_dir = oe.path.join(self.target_rootfs, i) |
834 | target_dir = oe.path.join(self.saved_packaging_data, i) | 834 | target_dir = oe.path.join(self.saved_packaging_data, i) |
835 | shutil.copytree(source_dir, target_dir, symlinks=True) | 835 | if os.path.isdir(source_dir): |
836 | shutil.copytree(source_dir, target_dir, symlinks=True) | ||
837 | elif os.path.isfile(source_dir): | ||
838 | shutil.copy2(source_dir, target_dir) | ||
836 | 839 | ||
837 | def recovery_packaging_data(self): | 840 | def recovery_packaging_data(self): |
838 | # Move the rpmlib back | 841 | # Move the rpmlib back |
@@ -842,9 +845,10 @@ class RpmPM(PackageManager): | |||
842 | if os.path.exists(target_dir): | 845 | if os.path.exists(target_dir): |
843 | bb.utils.remove(target_dir, True) | 846 | bb.utils.remove(target_dir, True) |
844 | source_dir = oe.path.join(self.saved_packaging_data, i) | 847 | source_dir = oe.path.join(self.saved_packaging_data, i) |
845 | shutil.copytree(source_dir, | 848 | if os.path.isdir(source_dir): |
846 | target_dir, | 849 | shutil.copytree(source_dir, target_dir, symlinks=True) |
847 | symlinks=True) | 850 | elif os.path.isfile(source_dir): |
851 | shutil.copy2(source_dir, target_dir) | ||
848 | 852 | ||
849 | def list_installed(self): | 853 | def list_installed(self): |
850 | output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"], | 854 | output = self._invoke_dnf(["repoquery", "--installed", "--queryformat", "Package: %{name} %{arch} %{version} %{name}-%{version}-%{release}.%{arch}.rpm\nDependencies:\n%{requires}\nRecommendations:\n%{recommends}\nDependenciesEndHere:\n"], |