From: Michael Vogt Date: Tue, 4 May 2010 07:57:24 +0000 (+0200) Subject: merge from the mvo branch X-Git-Tag: 0.8.0~15 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/52d9d000a74ea71edff93f00ae38aceb9ada53d4 merge from the mvo branch --- 52d9d000a74ea71edff93f00ae38aceb9ada53d4 diff --cc debian/changelog index f166b7d32,7c0024160..eb618118d --- a/debian/changelog +++ b/debian/changelog @@@ -1,92 -1,9 +1,105 @@@ -apt (0.7.25.4) UNRELEASED; urgency=low ++apt (0.7.26~exp4) unstable; urgency=low ++ ++ * [ Abi break ] apt-pkg/acquire-item.{cc,h}: ++ - add "IsIndexFile" to constructor of pkgAcqFile so that it sends ++ the right cache control headers ++ * apt-pkg/depcache.cc: ++ - fix incorrect std::cout usage for debug output ++ * test/libapt/getlanguages_test.cc: ++ - Add test for Esperanto that has nocounty associated with them ++ (LP: #560956) ++ ++ -- Michael Vogt Tue, 04 May 2010 09:55:08 +0200 ++ +apt (0.7.26~exp3) UNRELEASED; urgency=low + + [ Christian Perrier ] + * German translation update. Closes: #571037 + * Spanish manpages translation update. Closes: #573293 + * Dutch translation update. Closes: #573946 + * Polish manpages translation update. Closes: #574558 + * Add "manpages-pl (<< 20060617-3~)" to avoid file conflicts with + that package that was providing some manpages for APT utilities. + + [ Julian Andres Klode ] + * cmdline/apt-cache.cc: + - Change behavior of showsrc to match the one of show (Closes: #512046). + * cmdline/apt-key: + - Honor Apt::GPGV::TrustedKeyring (Closes: #316390) + * cmdline/apt-mark: + - Use the new python-apt API (and conflict with python-apt << 0.7.93.2). + * apt-inst/contrib/arfile.h: + - Add public ARArchive::Members() which returns the list of members. + * apt-pkg/policy.cc: + - Always return a candidate if there is at least one version pinned > 0 + (Closes: #512318) + * ftparchive/apt-ftparchive.cc: + - Read default configuration (Closes: #383257) + * debian/rules: + - Fix the libraries name to be e.g. libapt-pkg4.9 instead of + libapt-pkg-4.9. + + [ Michael Vogt ] + * apt-pkg/deb/dpkgpm.cc: + - fix backgrounding when dpkg runs (closes: #486222) + * cmdline/apt-mark: + - show error on incorrect aguments (LP: #517917), thanks to + Torsten Spindler + * cmdline/apt-get.cc: + - if apt-get source foo=version or foo/distro can not be found, + error out (LP: #502641) + * apt-pkg/packagemanager.cc: + - better debug output + * doc/examples/configure-index: + - add missing Debug::pkgPackageManager option + + -- Christian Perrier Wed, 24 Feb 2010 22:13:50 +0100 + +apt (0.7.26~exp2) experimental; urgency=low + + * fix crash when LANGUAGE is not set + + -- Michael Vogt Thu, 18 Feb 2010 22:07:23 +0100 + +apt (0.7.26~exp1) experimental; urgency=low + + [ David Kalnischkies ] + * [BREAK] add possibility to download and use multiply + Translation files, configurable with Acquire::Translation + (Closes: #444222, #448216, #550564) + * Ignore :qualifiers after package name in build dependencies + for now as long we don't understand them (Closes: #558103) + * apt-pkg/contrib/mmap.{cc,h}: + - extend it to have a growable flag - unused now but maybe... + * apt-pkg/pkgcache.h: + - use long instead of short for {Ver,Desc}File size, + patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917) + * apt-pkg/acquire-item.cc: + - allow also to skip the last patch if target is reached, + thanks Bernhard R. Link! (Closes: #545699) + * ftparchive/writer.{cc,h}: + - add --arch option for packages and contents commands + - if an arch is given accept only *_all.deb and *_arch.deb instead + of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710) + - add APT::FTPArchive::AlwaysStat to disable the too aggressive + caching if versions are build multiply times (not recommend) + Patch by Christoph Goehre, thanks! (Closes: #463260) + * apt-pkg/deb/dpkgpm.cc: + - stdin redirected to /dev/null takes all CPU (Closes: #569488) + Thanks to Aurelien Jarno for providing (again) a patch! + * buildlib/apti18n.h.in, po/makefile: + - add ngettext support with P_() + * aptconfiguration.cc: + - include all existing Translation files in the Cache (Closes: 564137) + * debian/control: + - update with no changes to debian policy 3.8.4 + * doc/apt_preferences.5.xml: + - explicitly warn against careless use (Closes: #567669) + * debian/rules: + - remove creation of empty dir /usr/share/apt + * doc/apt-cdrom.8.xml: + - fix typo spotted by lintian: proc(c)eed - [ Evan Dandrea ] - * Remember hosts with general failures for - https://wiki.ubuntu.com/NetworklessInstallationFixes (LP: #556831). - [ Ivan Masár ] * Slovak translation update. Closes: #568294 diff --cc test/libapt/getlanguages_test.cc index 0db190b50,000000000..9a8910b58 mode 100644,000000..100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@@ -1,142 -1,0 +1,149 @@@ +#include +#include + +#include "assert.h" +#include +#include + +#include + +// simple helper to quickly output a vector of strings +void dumpVector(std::vector vec) { + for (std::vector::const_iterator v = vec.begin(); + v != vec.end(); v++) + std::cout << *v << std::endl; +} + +int main(int argc,char *argv[]) +{ + if (argc != 2) { + std::cout << "One parameter expected - given " << argc << std::endl; + return 100; + } + + char const* env[2]; + env[0] = "de_DE.UTF-8"; + env[1] = ""; + + std::vector vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + // Special: Check if the cache is actually in use + env[0] = "en_GB.UTF-8"; + vec = APT::Configuration::getLanguages(false, true, env); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + env[0] = "en_GB.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "en_GB"); + equals(vec[1], "en"); + ++ // esperanto ++ env[0] = "eo.UTF-8"; ++ vec = APT::Configuration::getLanguages(false, false, env); ++ equals(vec.size(), 2); ++ equals(vec[0], "eo"); ++ equals(vec[1], "en"); ++ + env[0] = "tr_DE@euro"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "tr"); + equals(vec[1], "en"); + + env[0] = "de_NO"; + env[1] = "se_NO:en_GB:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 5); + equals(vec[0], "de"); + equals(vec[1], "en_GB"); + equals(vec[2], "nb"); + equals(vec[3], "no"); + equals(vec[4], "en"); + + env[0] = "pt_PR.UTF-8"; + env[1] = ""; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 3); + equals(vec[0], "pt_PR"); + equals(vec[1], "pt"); + equals(vec[2], "en"); + + env[0] = "ast_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); // bogus, but syntactical correct + equals(vec.size(), 2); + equals(vec[0], "ast"); + equals(vec[1], "en"); + + env[0] = "C"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 1); + equals(vec[0], "en"); + + _config->Set("Acquire::Languages::1", "environment"); + _config->Set("Acquire::Languages::2", "en"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + _config->Set("Acquire::Languages::3", "de"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 2); + equals(vec[0], "de"); + equals(vec[1], "en"); + + _config->Set("Dir::State::lists", argv[1]); + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 5); + equals(vec[0], "de"); + equals(vec[1], "en"); + equals(vec[2], "none"); + equals(vec[3], "pt"); + equals(vec[4], "tr"); + + _config->Set("Dir::State::lists", "/non-existing-dir"); + _config->Set("Acquire::Languages::1", "none"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 0); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec[0], "en"); + equals(vec[1], "de"); + + _config->Set("Acquire::Languages::1", "fr"); + _config->Set("Acquire::Languages", "de_DE"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 1); + equals(vec[0], "de_DE"); + + _config->Set("Acquire::Languages", "none"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 0); + + _config->Set("Acquire::Languages", ""); + //FIXME: Remove support for this deprecated setting + _config->Set("APT::Acquire::Translation", "ast_DE"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 2); + equals(vec[0], "ast_DE"); + equals(vec[1], "en"); + _config->Set("APT::Acquire::Translation", "none"); + env[0] = "de_DE.UTF-8"; + vec = APT::Configuration::getLanguages(true, false, env); + equals(vec.size(), 1); + equals(vec[0], "en"); + + return 0; +}