diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-16 17:32:14 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-16 17:32:14 +0000 |
commit | bcfd28909c944e520834d641b199458b73c69483 (patch) | |
tree | 1212e431a9ebe955fa240d1c8faf7d77f1f7d87e | |
parent | c8ae0d71b7ad00babd218303a33a199af40132c0 (diff) | |
download | rpmdrake-bcfd28909c944e520834d641b199458b73c69483.tar rpmdrake-bcfd28909c944e520834d641b199458b73c69483.tar.gz rpmdrake-bcfd28909c944e520834d641b199458b73c69483.tar.bz2 rpmdrake-bcfd28909c944e520834d641b199458b73c69483.tar.xz rpmdrake-bcfd28909c944e520834d641b199458b73c69483.zip |
refelct perl-URPM 0.84 API change in removal of packages
-rwxr-xr-x | rpmdrake | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -88,6 +88,7 @@ sub myformatList { sub split_fullname { $_[0] =~ /^(.*)-([^-]+-[^-]+)$/ } sub my_fullname { my ($name, $version, $release) = $_[0]->fullname; "$name-$version-$release" } +sub urpm_name { my ($name, $version, $release, $arch) = $_[0]->fullname; "$name-$version-$release.$arch" } sub parse_compssUsers_flat { my (%compssUsers, $category); @@ -1115,7 +1116,7 @@ sub get_installed_pkgs { my $fullname = my_fullname($pkg); if (!$base{$fullname} || ${$base{$fullname}} != 1) { #- I need to extract summary and description since they'll be lost when $pkg->pack_header - $installed_pkgs{$fullname} = { selected => 0, pkg => $pkg, summary => $pkg->summary, + $installed_pkgs{$fullname} = { selected => 0, pkg => $pkg, urpm_name => urpm_name($pkg), summary => $pkg->summary, description => beautify_description($pkg->description) }; $base{$fullname} and $installed_pkgs{$fullname}{base} = \${$base{$fullname}}; } @@ -1127,7 +1128,7 @@ sub get_installed_pkgs { sub perform_removal { my ($urpm, $pkgs) = @_; - my @toremove = grep { $pkgs->{$_}{selected} } keys %$pkgs; + my @toremove = map { if_($pkgs->{$_}{selected}, $pkgs->{$_}{urpm_name}) } keys %$pkgs; standalone::explanations("Removing package $_") foreach sort @toremove; my @results; slow_func(N("Please wait, removing packages..."), |