From 756e263531a2f33d43fb1c378e315d4e1a7a8d5b Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 7 Mar 2005 15:00:34 +0000 Subject: Factorisation of paths --- gendistrib | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gendistrib b/gendistrib index 55b0708..cd88219 100755 --- a/gendistrib +++ b/gendistrib @@ -250,12 +250,11 @@ $urpm->build_base_files( compss => $urpmfiles{compss}, ); -if (-f $distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir') . '/media.cfg') { - if (! -f $distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir') . '/hdlists' || - ((stat($distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir') . '/media.cfg'))[9] > - (stat($distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir') . '/hdlists'))[9])) { - print STDERR "Write hdlists file\n" unless($nooutput); - $distrib->write_hdlists(); +my $infodir = $distrib->getpath(undef, 'root') . '/' . $distrib->getpath(undef, 'infodir'); +if (-f $infodir . '/media.cfg') { + if (! -f $infodir . '/hdlists' || ((stat($infodir . '/media.cfg'))[9] > (stat($infodir . '/hdlists'))[9])) { + print STDERR "Write hdlists file\n" unless $nooutput; + $distrib->write_hdlists; } } @@ -274,7 +273,7 @@ unless ($nomd5sum) { chdir $here; } -print STDERR "Building version file\n" unless($nooutput); +print STDERR "Building version file\n" unless $nooutput; $distrib->write_version($urpmfiles{version}); #- check if there are NOTFOUND in dependencies, check if they are in other media, warn the user. -- cgit v1.2.1