From 4d7ac88c6827fab1e25238415ed0ebdf7d7f5404 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 25 Feb 2010 13:29:41 +0100 Subject: * apt-pkg/deb/dpkgpm.cc: - fix backgrounding when dpkg runs (closes: #486222) --- apt-pkg/deb/dpkgpm.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 9d144a227..8abe3f5c6 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -946,6 +946,7 @@ bool pkgDPkgPM::Go(int OutStatusFd) rtt = tt; cfmakeraw(&rtt); rtt.c_lflag &= ~ECHO; + rtt.c_lflag |= ISIG; // 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 -- cgit v1.2.3 From 0d6c5e7dcb2d4fe5334a4177aff3a2b6e55e6768 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 12 Mar 2010 22:06:08 +0100 Subject: * apt-pkg/indexfile.cc: - deal correctly with three letter langcodes (LP: #391409) --- apt-pkg/indexfile.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 08f71feb0..34fd71b20 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -89,8 +89,11 @@ bool pkgIndexFile::TranslationsAvailable() bool pkgIndexFile::CheckLanguageCode(const char *Lang) { - if (strlen(Lang) == 2 || (strlen(Lang) == 5 && Lang[2] == '_')) - return true; + if (strlen(Lang) == 2 || + strlen(Lang) == 3 || + (strlen(Lang) > 3 && Lang[3] == '_') || + (strlen(Lang) == 5 && Lang[2] == '_')) + return true; if (strcmp(Lang,"C") != 0) _error->Warning("Wrong language code %s", Lang); @@ -112,13 +115,18 @@ string pkgIndexFile::LanguageCode() // we have a mapping of the language codes that contains all the language // codes that need the country code as well // (like pt_BR, pt_PT, sv_SE, zh_*, en_*) - const char *need_full_langcode[] = { "pt","sv","zh","en", NULL }; + const char *need_full_langcode[] = { "cs_", + "en_", + "pt_", + "sv_", + "zh_", + NULL }; for(const char **s = need_full_langcode;*s != NULL; s++) if(lang.find(*s) == 0) return lang.substr(0,5); - if(lang.size() > 2) - return lang.substr(0,2); + if(lang.find("_") != lang.npos) + return lang.substr(0, lang.find("_")); else return lang; } -- cgit v1.2.3 From 131418cfb2b83fb725fff62b0401252fef5655e2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 16 Mar 2010 21:47:49 +0100 Subject: apt-pkg/packagemanager.cc: more debug output for debug::pkgPackageManager --- apt-pkg/packagemanager.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index 491bff110..b747fa78a 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -338,6 +338,9 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) return true; if (List->IsFlag(Pkg,pkgOrderList::UnPacked) == false) return false; + + if (Debug) + std::clog << OutputInDepth(Depth) << "DepAdd: " << Pkg.Name() << std::endl; // Put the package on the list OList.push_back(Pkg); @@ -391,6 +394,8 @@ bool pkgPackageManager::DepAdd(pkgOrderList &OList,PkgIterator Pkg,int Depth) if (Bad == true) { + if (Debug) + std::clog << OutputInDepth(Depth) << "DepAdd FAILS on: " << Pkg.Name() << std::endl; OList.Flag(Pkg,0,pkgOrderList::Added); OList.pop_back(); Depth--; -- cgit v1.2.3