aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-13 13:18:26 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-13 13:18:26 +0000
commitcce945fe2258238670591dda1ceb7350ce521c8e (patch)
tree1d41b75e10cc879247ab252ff0ce60944550d22c
parentb51ec1205402d3c689878c8f64766d1d422a019e (diff)
downloadrpmdrake-cce945fe2258238670591dda1ceb7350ce521c8e.tar
rpmdrake-cce945fe2258238670591dda1ceb7350ce521c8e.tar.gz
rpmdrake-cce945fe2258238670591dda1ceb7350ce521c8e.tar.bz2
rpmdrake-cce945fe2258238670591dda1ceb7350ce521c8e.tar.xz
rpmdrake-cce945fe2258238670591dda1ceb7350ce521c8e.zip
(node_state) just skip non existing packages (#36529)
(eg: when rpmdrake download info.xml.lzma on demand when searching or browsing whereas the package was updated in the mean time, the info file references the newer package whereas urpmi database only know the older version)
-rw-r--r--Rpmdrake/gui.pm24
1 files changed, 23 insertions, 1 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index fb712039..ea90bd43 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -209,8 +209,30 @@ sub format_pkg_info {
}
sub node_state {
- my $pkg = $pkgs->{$_[0]};
+ my ($name) = @_;
+ my $pkg = $pkgs->{$name};
my $urpm_obj = $pkg->{pkg};
+ if (!$urpm_obj) {
+ my ($short_name) = split_fullname($name);
+ interactive_msg(N("Warning"),
+ join("\n",
+ N("The package \"%s\" was found.", $name),
+ N("However this package is not in the package list."),
+ N("You may want to update your urpmi database."),
+ '',
+ N("Matching packages:"),
+ '',
+ join("\n", sort map {
+ warn ">> $_ => $pkgs->{$_} $pkgs->{$_}{pkg}\n";
+ #-PO: this is list fomatting: "- <package_name> (medium: <medium_name>)"
+ #-PO: eg: "- rpmdrake (medium: "Main Release"
+ N("- %s (medium: %s)", $_, pkg2medium($pkgs->{$_}{pkg}, $urpm)->{name});
+ } grep { /^$short_name/ } keys %$pkgs),
+ ),
+ scroll => 1,
+ );
+ return 'XXX';
+ }
#- checks $_[0] -> hack for partial tree displaying
$_[0] ? $pkg->{selected} ?
($urpm_obj->flag_installed ? ($urpm_obj->flag_upgrade ? 'to_install' : 'to_remove') : 'to_install')