From 678c735e601eda23207960585667ef6775148383 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 26 Mar 2012 18:21:24 +0000 Subject: (init_cache) kill unused function --- lib/Iurt/Config.pm | 25 ------------------------- lib/Iurt/DKMS.pm | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'lib') diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm index 9e539a8..173ed9e 100644 --- a/lib/Iurt/Config.pm +++ b/lib/Iurt/Config.pm @@ -15,7 +15,6 @@ our @EXPORT = qw( get_date dump_cache dump_cache_par - init_cache get_maint get_date get_prefix @@ -123,30 +122,6 @@ sub get_package_prefix { my ($prefix2) = $rpm =~ /^(\@\d+:)/; "$prefix1$prefix2"; } -=head2 init_cache($run, $config) - -Create a string based on the current date and time -I<%run> is the current running options -I<%config> is the current configuration values -Initialize the cache - -=cut - -sub init_cache { - my ($run, $config, $empty) = @_; - my $program_name = $run->{program_name}; - my $cachefile = "$config->{cache_home}/$program_name.cache"; - my $cache; - if (-f $cachefile) { - plog('DEBUG', "loading cache file $cachefile"); - $cache = eval(cat_($cachefile)) or print "FATAL $program_name: could not load cache $cachefile ($!)\n"; - } else { - $cache = $empty; - } - $run->{cachefile} = $cachefile; - $run->{cache} = $cache; - $cache; -} =head2 dump_cache($run, $config) diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm index 5998ba5..7554d0d 100644 --- a/lib/Iurt/DKMS.pm +++ b/lib/Iurt/DKMS.pm @@ -4,7 +4,7 @@ use strict; use base qw(Exporter); use MDV::Distribconf::Build; use Iurt::Chroot qw(clean_chroot add_local_user dump_rpmmacros); -use Iurt::Config qw(get_maint get_prefix dump_cache init_cache); +use Iurt::Config qw(get_maint get_prefix dump_cache); use Iurt::Mail qw(sendmail); use File::NCopy qw(copy); use Iurt::Process qw(sudo); -- cgit v1.2.1