From: Michael Vogt Date: Thu, 24 Sep 2009 16:54:50 +0000 (+0200) Subject: merged from david X-Git-Tag: 0.7.24~2 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/b69e1424886f4fe3b5b00c05889117e3eb6333e3?hp=-c merged from david --- b69e1424886f4fe3b5b00c05889117e3eb6333e3 diff --combined apt-pkg/deb/dpkgpm.cc index f017d53e7,bb0469752..adaf362fa --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@@ -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())); @@@ -701,9 -702,23 +702,23 @@@ // this loop is runs once per operation for (vector::const_iterator I = List.begin(); I != List.end();) { + // Do all actions with the same Op in one run vector::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::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]; @@@ -850,35 -865,32 +865,35 @@@ 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 9def86ce9,35a396537..658478b50 --- a/debian/changelog +++ b/debian/changelog @@@ -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) @@@ -30,10 -23,15 +30,15 @@@ * 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: @@@ -49,14 -47,16 +54,16 @@@ * 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 Fri, 28 Aug 2009 09:40:08 +0200