Package: aptitude
Version: 0.4.10-1
Severity: minor
Tags: patch

After doing an upgrade the following message was displayed:

  There are now 1 update [-63].

Note incorrect use of the plural "are".  Attached patch fixes this.
I have double checked the following cases:

There is now 1 update [-63].
There are now 3 updates [-2].
There are now 0 broken [-1], 1 update [-1].

Paul

-- Package-specific info:
Terminal: xterm
$DISPLAY is set.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages aptitude depends on:
ii  apt [libapt-pkg-libc6.6-6 0.7.9          Advanced front-end for dpkg
ii  libc6                     2.7-5          GNU C Library: Shared libraries
ii  libcwidget1               0.5.6.1-2      high-level terminal interface libr
ii  libgcc1                   1:4.2.2-4      GCC support library
ii  libncursesw5              5.6+20071215-1 Shared libraries for terminal hand
ii  libsigc++-2.0-0c2a        2.0.17-2       type-safe Signal Framework for C++
ii  libstdc++6                4.2.2-4        The GNU Standard C++ Library v3

Versions of packages aptitude recommends:
pn  aptitude-doc-en | aptitude-do <none>     (no description available)
pn  libparse-debianchangelog-perl <none>     (no description available)

-- no debconf information
diff -ur clean/src/cmdline/cmdline_util.cc 
aptitude-0.4.10/src/cmdline/cmdline_util.cc
--- clean/src/cmdline/cmdline_util.cc   2007-12-16 19:43:06.000000000 +0000
+++ aptitude-0.4.10/src/cmdline/cmdline_util.cc 2007-12-27 12:50:04.000000000 
+0000
@@ -258,6 +258,7 @@
   {
     using cw::fragf;
     using cw::util::ssprintf;
+    int nthings = 0;
 
     std::vector<cw::fragment *> fragments;
 
@@ -273,6 +274,7 @@
                   final.get_num_broken() - initial.get_num_broken());
 
        fragments.push_back(cw::text_fragment(change));
+       nthings += final.get_num_broken();
       }
 
     if(show_all ||
@@ -287,6 +289,7 @@
                   final.get_num_upgradable() - initial.get_num_upgradable());
 
        fragments.push_back(cw::text_fragment(change));
+       nthings += final.get_num_upgradable();
       }
 
     if(show_all ||
@@ -301,11 +304,17 @@
                   final.get_num_new() - initial.get_num_new());
 
        fragments.push_back(cw::text_fragment(change));
+       nthings += final.get_num_new();
       }
 
     if(fragments.size() > 0)
       {
-       cw::fragment *f = fragf(_("There are now %F."),
+       if (fragments.size() > 1)
+         nthings += fragments.size();
+
+       cw::fragment *f = fragf(ngettext("There is now %F.",
+                                        "There are now %F.",
+                                        nthings),
                                cw::join_fragments(fragments, L", "));
 
        update_screen_width();

Reply via email to