summaryrefslogtreecommitdiffstats
path: root/urpm/sys.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-24 10:20:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-24 10:20:09 +0000
commita3ebda940b2d75d0a28e4b250ce6a23de06f9bba (patch)
tree1f04c7a5af27384c3b084213e014b91b5551b30e /urpm/sys.pm
parent5e1c20f181fac8df0636ecd04b24832ddb6cbc27 (diff)
downloadurpmi-a3ebda940b2d75d0a28e4b250ce6a23de06f9bba.tar
urpmi-a3ebda940b2d75d0a28e4b250ce6a23de06f9bba.tar.gz
urpmi-a3ebda940b2d75d0a28e4b250ce6a23de06f9bba.tar.bz2
urpmi-a3ebda940b2d75d0a28e4b250ce6a23de06f9bba.tar.xz
urpmi-a3ebda940b2d75d0a28e4b250ce6a23de06f9bba.zip
- urpmi, urpmi.addmedia, urpmi.update:
o have fatal errors on some errors that must not happen (eg: moving rpm from download dir to cachedir)
Diffstat (limited to 'urpm/sys.pm')
-rw-r--r--urpm/sys.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/urpm/sys.pm b/urpm/sys.pm
index 6d2cdec1..91c38b06 100644
--- a/urpm/sys.pm
+++ b/urpm/sys.pm
@@ -229,6 +229,11 @@ sub opendir_safe {
return $d;
}
+sub move_or_die {
+ my ($urpm, $file, $dest) = @_;
+ urpm::util::move($file, $dest) or $urpm->{fatal}(1, N("Can't move file %s to %s", $file, $dest));
+}
+
1;
__END__