From: Michael Vogt Date: Tue, 28 Jun 2011 14:51:33 +0000 (+0100) Subject: merged from lp:~mvo/apt/mvo X-Git-Tag: 0.8.15~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/abd9fcaa723093be0476b594932ed8bfb8307ca4?ds=inline;hp=-c merged from lp:~mvo/apt/mvo --- abd9fcaa723093be0476b594932ed8bfb8307ca4 diff --combined apt-pkg/deb/deblistparser.cc index 4a9e94c85,ff6de2d9f..9ae1065a4 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@@ -201,7 -201,7 +201,7 @@@ string debListParser::DescriptionLangua if (Section.FindS("Description").empty() == false) return ""; - std::vector const lang = APT::Configuration::getLanguages(); + std::vector const lang = APT::Configuration::getLanguages(true); for (std::vector::const_iterator l = lang.begin(); l != lang.end(); l++) if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false) @@@ -284,18 -284,18 +284,18 @@@ unsigned short debListParser::VersionHa /* Strip out any spaces from the text, this undoes dpkgs reformatting of certain fields. dpkg also has the rather interesting notion of reformatting depends operators < -> <= */ - char *I = S; + char *J = S; for (; Start != End; Start++) { if (isspace(*Start) == 0) - *I++ = tolower_ascii(*Start); + *J++ = tolower_ascii(*Start); if (*Start == '<' && Start[1] != '<' && Start[1] != '=') - *I++ = '='; + *J++ = '='; if (*Start == '>' && Start[1] != '>' && Start[1] != '=') - *I++ = '='; + *J++ = '='; } - Result = AddCRC16(Result,S,I - S); + Result = AddCRC16(Result,S,J - S); } return Result; diff --combined apt-pkg/deb/dpkgpm.cc index 5ddcd47e9,ca544e778..5fbd1801a --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@@ -14,8 -14,8 +14,8 @@@ #include #include #include -#include #include +#include #include #include @@@ -32,6 -32,8 +32,8 @@@ #include #include #include + #include + #include #include #include @@@ -667,7 -669,13 +669,13 @@@ bool pkgDPkgPM::OpenLog( return _error->WarningE("OpenLog", _("Could not open file '%s'"), logfile_name.c_str()); setvbuf(term_out, NULL, _IONBF, 0); SetCloseExec(fileno(term_out), true); - chmod(logfile_name.c_str(), 0600); + struct passwd *pw; + struct group *gr; + pw = getpwnam("root"); + gr = getgrnam("adm"); + if (pw != NULL && gr != NULL) + chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid); + chmod(logfile_name.c_str(), 0644); fprintf(term_out, "\nLog started: %s\n", timestr); } @@@ -681,42 -689,31 +689,42 @@@ return _error->WarningE("OpenLog", _("Could not open file '%s'"), history_name.c_str()); chmod(history_name.c_str(), 0644); fprintf(history_out, "\nStart-Date: %s\n", timestr); - string remove, purge, install, upgrade, downgrade; + string remove, purge, install, reinstall, upgrade, downgrade; for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) { - if (Cache[I].NewInstall()) - { - install += I.FullName(false) + string(" (") + Cache[I].CandVersion; - if (Cache[I].Flags & pkgCache::Flag::Auto) - install+= ", automatic"; - install += string("), "); - } - else if (Cache[I].Upgrade()) - upgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), "); - else if (Cache[I].Downgrade()) - downgrade += I.FullName(false) + string(" (") + Cache[I].CurVersion + string(", ") + Cache[I].CandVersion + string("), "); - else if (Cache[I].Delete()) - { - if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge) - purge += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), "); - else - remove += I.FullName(false) + string(" (") + Cache[I].CurVersion + string("), "); + enum { CANDIDATE, CANDIDATE_AUTO, CURRENT_CANDIDATE, CURRENT } infostring; + string *line = NULL; + #define HISTORYINFO(X, Y) { line = &X; infostring = Y; } + if (Cache[I].NewInstall() == true) + HISTORYINFO(install, CANDIDATE_AUTO) + else if (Cache[I].ReInstall() == true) + HISTORYINFO(reinstall, CANDIDATE) + else if (Cache[I].Upgrade() == true) + HISTORYINFO(upgrade, CURRENT_CANDIDATE) + else if (Cache[I].Downgrade() == true) + HISTORYINFO(downgrade, CURRENT_CANDIDATE) + else if (Cache[I].Delete() == true) + HISTORYINFO((Cache[I].Purge() ? purge : remove), CURRENT) + else + continue; + #undef HISTORYINFO + line->append(I.FullName(false)).append(" ("); + switch (infostring) { + case CANDIDATE: line->append(Cache[I].CandVersion); break; + case CANDIDATE_AUTO: + line->append(Cache[I].CandVersion); + if ((Cache[I].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto) + line->append(", automatic"); + break; + case CURRENT_CANDIDATE: line->append(Cache[I].CurVersion).append(", ").append(Cache[I].CandVersion); break; + case CURRENT: line->append(Cache[I].CurVersion); break; } + line->append("), "); } if (_config->Exists("Commandline::AsString") == true) WriteHistoryTag("Commandline", _config->Find("Commandline::AsString")); WriteHistoryTag("Install", install); + WriteHistoryTag("Reinstall", reinstall); WriteHistoryTag("Upgrade", upgrade); WriteHistoryTag("Downgrade",downgrade); WriteHistoryTag("Remove",remove); @@@ -1280,23 -1277,6 +1288,23 @@@ bool pkgDPkgPM::Go(int OutStatusFd if (RunScripts("DPkg::Post-Invoke") == false) return false; + if (_config->FindB("Debug::pkgDPkgPM",false) == false) + { + std::string const oldpkgcache = _config->FindFile("Dir::cache::pkgcache"); + if (oldpkgcache.empty() == false && RealFileExists(oldpkgcache) == true && + unlink(oldpkgcache.c_str()) == 0) + { + std::string const srcpkgcache = _config->FindFile("Dir::cache::srcpkgcache"); + if (srcpkgcache.empty() == false && RealFileExists(srcpkgcache) == true) + { + _error->PushToStack(); + pkgCacheFile CacheFile; + CacheFile.BuildCaches(NULL, true); + _error->RevertToStack(); + } + } + } + Cache.writeStateFile(NULL); return true; } diff --combined debian/changelog index c8a4f4477,16c0990d9..6ba17d067 --- a/debian/changelog +++ b/debian/changelog @@@ -1,4 -1,4 +1,4 @@@ -apt (0.8.15) UNRELEASED; urgency=low +apt (0.8.14.2) UNRELEASED; urgency=low [ Julian Andres Klode ] * apt-pkg/depcache.cc: @@@ -17,8 -17,6 +17,8 @@@ [ Christian Perrier ] * Galician translation update (Miguel Anxo Bouzada). Closes: #626505 * Italian translation update (Milo Casagrande). Closes: #627834 + * German documentation translation update (Chris Leick). Closes: #629949 + * Catalan translation update (Jordi Mallach). Closes: #630657 [ David Kalnischkies ] * fix a bunch of cppcheck warnings/errors based on a patch by @@@ -35,8 -33,6 +35,8 @@@ - let VisitRProvides report if the calls were successful * apt-pkg/deb/dpkgpm.cc: - replace obsolete usleep with nanosleep + - remove invalid pkgcache.bin and rebuild it if possible + - log reinstall commands in history.log * debian/apt{,-utils}.symbols: - update both experimental symbol-files to reflect 0.8.14 state * debian/rules: @@@ -77,16 -73,24 +77,32 @@@ * apt-pkg/packagemanager.cc: - ensure for Multi-Arch:same packages that they are unpacked in lock step even in immediate configuration (Closes: #618288) - + * apt-pkg/init.cc: + - don't set deprecated APT::Acquire::Translation, thanks Jörg Sommer! + * cmdline/apt-config.cc: + - show Acquire::Languages and APT::Architectures settings + in 'dump' (Closes: 626739) + * apt-pkg/orderlist.cc: + - ensure that an old version of a package with a provides can + never satisfy a dependency of a newer version of this package + + [ Michael Vogt ] + * methods/mirror.cc: + - ignore lines starting with "#" in the mirror file + - ignore non http urls in the mirrors + - append the dist (e.g. sid, wheezy) as a query string when + asking for a suitable mirror + * apt-pkg/deb/deblistparser.cc: + - include all known languages when building the apt cache + (LP: #794907) + * apt-pkg/deb/debindexfile.cc: + - remove some no longer valid checks for "TranslationsAvailable()" + + [ Kenneth Solbø Andersen ] + * apt-pkg/deb/dpkgpm.cc: + - set permissions of term.log to root.adm and 644 (LP: #404724) + - -- Michael Vogt Mon, 16 May 2011 14:57:52 +0200 + -- David Kalnischkies Sat, 28 May 2011 10:54:23 +0200 apt (0.8.14.1) unstable; urgency=low