summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmi.addmedia4
1 files changed, 4 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 4d46da86..95969848 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -155,6 +155,10 @@ if ($options{distrib}) {
if ($options{raw}) {
$urpm->write_config;
} else {
+ local $SIG{INT} = sub {
+ remove_failed($urpm, grep { $_->{name} eq $name && $_->{modified} } @{$urpm->{media}});
+ exit(1);
+ };
$urpm->update_media(%options, callback => \&urpm::download::sync_logger);
#- check creation of media
my ($medium) = grep { $_->{name} eq $name } @{$urpm->{media}};