aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-03-07 15:00:34 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-03-07 15:00:34 +0000
commit756e263531a2f33d43fb1c378e315d4e1a7a8d5b (patch)
tree826ca2e14cacb6ef80861bd37a6ba862e9b4dbe8
parent4be46a018249fd6c873118662c2a883f0b8d8d6f (diff)
downloadrpmtools-756e263531a2f33d43fb1c378e315d4e1a7a8d5b.tar
rpmtools-756e263531a2f33d43fb1c378e315d4e1a7a8d5b.tar.gz
rpmtools-756e263531a2f33d43fb1c378e315d4e1a7a8d5b.tar.bz2
rpmtools-756e263531a2f33d43fb1c378e315d4e1a7a8d5b.tar.xz
rpmtools-756e263531a2f33d43fb1c378e315d4e1a7a8d5b.zip
Factorisation of paths
-rwxr-xr-xgendistrib13
1 files 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.