aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmdrake7
-rw-r--r--rpmdrake.spec10
2 files changed, 13 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 82c9840f..2381e70f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1086,6 +1086,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
gurpm::init(N("Package installation..."), N("Initializing..."));
my $distant_progress;
+ my $canceled;
my %sources = $urpm->download_source_packages($local_sources, $list, force_local => 1,
ask_for_medium => sub {
interactive_msg_(N("Change medium"),
@@ -1096,12 +1097,18 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
if ($mode eq 'start') {
gurpm::label(N("Downloading package `%s' (%s/%s)...",
basename($file), ++$distant_progress, $distant_number));
+ gurpm::validate_cancel(but(N("Cancel")), sub { $canceled = 1 });
} elsif ($mode eq 'progress') {
gurpm::progress($percent/100);
} elsif ($mode eq 'end') {
gurpm::progress(1);
+ gurpm::invalidate_cancel();
}
+ $canceled and return 'canceled';
});
+ $canceled and goto return_with_error;
+ gurpm::invalidate_cancel_forever();
+
my %sources_install = %{$urpm->extract_packages_to_install(\%sources) || {}};
my @rpms_install = grep { !/\.src\.rpm$/ } values %sources_install;
my @rpms_upgrade = grep { !/\.src\.rpm$/ } values %sources;
diff --git a/rpmdrake.spec b/rpmdrake.spec
index 197e7a11..fa65b75c 100644
--- a/rpmdrake.spec
+++ b/rpmdrake.spec
@@ -7,8 +7,8 @@
##################################################################
%define name rpmdrake
-%define version 2.1
-%define release 38mdk
+%define version 2.1.1
+%define release 1mdk
Name: %{name}
Version: %{version}
@@ -16,7 +16,7 @@ Release: %{release}
License: GPL
Source0: %name-%version.tar.bz2
Summary: Mandrake Linux graphical front end for choosing packages for installion/removal
-Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi > 4.4-31mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools > 9.2-5mdk rpmtools >= 4.5
+Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi >= 4.4.1 gurpmi >= 4.4.1 perl-URPM >= 0.90-7mdk drakxtools > 9.2-5mdk rpmtools >= 4.5
Requires: perl-Gtk2 >= 0.90-6mdk perl-Locale-gettext >= 1.01-7mdk
BuildRequires: curl-devel >= 7.10.3-2mdk gettext openssl-devel perl-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
@@ -101,7 +101,9 @@ rm -rf $RPM_BUILD_ROOT
%{perl_vendorarch}/*.pm
%changelog
-* Mon Jan 12 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-38mdk
+* Mon Jan 12 2004 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1.1-1mdk
+- add ability to cancel packages downloads (#6317)
+- together with changes in 2.1-36mdk deserve a subsubversion change
- remove unecessary provides perl(rpmdrake)
* Fri Jan 09 2004 Warly <warly@mandrakesoft.com> 2.1-37mdk