]> git.saurik.com Git - apt.git/commitdiff
merged from david
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 24 Sep 2009 16:54:50 +0000 (18:54 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 24 Sep 2009 16:54:50 +0000 (18:54 +0200)
1  2 
apt-pkg/deb/dpkgpm.cc
debian/changelog

diff --combined apt-pkg/deb/dpkgpm.cc
index f017d53e7a3395865fb94f640daf4fd07458b9fb,bb04697527398fe8333df0dccde168edeb398e18..adaf362fa2e7df529ea2e1e55ac80732c053ac82
@@@ -641,6 -641,7 +641,7 @@@ bool pkgDPkgPM::Go(int OutStatusFd
     // support subpressing of triggers processing for special
     // cases like d-i that runs the triggers handling manually
     bool const SmartConf = (_config->Find("PackageManager::Configure", "all") != "all");
+    bool const TriggersPending = _config->FindB("DPkg::TriggersPending", false);
     if (_config->FindB("DPkg::ConfigurePending", SmartConf) == true)
        List.push_back(Item(Item::ConfigurePending, PkgIterator()));
  
     // this loop is runs once per operation
     for (vector<Item>::const_iterator I = List.begin(); I != List.end();)
     {
+       // Do all actions with the same Op in one run
        vector<Item>::const_iterator J = I;
-       for (; J != List.end() && J->Op == I->Op; J++)
-        /* nothing */;
+       if (TriggersPending == true)
+        for (; J != List.end(); J++)
+        {
+           if (J->Op == I->Op)
+              continue;
+           if (J->Op != Item::TriggersPending)
+              break;
+           vector<Item>::const_iterator T = J + 1;
+           if (T != List.end() && T->Op == I->Op)
+              continue;
+           break;
+        }
+       else
+        for (; J != List.end() && J->Op == I->Op; J++)
+           /* nothing */;
  
        // Generate the argument list
        const char *Args[MaxArgs + 50];
  
        struct  termios tt;
        struct  winsize win;
 -      int     master;
 -      int     slave;
 +      int     master = -1;
 +      int     slave = -1;
  
 -      // FIXME: setup sensible signal handling (*ick*)
 -      tcgetattr(0, &tt);
 -      ioctl(0, TIOCGWINSZ, (char *)&win);
 -      if (openpty(&master, &slave, NULL, &tt, &win) < 0) 
 +      // if tcgetattr does not return zero there was a error
 +      // and we do not do any pty magic
 +      if (tcgetattr(0, &tt) == 0)
        {
 -       const char *s = _("Can not write log, openpty() "
 -                         "failed (/dev/pts not mounted?)\n");
 -       fprintf(stderr, "%s",s);
 -       fprintf(term_out, "%s",s);
 -       master = slave = -1;
 -      }  else {
 -       struct termios rtt;
 -       rtt = tt;
 -       cfmakeraw(&rtt);
 -       rtt.c_lflag &= ~ECHO;
 -       // block SIGTTOU during tcsetattr to prevent a hang if
 -       // the process is a member of the background process group
 -       // http://www.opengroup.org/onlinepubs/000095399/functions/tcsetattr.html
 -       sigemptyset(&sigmask);
 -       sigaddset(&sigmask, SIGTTOU);
 -       sigprocmask(SIG_BLOCK,&sigmask, &original_sigmask);
 -       tcsetattr(0, TCSAFLUSH, &rtt);
 -       sigprocmask(SIG_SETMASK, &original_sigmask, 0);
 +       ioctl(0, TIOCGWINSZ, (char *)&win);
 +       if (openpty(&master, &slave, NULL, &tt, &win) < 0) 
 +       {
 +          const char *s = _("Can not write log, openpty() "
 +                            "failed (/dev/pts not mounted?)\n");
 +          fprintf(stderr, "%s",s);
 +          fprintf(term_out, "%s",s);
 +          master = slave = -1;
 +       }  else {
 +          struct termios rtt;
 +          rtt = tt;
 +          cfmakeraw(&rtt);
 +          rtt.c_lflag &= ~ECHO;
 +          // block SIGTTOU during tcsetattr to prevent a hang if
 +          // the process is a member of the background process group
 +          // http://www.opengroup.org/onlinepubs/000095399/functions/tcsetattr.html
 +          sigemptyset(&sigmask);
 +          sigaddset(&sigmask, SIGTTOU);
 +          sigprocmask(SIG_BLOCK,&sigmask, &original_sigmask);
 +          tcsetattr(0, TCSAFLUSH, &rtt);
 +          sigprocmask(SIG_SETMASK, &original_sigmask, 0);
 +       }
        }
  
         // Fork dpkg
diff --combined debian/changelog
index 9def86ce9a4c9088f11835d3886bf1b785c97670,35a396537e0b4ff62651eeec77a073e495e067db..658478b500c129ed80c8cbb2ea5a990ea46d49ac
@@@ -12,13 -12,6 +12,13 @@@ apt (0.7.24) UNRELEASED; urgency=lo
    * doc/style.txt, buildlib/defaults.mak, buildlib/manpage.mak:
      - fix a few typos in the comments of this files
  
 +  [ Michael Vogt ]
 +  * apt-pkg/deb/dpkgpm.cc:
 +    - when tcgetattr() returns non-zero skip all pty magic 
 +      (thanks to Simon Richter, closes: #509866)
 +  * apt-inst/contrib/arfile.cc:
 +    - show propper error message for Invalid archive members
 +
    [ David Kalnischkies ]
    * doc/Doxyfile.in:
      - update file with doxygen 1.6.1 (current unstable)
    * apt-pkg/contrib/strutl.cc:
      - replace unknown multibytes with ? in UTF8ToCharset (Closes: #545208)
    * doc/apt-get.8.xml:
-     - fix two little typos in the --simulate description.
+     - fix two little typos in the --simulate description. (Closes: #545059)
    * apt-pkg/aptconfiguration.cc, doc/apt.conf.5.xml:
      - add an order subgroup to the compression types to simplify reordering
        a bit and improve the documentation for this option group.
+   * doc/apt.conf.5.xml:
+     - document the Acquire::http::Dl-Limit option
+     - try to be cristal clear about the usage of :: and {} (Closes: #503481)
+   * doc/apt-cache.8.xml:
+     - clarify the note for the pkgnames command (Closes: #547599)
    * doc/apt.ent, all man pages:
      - move the description of files to globally usable entities
    * doc/apt_preferences.5.xml:
    * apt-pkg/deb/dpkgpm.cc, apt-pkg/packagemanager.cc, apt-pkg/orderlist.cc:
      - add and document _experimental_ options to make (aggressive)
        use of dpkg's trigger and configuration handling (Closes: #473461)
+   * cmdline/apt-get.cc:
+     - ignore versions that are not candidates when selecting a package
+       instead of a virtual one (by Marius Vollmer, Closes: #547788)
  
    [ Christian Perrier ]
    * doc/fr/*, doc/po/fr.po:
      - remove the old fr man page translation and replace it with
        the new po4a-powered translation
-   * doc/pl, doc/de: dropped (pl translation is useless as the translated
-     document is not provideed anymore and the de translation is too
-     incomplete to be used)
+   * doc/de: dropped (translation is too incomplete to be useful in
+       the transition to the po4a-powered translations)
  
   -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 28 Aug 2009 09:40:08 +0200