From f9eacfa91548bbca696c78883cb939f767a7b43a Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 3 Apr 2012 23:29:50 +0000 Subject: Drop check_build_chroot, its only goal is to force rebuilding tarball even if no package has changed over 7 days Also, do not recreate chroot from Urpmi.pm --- lib/Iurt/Chroot.pm | 15 --------------- lib/Iurt/Urpmi.pm | 3 +-- 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'lib') diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 01cd514..32232a3 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -20,7 +20,6 @@ our @EXPORT = qw( remove_chroot create_chroot create_build_chroot - check_build_chroot ); my $sudo = '/usr/bin/sudo'; @@ -409,18 +408,4 @@ sub build_chroot { 1; } -sub check_build_chroot { - my ($chroot, $chroot_tar, $run, $config) = @_; - - plog('DEBUG', "checking basesystem tar"); - - my (@stat) = stat $chroot_tar; - - if (time -$stat[9] > 604800) { - plog('WARN', "chroot tarball too old, force rebuild"); - sudo($config, '--rm', '-r', $chroot, $chroot_tar); - } - create_build_chroot($chroot, $chroot_tar, $run, $config); -} - 1; diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 5b28c8d..a70febf 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -5,7 +5,7 @@ use RPM4::Header; use File::Basename; use File::NCopy qw(copy); use MDV::Distribconf::Build; -use Iurt::Chroot qw(add_local_user create_temp_chroot check_build_chroot); +use Iurt::Chroot qw(add_local_user create_temp_chroot); use Iurt::Process qw(perform_command clean_process sudo); use Iurt::Config qw(dump_cache_par get_maint get_package_prefix); use Iurt::Util qw(plog); @@ -642,7 +642,6 @@ sub recreate_srpm { $run, $config, $cache, %opt)) { plog("ERROR: chrooting failed (retry $opt{retry}") if $run->{debug}; if ($opt{retry}) { - check_build_chroot($run->{chroot_path}, $run->{chroot_tar}, $run, $config) or return; return -1; } return; -- cgit v1.2.1