]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/dpkgpm.cc
* po/en_GB.po:
[apt.git] / apt-pkg / deb / dpkgpm.cc
index 667db8ff2d98f4da38ae95d1416ec55c89f874c2..f66962387818574a17d42846ffd7967b11bd6b53 100644 (file)
@@ -355,28 +355,28 @@ bool pkgDPkgPM::Go(int OutStatusFd)
    static const struct DpkgState DpkgStatesOpMap[][5] = {
       // Install operation
       { 
-        {"half-installed", _("Preparing %s")}, 
-        {"unpacked", _("Unpacking %s") }, 
+        {"half-installed", N_("Preparing %s")}, 
+        {"unpacked", N_("Unpacking %s") }, 
         {NULL, NULL}
       },
       // Configure operation
       { 
-        {"unpacked",_("Preparing to configure %s") },
-        {"half-configured", _("Configuring %s") },
-        { "installed", _("Installed %s")},
+        {"unpacked",N_("Preparing to configure %s") },
+        {"half-configured", N_("Configuring %s") },
+        { "installed", N_("Installed %s")},
         {NULL, NULL}
       },
       // Remove operation
       { 
-        {"half-configured", _("Preparing for removal of %s")},
-        {"half-installed", _("Removing %s")},
-        {"config-files",  _("Removed %s")},
+        {"half-configured", N_("Preparing for removal of %s")},
+        {"half-installed", N_("Removing %s")},
+        {"config-files",  N_("Removed %s")},
         {NULL, NULL}
       },
       // Purge operation
       { 
-        {"config-files", _("Preparing to completely remove %s")},
-        {"not-installed", _("Completely removed %s")},
+        {"config-files", N_("Preparing to completely remove %s")},
+        {"not-installed", N_("Completely removed %s")},
         {NULL, NULL}
       },
    };
@@ -474,6 +474,8 @@ bool pkgDPkgPM::Go(int OutStatusFd)
         case Item::Install:
         Args[n++] = "--unpack";
         Size += strlen(Args[n-1]);
+        Args[n++] = "--auto-deconfigure";
+        Size += strlen(Args[n-1]);
         break;
       }
       
@@ -624,7 +626,13 @@ bool pkgDPkgPM::Go(int OutStatusFd)
            
         */
         char* list[5];
-        TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]));
+        if(!TokSplitString(':', line, list, sizeof(list)/sizeof(list[0])))
+           // FIXME: dpkg sends multiline error messages sometimes (see
+           //        #374195 for a example. we should support this by
+           //        either patching dpkg to not send multiline over the
+           //        statusfd or by rewriting the code here to deal with
+           //        it. for now we just ignore it and not crash
+           continue;
         char *pkg = list[1];
         char *action = _strstrip(list[2]);
 
@@ -664,7 +672,7 @@ bool pkgDPkgPM::Go(int OutStatusFd)
         {
            // only read the translation if there is actually a next
            // action
-           const char *translation = states[PackageOpsDone[pkg]].str;
+           const char *translation = _(states[PackageOpsDone[pkg]].str);
            char s[200];
            snprintf(s, sizeof(s), translation, pkg);