[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#751857: [PATCH] private-update.cc does not compile when --disable-nls is used



Package: apt
Version: 1.0.4
Severity: normal
Tags: patch

When --disable-nls is given to configure, apt-private/private-update.cc
does not compile due to calling ngettext(), which buildlib/apti18n.h does
not define when USE_NLS is undefined.

Looking at other files the P_ macro (which apti18n.h do define) is used,
so I guess that the correct fix is to change private-update.cc to use that
one (instead of adding a ngettext macro to apti18n.h).

Patch:
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index fa827de..c98b990 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -86,7 +86,7 @@ bool DoUpdate(CommandLine &CmdL)
          if (I->CurrentVer != 0 && state.Upgradable())
             upgradable++;
       }
-      const char *msg = ngettext(
+      const char *msg = P_(
          "%i package can be upgraded. Run 'apt list --upgradable' to
see it.\n",
          "%i packages can be upgraded. Run 'apt list --upgradable' to
see them.\n",
          upgradable);


Reply to: