diff options
author | Francois Pons <fpons@mandriva.com> | 2001-09-06 11:46:39 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-09-06 11:46:39 +0000 |
commit | decb61aa724cac5623222e7258ba85ca56e3de75 (patch) | |
tree | 6e730f19c914b4f4a756970c3a05cdea266c0e95 /perl-install/pkgs.pm | |
parent | c29c2233e28a00a5e044093c533f373350af3bb6 (diff) | |
download | drakx-backup-do-not-use-decb61aa724cac5623222e7258ba85ca56e3de75.tar drakx-backup-do-not-use-decb61aa724cac5623222e7258ba85ca56e3de75.tar.gz drakx-backup-do-not-use-decb61aa724cac5623222e7258ba85ca56e3de75.tar.bz2 drakx-backup-do-not-use-decb61aa724cac5623222e7258ba85ca56e3de75.tar.xz drakx-backup-do-not-use-decb61aa724cac5623222e7258ba85ca56e3de75.zip |
guess filename if the file is not found (for an rpm file during installation),
so try with release incremented in such case (good for Cooker user or local
tester using network installation).
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index d8854e60d..e4c05e598 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -1257,6 +1257,12 @@ sub install($$$;$$) { my $f = packageFile($p); print LOG "$f $p->[$MEDIUM]{descr}\n"; my $fd = install_any::getFile($f, $p->[$MEDIUM]{descr}); + unless ($fd) { + my ($fp, $rp, $lp) = $f =~ /(.*)(\d+)(mdk\..*)/ or return -1; #- we can't analyse filename correctly. + $rp += 1; #- try with release number increased, hey this is just a try for Cooker. + print LOG "problem to get above file, trying with $fp$rp$lp instead\n"; + $fd = install_any::getFile("$fp$rp$lp", $p->[$MEDIUM]{descr}); + } $fd ? fileno $fd : -1; }; my $callbackClose = sub { packageSetFlagInstalled($packages{$_[0]}, 1) }; |