diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2017-02-13 16:44:48 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-14 14:42:17 +0000 |
commit | 67615e01751bdba4e2186c86c44bebd9ded5233b (patch) | |
tree | a0472e225aaa55eaadb10f419867fae3fcb31d0e /meta/lib/oe/rootfs.py | |
parent | d4efcded26706f50f8ca98d76df2b349ed1f1792 (diff) | |
download | poky-67615e01751bdba4e2186c86c44bebd9ded5233b.tar.gz |
rootfs_rpm.bbclass: migrate image creation to dnf
To properly look at this patch, you probably need a side-by-side diff viewing tool.
(From OE-Core rev: 65581c68d130fa74d703f6c3c92560e053857ac7)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r-- | meta/lib/oe/rootfs.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py index 74c643b3b9..5e1c09762a 100644 --- a/meta/lib/oe/rootfs.py +++ b/meta/lib/oe/rootfs.py | |||
@@ -431,6 +431,8 @@ class RpmRootfs(Rootfs): | |||
431 | bb.note('incremental removed: %s' % ' '.join(pkg_to_remove)) | 431 | bb.note('incremental removed: %s' % ' '.join(pkg_to_remove)) |
432 | self.pm.remove(pkg_to_remove) | 432 | self.pm.remove(pkg_to_remove) |
433 | 433 | ||
434 | self.pm.autoremove() | ||
435 | |||
434 | def _create(self): | 436 | def _create(self): |
435 | pkgs_to_install = self.manifest.parse_initial_manifest() | 437 | pkgs_to_install = self.manifest.parse_initial_manifest() |
436 | rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS') | 438 | rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS') |
@@ -444,8 +446,6 @@ class RpmRootfs(Rootfs): | |||
444 | if self.progress_reporter: | 446 | if self.progress_reporter: |
445 | self.progress_reporter.next_stage() | 447 | self.progress_reporter.next_stage() |
446 | 448 | ||
447 | self.pm.dump_all_available_pkgs() | ||
448 | |||
449 | if self.inc_rpm_image_gen == "1": | 449 | if self.inc_rpm_image_gen == "1": |
450 | self._create_incremental(pkgs_to_install) | 450 | self._create_incremental(pkgs_to_install) |
451 | 451 | ||
@@ -480,15 +480,13 @@ class RpmRootfs(Rootfs): | |||
480 | if self.progress_reporter: | 480 | if self.progress_reporter: |
481 | self.progress_reporter.next_stage() | 481 | self.progress_reporter.next_stage() |
482 | 482 | ||
483 | self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart']) | 483 | self._setup_dbg_rootfs(['/etc', '/var/lib/rpm', '/var/cache/dnf', '/var/lib/dnf']) |
484 | 484 | ||
485 | execute_pre_post_process(self.d, rpm_post_process_cmds) | 485 | execute_pre_post_process(self.d, rpm_post_process_cmds) |
486 | 486 | ||
487 | if self.inc_rpm_image_gen == "1": | 487 | if self.inc_rpm_image_gen == "1": |
488 | self.pm.backup_packaging_data() | 488 | self.pm.backup_packaging_data() |
489 | 489 | ||
490 | self.pm.rpm_setup_smart_target_config() | ||
491 | |||
492 | if self.progress_reporter: | 490 | if self.progress_reporter: |
493 | self.progress_reporter.next_stage() | 491 | self.progress_reporter.next_stage() |
494 | 492 | ||
@@ -526,15 +524,7 @@ class RpmRootfs(Rootfs): | |||
526 | self.pm.save_rpmpostinst(pkg) | 524 | self.pm.save_rpmpostinst(pkg) |
527 | 525 | ||
528 | def _cleanup(self): | 526 | def _cleanup(self): |
529 | # during the execution of postprocess commands, rpm is called several | 527 | pass |
530 | # times to get the files installed, dependencies, etc. This creates the | ||
531 | # __db.00* (Berkeley DB files that hold locks, rpm specific environment | ||
532 | # settings, etc.), that should not get into the final rootfs | ||
533 | self.pm.unlock_rpm_db() | ||
534 | if os.path.isdir(self.pm.install_dir_path + "/tmp") and not os.listdir(self.pm.install_dir_path + "/tmp"): | ||
535 | bb.utils.remove(self.pm.install_dir_path + "/tmp", True) | ||
536 | if os.path.isdir(self.pm.install_dir_path) and not os.listdir(self.pm.install_dir_path): | ||
537 | bb.utils.remove(self.pm.install_dir_path, True) | ||
538 | 528 | ||
539 | class DpkgOpkgRootfs(Rootfs): | 529 | class DpkgOpkgRootfs(Rootfs): |
540 | def __init__(self, d, progress_reporter=None, logcatcher=None): | 530 | def __init__(self, d, progress_reporter=None, logcatcher=None): |