diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-25 13:57:06 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-25 13:57:06 +0000 |
commit | 76e798d0f259d0ca58fba198b2de3a614f908db3 (patch) | |
tree | 0aaa82cd7bb503ddf890de4eda11d793ba1c2be2 /urpm.pm | |
parent | 4996357ee08817d0d7df5dc440a4788f133a742e (diff) | |
download | urpmi-76e798d0f259d0ca58fba198b2de3a614f908db3.tar urpmi-76e798d0f259d0ca58fba198b2de3a614f908db3.tar.gz urpmi-76e798d0f259d0ca58fba198b2de3a614f908db3.tar.bz2 urpmi-76e798d0f259d0ca58fba198b2de3a614f908db3.tar.xz urpmi-76e798d0f259d0ca58fba198b2de3a614f908db3.zip |
fixed bug 3833 (moving downloaded files from partial to rpms).
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2546,7 +2546,8 @@ sub copy_packages_of_removable_media { URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/) { #- now we can consider the file to be fine. unlink "$urpm->{cachedir}/rpms/$filename"; - rename "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"; + rename("$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename") or + system("mv", "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"); -r "$urpm->{cachedir}/rpms/$filename" and $sources->{$i} = "$urpm->{cachedir}/rpms/$filename"; } } else { @@ -2667,7 +2668,8 @@ sub download_packages_of_distant_media { URPM::verify_rpm("$urpm->{cachedir}/partial/$filename", nosignatures => 1) !~ /NOT OK/) { #- it seems the the file has been downloaded correctly and has been checked to be valid. unlink "$urpm->{cachedir}/rpms/$filename"; - rename "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"; + rename("$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename") or + system("mv", "$urpm->{cachedir}/partial/$filename", "$urpm->{cachedir}/rpms/$filename"); -r "$urpm->{cachedir}/rpms/$filename" and $sources->{$i} = "$urpm->{cachedir}/rpms/$filename"; } unless ($sources->{$i}) { |