aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-26 18:21:24 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-26 18:21:24 +0000
commit678c735e601eda23207960585667ef6775148383 (patch)
tree8eb8c23733f13cd2a88e1829ad912266bc9095a3 /lib
parentd4721860ea0f0774f7c316f6c6f2e9c9e634fc2e (diff)
downloadiurt-678c735e601eda23207960585667ef6775148383.tar
iurt-678c735e601eda23207960585667ef6775148383.tar.gz
iurt-678c735e601eda23207960585667ef6775148383.tar.bz2
iurt-678c735e601eda23207960585667ef6775148383.tar.xz
iurt-678c735e601eda23207960585667ef6775148383.zip
(init_cache) kill unused function
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Config.pm25
-rw-r--r--lib/Iurt/DKMS.pm2
2 files changed, 1 insertions, 26 deletions
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);