diff options
author | Pascal Terjan <pterjan@mageia.org> | 2017-07-29 13:49:51 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2017-10-02 22:58:14 +0100 |
commit | a1e34113fcb9538ad8a29eec80075dff04253068 (patch) | |
tree | cd3b1af2f7d74bc87af44106f0764849acc9ffcf /lib | |
parent | 536be8dbb27733521e3cbb312fbcbf6adbd36362 (diff) | |
download | iurt-a1e34113fcb9538ad8a29eec80075dff04253068.tar iurt-a1e34113fcb9538ad8a29eec80075dff04253068.tar.gz iurt-a1e34113fcb9538ad8a29eec80075dff04253068.tar.bz2 iurt-a1e34113fcb9538ad8a29eec80075dff04253068.tar.xz iurt-a1e34113fcb9538ad8a29eec80075dff04253068.zip |
Allow not checking chroot freshness
This is useful to improve performance for for autobuild where we
build all packages on a snapshot of the distribution.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Chroot.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 0e5eccf..362c7e7 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -270,6 +270,7 @@ sub check_mounted { sub check_chroot_need_update { my ($tmp_chroot, $run) = @_; + return 0; my $tmp_urpmi = mktemp("$tmp_chroot/tmp.XXXXXX"); mkdir_p("$tmp_urpmi/tmp"); my @installed_pkgs = grep { !/^gpg-pubkey/ } chomp_(cat_("$tmp_chroot/var/log/qa")); @@ -331,7 +332,7 @@ sub create_build_chroot_tar { if (!-f $chroot_tar) { plog("rebuild chroot tarball"); $rebuild = 1; - } else { + } elsif (!$run->{fixed_media}) { plog('DEBUG', "decompressing /var/log/qa from $chroot_tar in $tmp_chroot"); sudo($config, '--untar', $chroot_tar, $tmp_chroot, "./var/log/qa"); $rebuild = check_chroot_need_update($tmp_chroot, $run); @@ -368,6 +369,7 @@ sub create_build_chroot_btrfs { plog('NOTIFY', "creating btrfs chroot"); + # TODO: Handle $run{fixed_media} if (check_chroot_need_update($chroot_ref, $run)) { sudo($config, '--btrfs_delete', $chroot_ref); if (!sudo($config, '--btrfs_create', $chroot_ref)) { |