summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-08-26 14:30:58 +0000
committerFrancois Pons <fpons@mandriva.com>2003-08-26 14:30:58 +0000
commitbe2b8172223650269e270c5602db42ef4d898af6 (patch)
treecd68caee4700ed6c74f9a1993a17e09589eb48a2 /urpm.pm
parentae9b8d7c18526916e3c2d2671ce57f608417278a (diff)
downloadurpmi-be2b8172223650269e270c5602db42ef4d898af6.tar
urpmi-be2b8172223650269e270c5602db42ef4d898af6.tar.gz
urpmi-be2b8172223650269e270c5602db42ef4d898af6.tar.bz2
urpmi-be2b8172223650269e270c5602db42ef4d898af6.tar.xz
urpmi-be2b8172223650269e270c5602db42ef4d898af6.zip
fixed bad use of system return value which fix multiple cd management.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 662f6343..a889a432 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -160,7 +160,7 @@ sub sync_file {
foreach (@_) {
my ($in) = /^(?:removable[^:]*|file):\/(.*)/;
propagate_sync_callback($options, 'start', $_);
- system("cp", "--preserve=mode", "--preserve=timestamps", "-R", $in || $_, ref($options) ? $options->{dir} : $options) or
+ system("cp", "--preserve=mode", "--preserve=timestamps", "-R", $in || $_, ref($options) ? $options->{dir} : $options) and
die N("copy failed: %s", $@);
propagate_sync_callback($options, 'end', $_);
}
@@ -2628,8 +2628,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", "--preserve=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";