summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia4
1 files changed, 4 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 95969848..cdd86e92 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -131,6 +131,10 @@ if ($options{distrib}) {
probe_with => $options{probe_with},
nolock => $options{nolock},
);
+ local $SIG{INT} = sub {
+ remove_failed($urpm, grep { $_->{modified} } @{$urpm->{media}});
+ exit(1);
+ };
$urpm->update_media(%options, callback => \&urpm::download::sync_logger);
remove_failed($urpm, grep { $_->{modified} } @{$urpm->{media}});