diff options
author | Francois Pons <fpons@mandriva.com> | 2003-07-29 13:29:44 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-07-29 13:29:44 +0000 |
commit | 5595d63f0865165636a8d9cb19851d9d8f3c5976 (patch) | |
tree | 6207446da62066a9730194315c857f4c5d31a70b /urpm.pm | |
parent | ad8c8d16063f6948f547ece438d5e0d31422d297 (diff) | |
download | urpmi-5595d63f0865165636a8d9cb19851d9d8f3c5976.tar urpmi-5595d63f0865165636a8d9cb19851d9d8f3c5976.tar.gz urpmi-5595d63f0865165636a8d9cb19851d9d8f3c5976.tar.bz2 urpmi-5595d63f0865165636a8d9cb19851d9d8f3c5976.tar.xz urpmi-5595d63f0865165636a8d9cb19851d9d8f3c5976.zip |
make sure urpmi call a cp without specific (fixes) of current cp of 9.2 (work
with 9.0).
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -160,7 +160,8 @@ sub sync_file { foreach (@_) { my ($in) = /^(?:removable[^:]*|file):\/(.*)/; propagate_sync_callback($options, 'start', $_); - system("cp", "--preserve=mode,timestamps", "-R", $in || $_, ref($options) ? $options->{dir} : $options) or die N("copy failed: %s", $@); + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", $in || $_, ref($options) ? $options->{dir} : $options) or + die N("copy failed: %s", $@); propagate_sync_callback($options, 'end', $_); } } @@ -926,7 +927,7 @@ sub add_distrib_media { if (-e $hdlists_file) { unlink "$urpm->{cachedir}/partial/hdlists"; $urpm->{log}(N("copying hdlists file...")); - system("cp", "--preserve=mode,timestamps", "-R", $hdlists_file, "$urpm->{cachedir}/partial/hdlists") ? + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", $hdlists_file, "$urpm->{cachedir}/partial/hdlists") ? $urpm->{log}(N("...copying failed")) : $urpm->{log}(N("...copying done")); } else { $urpm->{error}(N("unable to access first installation medium (no Mandrake/base/hdlists file found)")), return; @@ -1223,7 +1224,7 @@ this could happen if you mounted manually the directory when creating the medium unlink "$urpm->{statedir}/descriptions.$medium->{name}"; if (-e "$dir/../descriptions") { $urpm->{log}(N("copying description file of \"%s\"...", $medium->{name})); - system("cp", "--preserve=mode,timestamps", "-R", "$dir/../descriptions", + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", "$dir/../descriptions", "$urpm->{statedir}/descriptions.$medium->{name}") ? $urpm->{log}(N("...copying failed")) : $urpm->{log}(N("...copying done")); } @@ -1311,7 +1312,7 @@ this could happen if you mounted manually the directory when creating the medium unlink "$urpm->{cachedir}/partial/$medium->{hdlist}"; $urpm->{log}(N("copying source hdlist (or synthesis) of \"%s\"...", $medium->{name})); $options{callback} && $options{callback}('copy', $medium->{name}); - if (system("cp", "--preserve=mode,timestamps", "-R", $with_hdlist_dir, + if (system("cp", "--preserve=mode", "--preserve=timestamps", "-R", $with_hdlist_dir, "$urpm->{cachedir}/partial/$medium->{hdlist}")) { $options{callback} && $options{callback}('failed', $medium->{name}); $urpm->{log}(N("...copying failed")); @@ -1374,7 +1375,8 @@ this could happen if you mounted manually the directory when creating the medium my $local_list = $medium->{with_hdlist} =~ /hd(list.*)\.cz$/ ? $1 : 'list'; if (-s "$dir/$local_list") { $urpm->{log}(N("copying source list of \"%s\"...", $medium->{name})); - system("cp", "--preserve=mode,timestamps", "-R", "$dir/$local_list", "$urpm->{cachedir}/partial/list") ? + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", + "$dir/$local_list", "$urpm->{cachedir}/partial/list") ? $urpm->{log}(N("...copying failed")) : $urpm->{log}(N("...copying done")); } } @@ -1558,12 +1560,12 @@ this could happen if you mounted manually the directory when creating the medium unless ($options{force}) { if ($medium->{synthesis}) { -e "$urpm->{statedir}/synthesis.$medium->{hdlist}" and - system("cp", "--preserve=mode,timestamps", "-R", "$urpm->{statedir}/synthesis.$medium->{hdlist}", - "$urpm->{cachedir}/partial/$basename"); + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", + "$urpm->{statedir}/synthesis.$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename"); } else { -e "$urpm->{statedir}/$medium->{hdlist}" and - system("cp", "--preserve=mode,timestamps", "-R", "$urpm->{statedir}/$medium->{hdlist}", - "$urpm->{cachedir}/partial/$basename"); + system("cp", "--preserve=mode", "--preserve=timestamps", "-R", + "$urpm->{statedir}/$medium->{hdlist}", "$urpm->{cachedir}/partial/$basename"); } } eval { @@ -2541,7 +2543,8 @@ sub copy_packages_of_removable_media { #- first copy in cache, and if the package is still good, transfert it #- to the great rpms cache. unlink "$urpm->{cachedir}/partial/$filename"; - if (system("cp", "--preserve=mode,timestamps", "-R", $filepath, "$urpm->{cachedir}/partial") && + if (system("cp", "--preserve=mode", "--preserve=timestamps", "-R", + $filepath, "$urpm->{cachedir}/partial") && 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"; |