From 1dd20368486820efb6ef4476ad739e967174bec4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 28 Oct 2015 14:38:49 +0100 Subject: support arch:all data e.g. in separate Packages file Based on a discussion with Niels Thykier who asked for Contents-all this implements apt trying for all architecture dependent files to get a file for the architecture all, which is treated internally now as an official architecture which is always around (like native). This way arch:all data can be shared instead of duplicated for each architecture requiring the user to download the same information again and again. There is one problem however: In Debian there is already a binary-all/ Packages file, but the binary-any files still include arch:all packages, so that downloading this file now would be a waste of time, bandwidth and diskspace. We therefore need a way to decide if it makes sense to download the all file for Packages in Debian or not. The obvious answer would be a special flag in the Release file indicating this, which would need to default to 'no' and every reasonable repository would override it to 'yes' in a few years time, but the flag would be there "forever". Looking closer at a Release file we see the field "Architectures", which doesn't include 'all' at the moment. With the idea outlined above that 'all' is a "proper" architecture now, we interpret this field as being authoritative in declaring which architectures are supported by this repository. If it says 'all', apt will try to get all, if not it will be skipped. This gives us another interesting feature: If I configure a source to download armel and mips, but it declares it supports only armel apt will now print a notice saying as much. Previously this was a very cryptic failure. If on the other hand the repository supports mips, too, but for some reason doesn't ship mips packages at the moment, this 'missing' file is silently ignored (= that is the same as the repository including an empty file). The Architectures field isn't mandatory through, so if it isn't there, we assume that every architecture is supported by this repository, which skips the arch:all if not listed in the release file. --- apt-pkg/acquire-item.cc | 26 ++++++++ apt-pkg/cdrom.cc | 3 - apt-pkg/deb/debmetaindex.cc | 28 ++++++++- apt-pkg/deb/debmetaindex.h | 1 + apt-pkg/metaindex.cc | 11 ++++ apt-pkg/metaindex.h | 3 + doc/apt-ftparchive.1.xml | 12 ++-- ftparchive/apt-ftparchive.cc | 44 +++++++++----- ftparchive/writer.cc | 63 ++++++++++--------- ftparchive/writer.h | 9 ++- test/integration/framework | 22 ++++--- test/integration/test-acquire-binary-all | 71 ++++++++++++++++++++++ .../test-acquire-same-repository-multiple-times | 16 ++--- test/integration/test-apt-acquire-additional-files | 53 ++++++++++++---- .../test-apt-acquire-additional-files-duplicates | 17 +++++- test/integration/test-apt-by-hash-update | 4 ++ test/integration/test-apt-cache | 3 +- test/integration/test-apt-cdrom | 8 +-- test/integration/test-apt-cli-show | 2 +- .../integration/test-apt-get-update-unauth-warning | 30 ++++++--- test/integration/test-apt-sources-deb822 | 22 +++++-- .../test-apt-translation-has-no-packages | 2 +- test/integration/test-apt-update-expected-size | 4 +- .../test-apt-update-failure-propagation | 20 ++++-- test/integration/test-apt-update-file | 8 +-- test/integration/test-apt-update-ims | 16 +++-- test/integration/test-apt-update-not-modified | 2 +- test/integration/test-apt-update-stale | 4 +- test/integration/test-apt-update-transactions | 8 +-- test/integration/test-apt-update-unauth | 4 +- .../test-bug-543966-downgrade-below-1000-pin | 10 +-- .../test-bug-683786-build-dep-on-virtual-packages | 1 - test/integration/test-compressed-indexes | 12 ++-- .../test-cve-2013-1051-InRelease-parsing | 4 +- .../test-external-dependency-solver-protocol | 30 ++++++++- .../test-handle-redirect-as-used-mirror-change | 3 +- test/integration/test-policy-pinning | 6 +- test/integration/test-security-no-remote-status | 2 +- .../test-sourceslist-arch-plusminus-options | 52 +++++++++------- .../test-sourceslist-lang-plusminus-options | 3 +- test/libapt/cdromfindpackages_test.cc | 14 +++-- 41 files changed, 473 insertions(+), 180 deletions(-) create mode 100755 test/integration/test-acquire-binary-all diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index b29de665b..6cf23daae 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1050,6 +1050,16 @@ void pkgAcqMetaBase::QueueIndexes(bool const verify) /*{{{*/ Target != IndexTargets.end(); ++Target) { + // all is an implementation detail. Users shouldn't use this as arch + // We need this support trickery here as e.g. Debian has binary-all files already, + // but arch:all packages are still in the arch:any files, so we would waste precious + // download time, bandwidth and diskspace for nothing, BUT Debian doesn't feature all + // in the set of supported architectures, so we can filter based on this property rather + // than invent an entirely new flag we would need to carry for all of eternity. + if (Target->Option(IndexTarget::ARCHITECTURE) == "all" && + TransactionManager->MetaIndexParser->IsArchitectureSupported("all") == false) + continue; + bool trypdiff = Target->OptionBool(IndexTarget::PDIFFS); if (verify == true) { @@ -1059,6 +1069,22 @@ void pkgAcqMetaBase::QueueIndexes(bool const verify) /*{{{*/ if (Target->IsOptional) continue; + std::string const &arch = Target->Option(IndexTarget::ARCHITECTURE); + if (arch.empty() == false) + { + if (TransactionManager->MetaIndexParser->IsArchitectureSupported(arch) == false) + { + _error->Notice(_("Skipping acquire of configured file '%s' as repository '%s' doesn't support architecture '%s'"), + Target->MetaKey.c_str(), TransactionManager->Target.Description.c_str(), arch.c_str()); + continue; + } + // if the architecture is officially supported but currently no packages for it available, + // ignore silently as this is pretty much the same as just shipping an empty file. + // if we don't know which architectures are supported, we do NOT ignore it to notify user about this + if (TransactionManager->MetaIndexParser->IsArchitectureSupported("*undefined*") == false) + continue; + } + Status = StatAuthError; strprintf(ErrorText, _("Unable to find expected entry '%s' in Release file (Wrong sources.list entry or malformed file)"), Target->MetaKey.c_str()); return; diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index dea4a88c3..b950648b9 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -156,10 +156,7 @@ bool pkgCdrom::FindPackages(string CD, // Skip some files.. if (strcmp(Dir->d_name,".") == 0 || strcmp(Dir->d_name,"..") == 0 || - //strcmp(Dir->d_name,"source") == 0 || strcmp(Dir->d_name,".disk") == 0 || - strcmp(Dir->d_name,"experimental") == 0 || - strcmp(Dir->d_name,"binary-all") == 0 || strcmp(Dir->d_name,"debian-installer") == 0) continue; diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index a53d32d34..a43ec706f 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -49,6 +49,8 @@ class APT_HIDDEN debReleaseIndexPrivate /*{{{*/ time_t ValidUntilMin; time_t ValidUntilMax; + std::vector Architectures; + debReleaseIndexPrivate() : CheckValidUntil(metaIndex::TRI_UNSET), ValidUntilMin(0), ValidUntilMax(0) {} }; /*}}}*/ @@ -252,12 +254,20 @@ static void GetIndexTargetsFor(char const * const Type, std::string const &URI, Options.insert(std::make_pair("COMPRESSIONTYPES", CompressionTypes)); Options.insert(std::make_pair("SOURCESENTRY", E->sourcesEntry)); + bool IsOpt = IsOptional; + if (IsOpt == false) + { + auto const arch = Options.find("ARCHITECTURE"); + if (arch != Options.end() && arch->second == "all") + IsOpt = true; + } + IndexTarget Target( MetaKey, ShortDesc, LongDesc, Options.find("BASE_URI")->second + MetaKey, - IsOptional, + IsOpt, KeepCompressed, Options ); @@ -331,6 +341,11 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro Suite = Section.FindS("Suite"); Codename = Section.FindS("Codename"); + { + std::string const archs = Section.FindS("Architectures"); + if (archs.empty() == false) + d->Architectures = VectorizeString(archs, ' '); + } bool FoundHashSum = false; for (int i=0;HashString::SupportedHashes()[i] != NULL; i++) @@ -591,6 +606,13 @@ bool debReleaseIndex::IsTrusted() const return FileExists(MetaIndexFile("InRelease")); } /*}}}*/ +bool debReleaseIndex::IsArchitectureSupported(std::string const &arch) const/*{{{*/ +{ + if (d->Architectures.empty()) + return true; + return std::find(d->Architectures.begin(), d->Architectures.end(), arch) != d->Architectures.end(); +} + /*}}}*/ std::vector *debReleaseIndex::GetIndexFiles() /*{{{*/ { if (Indexes != NULL) @@ -729,6 +751,10 @@ static std::vector parsePlusMinusOptions(std::string const &Name, / else Values = defaultValues; + // all is a very special architecture users shouldn't be concerned with explicitly + if (Name == "arch" && std::find(Values.begin(), Values.end(), "all") == Values.end()) + Values.push_back("all"); + if ((val = Options.find(Name + "+")) != Options.end()) { std::vector const plus = VectorizeString(val->second, ','); diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 37515f934..538f13f33 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -58,6 +58,7 @@ class APT_HIDDEN debReleaseIndex : public metaIndex bool SetSignedBy(std::string const &SignedBy); virtual bool IsTrusted() const APT_OVERRIDE; + bool IsArchitectureSupported(std::string const &arch) const; void AddComponent(std::string const &sourcesEntry, bool const isSrc, std::string const &Name, diff --git a/apt-pkg/metaindex.cc b/apt-pkg/metaindex.cc index 5c095a2ad..fe948243e 100644 --- a/apt-pkg/metaindex.cc +++ b/apt-pkg/metaindex.cc @@ -3,6 +3,8 @@ #include #include +#include + #include #include /*}}}*/ @@ -100,3 +102,12 @@ void metaIndex::swapLoad(metaIndex * const OldMetaIndex) /*{{{*/ std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully); } /*}}}*/ + +bool metaIndex::IsArchitectureSupported(std::string const &arch) const /*{{{*/ +{ + debReleaseIndex const * const deb = dynamic_cast(this); + if (deb != NULL) + return deb->IsArchitectureSupported(arch); + return true; +} + /*}}}*/ diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h index 94aec2d1f..ff531b4d7 100644 --- a/apt-pkg/metaindex.h +++ b/apt-pkg/metaindex.h @@ -107,6 +107,9 @@ public: metaIndex(std::string const &URI, std::string const &Dist, char const * const Type); virtual ~metaIndex(); + + // FIXME: make virtual on next abi break + bool IsArchitectureSupported(std::string const &arch) const; }; #endif diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index 5b2cd83e8..edebb0808 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -368,9 +368,13 @@ for i in Sections do - This is a space separated list of all the - architectures that appear under search section. The special architecture - 'source' is used to indicate that this tree has a source archive. + This is a space separated list of all the architectures that appear under + search section. The special architecture 'source' is used to indicate + that this tree has a source archive. The architecture 'all' signals that + architecture specific files like Packages should not + include information about architecture all packages in + all files as they will be available in a dedicated file. + @@ -589,7 +593,7 @@ for i in Sections do &apt-commonoptions; - + diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index b31c92845..c7e38badf 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -68,6 +68,7 @@ struct PackageMap // We generate for this given arch string Arch; + bool IncludeArchAll; // Stuff for the Source File string SrcFile; @@ -122,9 +123,9 @@ struct PackageMap vector::iterator End, unsigned long &Left); - PackageMap() : LongDesc(true), TransWriter(NULL), DeLinkLimit(0), Permissions(1), - ContentsDone(false), PkgDone(false), SrcDone(false), - ContentsMTime(0) {}; + PackageMap() : IncludeArchAll(true), LongDesc(true), TransWriter(NULL), + DeLinkLimit(0), Permissions(1), ContentsDone(false), + PkgDone(false), SrcDone(false), ContentsMTime(0) {}; }; /*}}}*/ @@ -184,7 +185,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats) PackagesWriter Packages(&Comp.Input, TransWriter, flCombine(CacheDir,BinCacheDB), flCombine(OverrideDir,BinOverride), flCombine(OverrideDir,ExtraOverride), - Arch); + Arch, IncludeArchAll); if (PkgExt.empty() == false && Packages.SetExts(PkgExt) == false) return _error->Error(_("Package extension list is too long")); if (_error->PendingError() == true) @@ -364,7 +365,7 @@ bool PackageMap::GenContents(Configuration &Setup, MultiCompress Comp(flCombine(ArchiveDir,this->Contents), CntCompress,Permissions); Comp.UpdateMTime = Setup.FindI("Default::ContentsAge",10)*24*60*60; - ContentsWriter Contents(&Comp.Input, "", Arch); + ContentsWriter Contents(&Comp.Input, "", Arch, IncludeArchAll); if (PkgExt.empty() == false && Contents.SetExts(PkgExt) == false) return _error->Error(_("Package extension list is too long")); if (_error->PendingError() == true) @@ -487,6 +488,8 @@ static void LoadTree(vector &PkgList, std::vectorFindB("APT::FTPArchive::LongDescription", true)); string const TranslationCompress = Setup.Find("Default::Translation::Compress",". gzip").c_str(); + bool const ConfIncludeArchAllExists = _config->Exists("APT::FTPArchive::IncludeArchitectureAll"); + bool const ConfIncludeArchAll = _config->FindB("APT::FTPArchive::IncludeArchitectureAll", true); // Process 'tree' type sections const Configuration::Item *Top = Setup.Tree("tree"); @@ -501,25 +504,32 @@ static void LoadTree(vector &PkgList, std::vector const Archs = VectorizeString(Tmp2, ' '); + bool IncludeArchAll; + if (ConfIncludeArchAllExists == true) + IncludeArchAll = ConfIncludeArchAll; + else + IncludeArchAll = std::find(Archs.begin(), Archs.end(), "all") == Archs.end(); + for (auto const& Arch: Archs) { + if (Arch.empty()) continue; + Vars[2].Contents = &Arch; PackageMap Itm; Itm.Permissions = Perms; Itm.BinOverride = SubstVar(Block.Find("BinOverride"),Vars); Itm.InternalPrefix = SubstVar(Block.Find("InternalPrefix",DIPrfx.c_str()),Vars); - if (stringcasecmp(Arch,"source") == 0) + if (Arch == "source") { Itm.SrcOverride = SubstVar(Block.Find("SrcOverride"),Vars); Itm.BaseDir = SubstVar(Block.Find("SrcDirectory",DSDir.c_str()),Vars); @@ -536,6 +546,7 @@ static void LoadTree(vector &PkgList, std::vectorFind("APT::FTPArchive::DB"), - Override, "", _config->Find("APT::FTPArchive::Architecture")); + Override, "", _config->Find("APT::FTPArchive::Architecture"), + _config->FindB("APT::FTPArchive::IncludeArchitectureAll", true)); if (_error->PendingError() == true) return false; diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 27d6e98e0..0bd2be566 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -71,7 +71,8 @@ static void ConfigToDoHashes(unsigned int &DoHashes, std::string const &Conf) /*}}}*/ // FTWScanner::FTWScanner - Constructor /*{{{*/ -FTWScanner::FTWScanner(FileFd * const GivenOutput, string const &Arch): Arch(Arch), DoHashes(~0) +FTWScanner::FTWScanner(FileFd * const GivenOutput, string const &Arch, bool const IncludeArchAll) + : Arch(Arch), IncludeArchAll(IncludeArchAll), DoHashes(~0) { if (GivenOutput == NULL) { @@ -326,6 +327,32 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, FileName = OriginalPath; } + return true; +} + /*}}}*/ +// FTWScanner::SetExts - Set extensions to support /*{{{*/ +// --------------------------------------------------------------------- +/* */ +bool FTWScanner::SetExts(string const &Vals) +{ + ClearPatterns(); + string::size_type Start = 0; + while (Start <= Vals.length()-1) + { + string::size_type const Space = Vals.find(' ',Start); + string::size_type const Length = ((Space == string::npos) ? Vals.length() : Space) - Start; + if ( Arch.empty() == false ) + { + AddPattern(string("*_") + Arch + Vals.substr(Start, Length)); + if (IncludeArchAll == true && Arch != "all") + AddPattern(string("*_all") + Vals.substr(Start, Length)); + } + else + AddPattern(string("*") + Vals.substr(Start, Length)); + + Start += Length + 1; + } + return true; } /*}}}*/ @@ -335,8 +362,8 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath, /* */ PackagesWriter::PackagesWriter(FileFd * const GivenOutput, TranslationWriter * const transWriter, string const &DB,string const &Overrides,string const &ExtOverrides, - string const &Arch) : - FTWScanner(GivenOutput, Arch), Db(DB), Stats(Db.Stats), TransWriter(transWriter) + string const &Arch, bool const IncludeArchAll) : + FTWScanner(GivenOutput, Arch, IncludeArchAll), Db(DB), Stats(Db.Stats), TransWriter(transWriter) { SetExts(".deb .udeb"); DeLinkLimit = 0; @@ -363,31 +390,6 @@ PackagesWriter::PackagesWriter(FileFd * const GivenOutput, TranslationWriter * c _error->DumpErrors(); } /*}}}*/ -// FTWScanner::SetExts - Set extensions to support /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool FTWScanner::SetExts(string const &Vals) -{ - ClearPatterns(); - string::size_type Start = 0; - while (Start <= Vals.length()-1) - { - string::size_type const Space = Vals.find(' ',Start); - string::size_type const Length = ((Space == string::npos) ? Vals.length() : Space) - Start; - if ( Arch.empty() == false ) - { - AddPattern(string("*_") + Arch + Vals.substr(Start, Length)); - AddPattern(string("*_all") + Vals.substr(Start, Length)); - } - else - AddPattern(string("*") + Vals.substr(Start, Length)); - - Start += Length + 1; - } - - return true; -} - /*}}}*/ // PackagesWriter::DoPackage - Process a single package /*{{{*/ // --------------------------------------------------------------------- /* This method takes a package and gets its control information and @@ -879,8 +881,9 @@ bool SourcesWriter::DoPackage(string FileName) // ContentsWriter::ContentsWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ContentsWriter::ContentsWriter(FileFd * const GivenOutput, string const &DB, string const &Arch) : - FTWScanner(GivenOutput, Arch), Db(DB), Stats(Db.Stats) +ContentsWriter::ContentsWriter(FileFd * const GivenOutput, string const &DB, + string const &Arch, bool const IncludeArchAll) : + FTWScanner(GivenOutput, Arch, IncludeArchAll), Db(DB), Stats(Db.Stats) { SetExts(".deb"); diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 98012beee..ea4c66da4 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -40,6 +40,7 @@ class FTWScanner protected: vector Patterns; string Arch; + bool IncludeArchAll; const char *OriginalPath; bool ErrorPrinted; @@ -79,7 +80,7 @@ class FTWScanner void AddPatterns(std::vector const &patterns) { Patterns.insert(Patterns.end(), patterns.begin(), patterns.end()); }; bool SetExts(string const &Vals); - FTWScanner(FileFd * const Output, string const &Arch = string()); + FTWScanner(FileFd * const Output, string const &Arch = string(), bool const IncludeArchAll = true); virtual ~FTWScanner(); }; @@ -125,7 +126,8 @@ class PackagesWriter : public FTWScanner PackagesWriter(FileFd * const Output, TranslationWriter * const TransWriter, string const &DB, string const &Overrides, string const &ExtOverrides = "", - string const &Arch = ""); + string const &Arch = "", + bool const IncludeArchAll = true); virtual ~PackagesWriter(); }; @@ -149,7 +151,8 @@ class ContentsWriter : public FTWScanner void Finish() {Gen.Print(*Output);}; inline bool ReadyDB(string const &DB) {return Db.ReadyDB(DB);}; - ContentsWriter(FileFd * const Output, string const &DB, string const &Arch = string()); + ContentsWriter(FileFd * const Output, string const &DB, string const &Arch = string(), + bool const IncludeArchAll = true); virtual ~ContentsWriter() {}; }; diff --git a/test/integration/framework b/test/integration/framework index f9bb2e824..04f54c8e2 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -774,7 +774,7 @@ EOF for DIST in $(find ./pool/ -maxdepth 1 -name '*.pkglist' -type f | cut -d'/' -f 3 | cut -d'.' -f 1 | sort | uniq); do cat < aptarchive/Release fi - if [ -n "$1" -a "$1" != "now" ]; then + if [ -n "$DATE" -a "$DATE" != "now" ]; then for release in $(find ./aptarchive -name 'Release'); do - sed -i "s/^Date: .*$/Date: $(date -d "$1" '+%a, %d %b %Y %H:%M:%S %Z')/" "$release" - touch -d "$1" "$release" + sed -i "s/^Date: .*$/Date: $(date -d "$DATE" '+%a, %d %b %Y %H:%M:%S %Z')/" "$release" + touch -d "$DATE" "$release" done fi - if [ -n "$2" ]; then + if [ -n "$VALIDUNTIL" ]; then sed -i "/^Date: / a\ -Valid-Until: $(date -d "$2" '+%a, %d %b %Y %H:%M:%S %Z')" $(find ./aptarchive -name 'Release') +Valid-Until: $(date -d "$VALIDUNTIL" '+%a, %d %b %Y %H:%M:%S %Z')" $(find ./aptarchive -name 'Release') fi msgdone "info" } diff --git a/test/integration/test-acquire-binary-all b/test/integration/test-acquire-binary-all new file mode 100755 index 000000000..478bf1a28 --- /dev/null +++ b/test/integration/test-acquire-binary-all @@ -0,0 +1,71 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +buildsimplenativepackage 'foo-1' 'all' '2' 'unstable' +buildsimplenativepackage 'foo-2' 'amd64' '2' 'unstable' +setupaptarchive --no-update + +msgmsg 'Releasefile with Architectures field and all included' +testsuccess apt update +cp rootdir/tmp/testsuccess.output aptupdate.output +testsuccess grep '^Get.* all Packages ' aptupdate.output +testequal 'foo-1 +foo-2' aptcache pkgnames foo- + +listcurrentlistsdirectory > lists.before +testsuccess grep '_binary-all_Packages' lists.before + +configarchitecture 'amd64' 'i386' +testsuccessequal "All packages are up to date. +N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update -q=0 -o quiet::NoProgress=1 +testfileequal lists.before "$(listcurrentlistsdirectory)" +testequal 'foo-1 +foo-2' aptcache pkgnames foo- + +rm -rf rootdir/var/lib/apt/lists +msgmsg 'Releasefile with Architectures field but without all' +getarchitecturesfromreleasefile() { echo "$(getarchitectures)"; } +generatereleasefiles +signreleasefiles +testsuccessequal "All packages are up to date. +N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'file:$(readlink -f ./aptarchive) unstable InRelease' doesn't support architecture 'i386'" apt update -q=0 -o quiet::NoProgress=1 +cp rootdir/tmp/testsuccess.output aptupdate.output +testfailure grep '^Get.* all Packages ' aptupdate.output +testequal 'foo-2' aptcache pkgnames foo- + +configarchitecture 'amd64' +testsuccess apt update +cp rootdir/tmp/testsuccess.output aptupdate.output +testfailure grep '^Get.* all Packages ' aptupdate.output +testequal 'foo-2' aptcache pkgnames foo- + +rm -rf rootdir/var/lib/apt/lists +msgmsg 'Releasefile without Architectures field' +getarchitecturesfromreleasefile() { echo -n ''; } +generatereleasefiles +signreleasefiles +testsuccess apt update +cp rootdir/tmp/testsuccess.output aptupdate.output +testsuccess grep '^Get.* all Packages ' aptupdate.output +testequal 'foo-1 +foo-2' aptcache pkgnames foo- + +# apt doesn't know supported archs, so missing a configured arch is a failure +configarchitecture 'amd64' 'i386' +testfailure apt update -q=0 +testequal 'foo-1 +foo-2' aptcache pkgnames foo- + +msgmsg 'No Releasefile' +rm -rf rootdir/var/lib/apt/lists +find aptarchive -name '*Release*' -delete +configarchitecture 'amd64' +testfailure apt update +testwarning apt update --allow-insecure-repositories +testequal 'foo-1 +foo-2' aptcache pkgnames foo- diff --git a/test/integration/test-acquire-same-repository-multiple-times b/test/integration/test-acquire-same-repository-multiple-times index b99496e35..eea81fd69 100755 --- a/test/integration/test-acquire-same-repository-multiple-times +++ b/test/integration/test-acquire-same-repository-multiple-times @@ -55,17 +55,17 @@ tworepos() { Candidate: 1.0 Version table: 1.0 500 - 500 $1:$2 jessie/main amd64 Packages - 500 $1:$2 stable/main amd64 Packages" aptcache policy foo + 500 $1:$2 jessie/main all Packages + 500 $1:$2 stable/main all Packages" aptcache policy foo testfailure aptcache show foo/unstable testsuccess aptcache show foo/stable testsuccess aptcache show foo/jessie } tworepos 'file' "$APTARCHIVE" 'no partial' -testequal '12' grep -c '200%20URI%20Start' ./download.log -testequal '12' grep -c '201%20URI%20Done' ./download.log -testequal '6' grep -c '^ @ Queue: Action combined' ./download.log +testequal '14' grep -c '200%20URI%20Start' ./download.log +testequal '14' grep -c '201%20URI%20Done' ./download.log +testequal '8' grep -c '^ @ Queue: Action combined' ./download.log tworepos 'file' "$APTARCHIVE" 'hit' testequal '6' grep -c '200%20URI%20Start' ./download.log testequal '6' grep -c '201%20URI%20Done' ./download.log @@ -75,9 +75,9 @@ rm -rf rootdir/var/lib/apt/lists changetowebserver tworepos 'http' "//localhost:${APTHTTPPORT}" 'no partial' -testequal '10' grep -c '200%20URI%20Start' ./download.log -testequal '10' grep -c '201%20URI%20Done' ./download.log -testequal '6' grep -c '^ @ Queue: Action combined' ./download.log +testequal '12' grep -c '200%20URI%20Start' ./download.log +testequal '12' grep -c '201%20URI%20Done' ./download.log +testequal '8' grep -c '^ @ Queue: Action combined' ./download.log tworepos 'http' "//localhost:${APTHTTPPORT}" 'hit' testequal '2' grep -c '200%20URI%20Start' ./download.log testequal '4' grep -c '201%20URI%20Done' ./download.log diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files index 4ba3c5bd9..552499ea2 100755 --- a/test/integration/test-apt-acquire-additional-files +++ b/test/integration/test-apt-acquire-additional-files @@ -19,12 +19,14 @@ changetowebserver testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris testsuccessequal "Get:1 http://localhost:${APTHTTPPORT} unstable InRelease [$(stat -c%s aptarchive/dists/unstable/InRelease) B] Get:2 http://localhost:${APTHTTPPORT} unstable/main Sources [$(stat -c%s aptarchive/dists/unstable/main/source/Sources.gz) B] Get:3 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B] -Get:4 http://localhost:${APTHTTPPORT} unstable/main Translation-en [$(stat -c%s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] +Get:4 http://localhost:${APTHTTPPORT} unstable/main all Packages [$(stat -c%s aptarchive/dists/unstable/main/binary-all/Packages.gz) B] +Get:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en [$(stat -c%s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] Reading package lists..." aptget update testempty find rootdir/var/lib/apt/lists -name '*Contents*' @@ -37,40 +39,59 @@ Acquire::IndexTargets::deb::Contents { }; EOF -testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64)" aptget indextargets --no-release-info --format '$(FILENAME)' 'Created-By: Contents' +readfile() { + while [ -n "$1" ]; do + readlink -f "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_${1}" + shift + done +} + +testequal "$(readfile Contents-amd64 Contents-all)" aptget indextargets --no-release-info --format '$(FILENAME)' 'Created-By: Contents' testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' # lets fake the existence of a compressed Contents file -touch ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz -testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +touch "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" +testequal "$(readfile Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +touch "./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" +testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 -'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0 " aptget update --print-uris +'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] Reading package lists..." aptget update -testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" find rootdir/var/lib/apt/lists -name '*Contents*' -testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" find rootdir/var/lib/apt/lists -name '*Contents-all*' +testequal "$(readfile Contents-amd64 Contents-all)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64" 'aptarchive/dists/unstable/main/Contents-amd64' +testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all" 'aptarchive/dists/unstable/main/Contents-all' -rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 +rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64 \ + ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' # if we asked for keeping it compressed, keep it echo 'Acquire::IndexTargets::deb::Contents::KeepCompressed "true";' >> rootdir/etc/apt/apt.conf.d/content-target.conf testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] Reading package lists..." aptget update -testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" find rootdir/var/lib/apt/lists -name '*Contents*' -testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" find rootdir/var/lib/apt/lists -name '*Contents-all*' +testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" 'aptarchive/dists/unstable/main/Contents-amd64.gz' +testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" 'aptarchive/dists/unstable/main/Contents-all.gz' rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz +rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' # and no automatic uncompress based on the name please, @@ -87,22 +108,28 @@ EOF testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 -'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.gz.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz 0 " aptget update --print-uris +'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-amd64.gz.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/Contents-all.gz.xz' localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] +Get:3 http://localhost:${APTHTTPPORT} unstable/main all Contents.gz [$(stat -c%s aptarchive/dists/unstable/main/Contents-all.gz) B] Reading package lists..." aptget update -testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" find rootdir/var/lib/apt/lists -name '*Contents*' -testequal "$(readlink -f ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" find rootdir/var/lib/apt/lists -name '*Contents-amd64*' +testequal "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" find rootdir/var/lib/apt/lists -name '*Contents-all*' +testequal "$(readfile Contents-amd64.gz Contents-all.gz)" aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-amd64.gz" 'aptarchive/dists/unstable/main/Contents-amd64.gz' +testsuccess cmp "rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz" 'aptarchive/dists/unstable/main/Contents-all.gz' rm -f rootdir/etc/apt/apt.conf.d/content-target.conf testequal "'http://localhost:${APTHTTPPORT}/dists/unstable/InRelease' localhost:${APTHTTPPORT}_dists_unstable_InRelease 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/source/Sources.xz' localhost:${APTHTTPPORT}_dists_unstable_main_source_Sources 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-amd64/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-amd64_Packages 0 +'http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-all/Packages.xz' localhost:${APTHTTPPORT}_dists_unstable_main_binary-all_Packages 0 'http://localhost:${APTHTTPPORT}/dists/unstable/main/i18n/Translation-en.xz' localhost:${APTHTTPPORT}_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease diff --git a/test/integration/test-apt-acquire-additional-files-duplicates b/test/integration/test-apt-acquire-additional-files-duplicates index dbfc0eb74..c8d386cbe 100755 --- a/test/integration/test-apt-acquire-additional-files-duplicates +++ b/test/integration/test-apt-acquire-additional-files-duplicates @@ -38,9 +38,11 @@ testsuccessequal "${APTLISTS}/example.org_debian_dists_stable_main_source_Source ${APTLISTS}/example.org_debian_dists_stable_rocks_source_Sources ${APTLISTS}/example.org_debian_dists_stable_main_binary-amd64_Packages ${APTLISTS}/example.org_debian_dists_stable_main_binary-i386_Packages +${APTLISTS}/example.org_debian_dists_stable_main_binary-all_Packages ${APTLISTS}/example.org_debian_dists_stable_main_i18n_Translation-en ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-amd64_Packages ${APTLISTS}/example.org_debian_dists_stable_rocks_binary-i386_Packages +${APTLISTS}/example.org_debian_dists_stable_rocks_binary-all_Packages ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)' cat >> rootdir/etc/apt/sources.list <> rootdir/etc/apt/sources.list < Installed-Size: 43.0 kB Download-Size: unknown APT-Manual-Installed: yes -APT-Sources: file:$APTARCHIVE unstable/main i386 Packages +APT-Sources: file:$APTARCHIVE unstable/main all Packages Description: Some description That has multiple lines " apt show foo diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning index f1515a9c8..435828292 100755 --- a/test/integration/test-apt-get-update-unauth-warning +++ b/test/integration/test-apt-get-update-unauth-warning @@ -37,7 +37,9 @@ testequal 'lock partial' ls rootdir/var/lib/apt/lists filesize() { - stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $1" | cut -d'/' -f 3- ).gz" + local CREATEDBY="$1" + shift + stat -c%s "$(aptget indextargets --no-release-info --format '$(URI)' "Created-By: $CREATEDBY" "$@" | cut -d'/' -f 3- ).gz" } # allow override #aptget update --allow-insecure-repositories -o Debug::pkgAcquire::worker=1 @@ -54,8 +56,11 @@ Ign:3 file:$APTARCHIVE unstable/main Sources Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages + File not found +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en File not found Get:3 file:$APTARCHIVE unstable/main Sources Ign:3 file:$APTARCHIVE unstable/main Sources @@ -63,8 +68,11 @@ Ign:3 file:$APTARCHIVE unstable/main Sources Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages + File not found +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en File not found Get:3 file:$APTARCHIVE unstable/main Sources Ign:3 file:$APTARCHIVE unstable/main Sources @@ -72,12 +80,16 @@ Ign:3 file:$APTARCHIVE unstable/main Sources Get:4 file:$APTARCHIVE unstable/main i386 Packages Ign:4 file:$APTARCHIVE unstable/main i386 Packages File not found -Get:5 file:$APTARCHIVE unstable/main Translation-en -Ign:5 file:$APTARCHIVE unstable/main Translation-en +Get:5 file:$APTARCHIVE unstable/main all Packages +Ign:5 file:$APTARCHIVE unstable/main all Packages + File not found +Get:6 file:$APTARCHIVE unstable/main Translation-en +Ign:6 file:$APTARCHIVE unstable/main Translation-en File not found Get:3 file:$APTARCHIVE unstable/main Sources [$(filesize 'Sources') B] -Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages') B] -Get:5 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] +Get:4 file:$APTARCHIVE unstable/main i386 Packages [$(filesize 'Packages' 'Architecture: i386') B] +Get:5 file:$APTARCHIVE unstable/main all Packages [$(filesize 'Packages' 'Architecture: all') B] +Get:6 file:$APTARCHIVE unstable/main Translation-en [$(filesize 'Translations') B] Reading package lists... W: The repository 'file:$APTARCHIVE unstable Release' does not have a Release file. N: Data from such a repository can not be authenticated and is therefore potentially dangerous to use. diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822 index 662a866aa..c29fde0c4 100755 --- a/test/integration/test-apt-sources-deb822 +++ b/test/integration/test-apt-sources-deb822 @@ -30,38 +30,41 @@ msgcleantest 'Test sources.list' 'old style' echo "deb http://ftp.debian.org/debian stable main" > $LISTS testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test sources.list' 'old style with tabs' echo "deb http://ftp.debian.org/debian stable main" > $LISTS testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test sources.list' 'old style with forgotten end for options' echo "deb [trusted=yes arch+=armel,powerpc http://ftp.debian.org/debian stable main" > $LISTS -testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] not assignment) +testfailureequal --nomsg "E: Malformed entry 1 in list file $ABSLISTS ([option] not assignment) E: The list of sources could not be read." aptget update --print-uris msgcleantest 'Test sources.list' 'old style with stray ] instead of options' echo "deb ] http://ftp.debian.org/debian stable main" > $LISTS -testfailureequal "E: Malformed entry 1 in list file $ABSLISTS (URI parse) +testfailureequal --nomsg "E: Malformed entry 1 in list file $ABSLISTS (URI parse) E: The list of sources could not be read." aptget update --print-uris msgcleantest 'Test sources.list' 'old style options no key' echo "deb [=test] http://ftp.debian.org/debian stable main" > $LISTS -testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] no key) +testfailureequal --nomsg "E: Malformed entry 1 in list file $ABSLISTS ([option] no key) E: The list of sources could not be read." aptget update --print-uris msgcleantest 'Test sources.list' 'old style options no value' echo "deb [test=] http://ftp.debian.org/debian stable main" > $LISTS -testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] no value) +testfailureequal --nomsg "E: Malformed entry 1 in list file $ABSLISTS ([option] no value) E: The list of sources could not be read." aptget update --print-uris msgcleantest 'Test sources.list' 'old style with options' echo "deb [trusted=yes arch+=armel,powerpc] http://ftp.debian.org/debian stable main" > $LISTS testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/binary-powerpc/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-powerpc_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris @@ -70,18 +73,21 @@ msgcleantest 'Test sources.list' 'old style with comments' echo "deb http://ftp.debian.org/debian stable main # non-free" > $LISTS testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test sources.list' 'old style with option comments' echo "deb [trusted=yes#yeahreally] http://ftp.debian.org/debian stable main # non-free" > $LISTS testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test sources.list' 'simple deb822' echo "$BASE" > $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test deb822 with' 'two entries' @@ -91,9 +97,11 @@ echo "" >> $SOURCES echo "$BASE" | sed s/stable/unstable/ >> $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/unstable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris # two suite entries @@ -101,9 +109,11 @@ msgcleantest 'Test deb822 with' 'two Suite entries' echo "$BASE" | sed -e "s/stable/stable unstable/" > $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/unstable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test deb822' 'architecture option' @@ -112,6 +122,7 @@ echo "Architectures: amd64 armel" >> $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris msgcleantest 'Test old-style' 'suite arch variable' @@ -150,9 +161,11 @@ msgcleantest 'Test deb822 sources.list file which has' 'Multiple URIs work' echo "$BASE" | sed -e 's#http://ftp.debian.org/debian#http://ftp.debian.org/debian http://ftp.de.debian.org/debian#' > $SOURCES testsuccessequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0 'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.de.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.de.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.de.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.de.debian.org_debian_dists_stable_main_i18n_Translation-en 0 'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris # multiple Type in one field @@ -161,6 +174,7 @@ echo "$BASE" | sed -e 's#Types: deb#Types: deb deb-src#' > $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/source/Sources.xz' ftp.debian.org_debian_dists_stable_main_source_Sources 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 +'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris # a Suite diff --git a/test/integration/test-apt-translation-has-no-packages b/test/integration/test-apt-translation-has-no-packages index 4c57623b1..329e529ce 100755 --- a/test/integration/test-apt-translation-has-no-packages +++ b/test/integration/test-apt-translation-has-no-packages @@ -38,4 +38,4 @@ testsuccessequal "foo: Candidate: 1.0 Version table: 1.0 500 - 500 file:$APTARCHIVE unstable/main amd64 Packages" aptcache policy foo + 500 file:$APTARCHIVE unstable/main all Packages" aptcache policy foo diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size index 21568e9c2..825500b8e 100755 --- a/test/integration/test-apt-update-expected-size +++ b/test/integration/test-apt-update-expected-size @@ -7,7 +7,7 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" -insertpackage 'unstable' 'apt' 'all' '1.0' +insertpackage 'unstable' 'apt' 'i386' '1.0' setupaptarchive --no-update cp -a aptarchive/dists aptarchive/dists.good @@ -26,7 +26,7 @@ test_inreleasetoobig() { } test_packagestoobig() { - insertpackage 'unstable' 'foo' 'all' '1.0' + insertpackage 'unstable' 'foo' 'i386' '1.0' buildaptarchivefromfiles '+1 hour' signreleasefiles # append junk at the end of the Packages.gz/Packages diff --git a/test/integration/test-apt-update-failure-propagation b/test/integration/test-apt-update-failure-propagation index e4ce5f968..eda9cff99 100755 --- a/test/integration/test-apt-update-failure-propagation +++ b/test/integration/test-apt-update-failure-propagation @@ -37,14 +37,15 @@ testsuccessequal "foo: Candidate: 2 Version table: 2 500 - 500 http://localhost:${APTHTTPPORT} sid/main amd64 Packages + 500 http://localhost:${APTHTTPPORT} sid/main all Packages 1 500 - 500 https://localhost:${APTHTTPSPORT} stable/main amd64 Packages" aptcache policy foo + 500 https://localhost:${APTHTTPSPORT} stable/main all Packages" aptcache policy foo pretest mv aptarchive/dists/stable aptarchive/dists/stable.good testfailuremsg "E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file." apt update -testfailureequal "Hit:1 http://localhost:${APTHTTPPORT} sid InRelease +testfailure aptget update -q=0 --no-allow-insecure-repositories +testequalor2 "Hit:1 http://localhost:${APTHTTPPORT} sid InRelease Ign:2 https://localhost:${APTHTTPSPORT} stable InRelease 404 Not Found Err:3 https://localhost:${APTHTTPSPORT} stable Release @@ -52,7 +53,16 @@ Err:3 https://localhost:${APTHTTPSPORT} stable Release Reading package lists... E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file. N: Updating such a repository securily is impossible and therefore disabled by default. -N: See apt-secure(8) manpage for repository creation and user configuration details." aptget update -q=0 --no-allow-insecure-repositories +N: See apt-secure(8) manpage for repository creation and user configuration details." "Ign:1 https://localhost:${APTHTTPSPORT} stable InRelease + 404 Not Found +Err:2 https://localhost:${APTHTTPSPORT} stable Release + 404 Not Found +Hit:3 http://localhost:${APTHTTPPORT} sid InRelease +Reading package lists... +E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file. +N: Updating such a repository securily is impossible and therefore disabled by default. +N: See apt-secure(8) manpage for repository creation and user configuration details." cat rootdir/tmp/testfailure.output + mv aptarchive/dists/stable.good aptarchive/dists/stable posttest() { testsuccessequal "foo: @@ -60,7 +70,7 @@ posttest() { Candidate: 2 Version table: 2 500 - 500 http://localhost:${APTHTTPPORT} sid/main amd64 Packages" aptcache policy foo + 500 http://localhost:${APTHTTPPORT} sid/main all Packages" aptcache policy foo } posttest diff --git a/test/integration/test-apt-update-file b/test/integration/test-apt-update-file index f976993ca..c6e07f8b6 100755 --- a/test/integration/test-apt-update-file +++ b/test/integration/test-apt-update-file @@ -19,8 +19,8 @@ insertsource 'unstable' 'foo' 'all' '1' setupaptarchive --no-update # ensure the archive is not writable -addtrap 'prefix' 'chmod 750 aptarchive/dists/unstable/main/binary-amd64;' -chmod 550 aptarchive/dists/unstable/main/binary-amd64 +addtrap 'prefix' 'chmod 750 aptarchive/dists/unstable/main/binary-all;' +chmod 550 aptarchive/dists/unstable/main/binary-all testsuccess aptget update @@ -31,7 +31,7 @@ redatereleasefiles '+1 hour' testsuccess aptget update -o Debug::pkgAcquire::Auth=1 # file:/ isn't shown in the log, so see if it was downloaded anyhow cp -a rootdir/tmp/testsuccess.output rootdir/tmp/update.output -canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')" +canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-all/Packages.bz2 | sha512sum |cut -f1 -d' ')" testfailure grep -- "$canary" rootdir/tmp/update.output testfoo() { @@ -49,7 +49,7 @@ find rootdir/var/lib/apt/lists -name '*_Packages*' -delete testsuccess aptget update -o Debug::pkgAcquire::Auth=1 # file:/ isn't shown in the log, so see if it was downloaded anyhow cp -a rootdir/tmp/testsuccess.output rootdir/tmp/update.output -canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')" +canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-all/Packages.bz2 | sha512sum |cut -f1 -d' ')" testsuccess grep -- "$canary" rootdir/tmp/update.output testfoo diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims index 623c3d380..8b29fdbb9 100755 --- a/test/integration/test-apt-update-ims +++ b/test/integration/test-apt-update-ims @@ -7,6 +7,7 @@ setupenvironment configarchitecture 'amd64' insertpackage 'unstable' 'unrelated' 'all' '0.5~squeeze1' +insertpackage 'unstable' 'unrelated2' 'amd64' '0.5~squeeze1' insertsource 'unstable' 'unrelated' 'all' '0.5~squeeze1' setupaptarchive --no-update @@ -146,23 +147,30 @@ Ign:3 http://localhost:${APTHTTPPORT} unstable/main Sources 404 Not Found Ign:4 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages 404 Not Found -Ign:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en +Ign:5 http://localhost:${APTHTTPPORT} unstable/main all Packages + 404 Not Found +Ign:6 http://localhost:${APTHTTPPORT} unstable/main Translation-en 404 Not Found Ign:3 http://localhost:${APTHTTPPORT} unstable/main Sources 404 Not Found Ign:4 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages 404 Not Found -Ign:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en +Ign:5 http://localhost:${APTHTTPPORT} unstable/main all Packages + 404 Not Found +Ign:6 http://localhost:${APTHTTPPORT} unstable/main Translation-en 404 Not Found Ign:3 http://localhost:${APTHTTPPORT} unstable/main Sources 404 Not Found Ign:4 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages 404 Not Found -Ign:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en +Ign:5 http://localhost:${APTHTTPPORT} unstable/main all Packages + 404 Not Found +Ign:6 http://localhost:${APTHTTPPORT} unstable/main Translation-en 404 Not Found Hit:3 http://localhost:${APTHTTPPORT} unstable/main Sources Hit:4 http://localhost:${APTHTTPPORT} unstable/main amd64 Packages -Hit:5 http://localhost:${APTHTTPPORT} unstable/main Translation-en +Hit:5 http://localhost:${APTHTTPPORT} unstable/main all Packages +Hit:6 http://localhost:${APTHTTPPORT} unstable/main Translation-en Reading package lists... W: The repository 'http://localhost:${APTHTTPPORT} unstable Release' does not have a Release file. N: Data from such a repository can not be authenticated and is therefore potentially dangerous to use. diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified index 8cfc766d3..f6dea81e2 100755 --- a/test/integration/test-apt-update-not-modified +++ b/test/integration/test-apt-update-not-modified @@ -7,7 +7,7 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' 'i386' -insertpackage 'unstable' 'apt' 'all' '1.0' +insertpackage 'unstable' 'apt' 'amd64,i386' '1.0' setupaptarchive --no-update diff --git a/test/integration/test-apt-update-stale b/test/integration/test-apt-update-stale index dd4799d95..fd5ec8214 100755 --- a/test/integration/test-apt-update-stale +++ b/test/integration/test-apt-update-stale @@ -12,7 +12,7 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture "i386" -insertpackage 'unstable' 'foo' 'all' '1.0' +insertpackage 'unstable' 'foo' 'i386' '1.0' setupaptarchive --no-update changetowebserver @@ -25,7 +25,7 @@ listcurrentlistsdirectory > lists.before mkdir aptarchive/dists/unstable/main/binary-i386/saved cp -p aptarchive/dists/unstable/main/binary-i386/Packages* \ aptarchive/dists/unstable/main/binary-i386/saved -insertpackage 'unstable' 'foo' 'all' '2.0' +insertpackage 'unstable' 'foo' 'i386' '2.0' touch -d '+1 hour' aptarchive/dists/unstable/main/binary-i386/Packages compressfile aptarchive/dists/unstable/main/binary-i386/Packages # ensure that we do not get a I-M-S hit for the Release file diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions index a5dac1737..8651d3a15 100755 --- a/test/integration/test-apt-update-transactions +++ b/test/integration/test-apt-update-transactions @@ -10,8 +10,8 @@ setupenvironment configarchitecture 'i386' configcompression '.' 'gz' -insertpackage 'unstable' 'foo' 'all' '1.0' -insertsource 'unstable' 'foo' 'all' '1.0' +insertpackage 'unstable' 'foo' 'i386' '1.0' +insertsource 'unstable' 'foo' 'i386' '1.0' setupaptarchive --no-update @@ -31,8 +31,8 @@ restorefile() { testrun() { rm -rf aptarchive/dists.good cp -a aptarchive/dists aptarchive/dists.good - insertpackage 'unstable' 'bar' 'all' '1.0' - insertsource 'unstable' 'bar' 'all' '1.0' + insertpackage 'unstable' 'bar' 'i386' '1.0' + insertsource 'unstable' 'bar' 'i386' '1.0' buildaptarchivefromfiles '+1 hour' # produce an unsigned repository diff --git a/test/integration/test-apt-update-unauth b/test/integration/test-apt-update-unauth index 7347f7d10..17e62db22 100755 --- a/test/integration/test-apt-update-unauth +++ b/test/integration/test-apt-update-unauth @@ -13,8 +13,8 @@ umask 022 setupenvironment configarchitecture "i386" -insertpackage 'unstable' 'foo' 'all' '1.0' -insertsource 'unstable' 'foo' 'all' '1.0' +insertpackage 'unstable' 'foo' 'i386' '1.0' +insertsource 'unstable' 'foo' 'any' '1.0' setupaptarchive --no-update changetowebserver diff --git a/test/integration/test-bug-543966-downgrade-below-1000-pin b/test/integration/test-bug-543966-downgrade-below-1000-pin index 435b6876e..1aa37740b 100755 --- a/test/integration/test-bug-543966-downgrade-below-1000-pin +++ b/test/integration/test-bug-543966-downgrade-below-1000-pin @@ -22,7 +22,7 @@ testsuccessequal "base-files: *** 5.0.0-1 100 100 $STATUS 5.0.0 500 - 500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=0 + 500 file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=0 writepin() { echo "Package: $1 @@ -47,7 +47,7 @@ testpinning() { *** 5.0.0-1 100 100 $STATUS 5.0.0 ${PKGPINPRIO:-99} - ${REPPINPRIO:- 99} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=99 + ${REPPINPRIO:- 99} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=99 writepin "$1" '100' testsuccessequal "base-files: @@ -57,7 +57,7 @@ testpinning() { *** 5.0.0-1 100 100 $STATUS 5.0.0 ${PKGPINPRIO:-100} - ${REPPINPRIO:- 100} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=100 + ${REPPINPRIO:- 100} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=100 writepin "$1" '999' testsuccessequal "base-files: @@ -67,7 +67,7 @@ testpinning() { *** 5.0.0-1 100 100 $STATUS 5.0.0 ${PKGPINPRIO:-999} - ${REPPINPRIO:- 999} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=999 + ${REPPINPRIO:- 999} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=999 writepin "$1" '1000' testsuccessequal "base-files: @@ -77,7 +77,7 @@ testpinning() { *** 5.0.0-1 100 100 $STATUS 5.0.0 ${PKGPINPRIO:-1000} - ${REPPINPRIO:-1000} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=1000 + ${REPPINPRIO:-1000} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=1000 } msgmsg 'Tests with generic-form pin' diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages index 4a7c516d4..0ee76ea03 100755 --- a/test/integration/test-bug-683786-build-dep-on-virtual-packages +++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages @@ -12,7 +12,6 @@ insertpackage 'unstable' 'po-debconf' 'all' '1' insertsource 'unstable' 'dash' 'any' '1' 'Build-Depends: po-debconf' insertpackage 'unstable' 'make-po-debconf-pure-virtual' 'armel' '1' 'Depends: po-debconf' -insertpackage 'unstable' 'po-debconf' 'amd64' '1' insertsource 'unstable' 'diffutils' 'any' '1' 'Build-Depends: texi2html' insertpackage 'unstable' 'libselinux1-dev' 'amd64' '1' 'Provides: libselinux-dev' diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index d163a98ef..510166099 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -31,10 +31,12 @@ testrun() { local F msgtest 'Check if all index files are' "${1:-uncompressed}" if [ "$1" = 'compressed' ]; then - ! test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + ! test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1 + ! test -e rootdir/var/lib/apt/lists/*all_Packages || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 ! test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 - test -e rootdir/var/lib/apt/lists/*_Packages.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*i386_Packages.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*all_Packages.${COMPRESS} || F=1 test -e rootdir/var/lib/apt/lists/*_Sources.${COMPRESS} || F=1 test -e rootdir/var/lib/apt/lists/*_Translation-en.${COMPRESS} || F=1 # there is no point in trying pdiff if we have compressed indexes @@ -43,10 +45,12 @@ testrun() { else # clear the faked pdiff indexes so the glob below works rm -f rootdir/var/lib/apt/lists/*diff_Index - test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1 + test -e rootdir/var/lib/apt/lists/*all_Packages || F=1 test -e rootdir/var/lib/apt/lists/*_Sources || F=1 test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Packages.* || F=1 + ! test -e rootdir/var/lib/apt/lists/*i386_Packages.* || F=1 + ! test -e rootdir/var/lib/apt/lists/*all_Packages.* || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources.* || F=1 ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1 fi diff --git a/test/integration/test-cve-2013-1051-InRelease-parsing b/test/integration/test-cve-2013-1051-InRelease-parsing index 7a3e5f156..83e0db968 100755 --- a/test/integration/test-cve-2013-1051-InRelease-parsing +++ b/test/integration/test-cve-2013-1051-InRelease-parsing @@ -22,7 +22,7 @@ testsuccessequal "good-pkg: Candidate: 1.0 Version table: 1.0 500 - 500 ${ARCHIVE} stable/main i386 Packages" aptcache policy good-pkg + 500 ${ARCHIVE} stable/main all Packages" aptcache policy good-pkg # now exchange to the Packages file, note that this could be # done via MITM too @@ -63,4 +63,4 @@ testsuccessequal "good-pkg: Candidate: 1.0 Version table: 1.0 500 - 500 ${ARCHIVE} stable/main i386 Packages" aptcache policy good-pkg + 500 ${ARCHIVE} stable/main all Packages" aptcache policy good-pkg diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index cc8b5f1c4..2657e2f42 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -159,12 +159,38 @@ testsuccess aptinternalsolver scenario testsuccessequal 'Package: stuff Source: stuff Architecture: all +Version: 3 +Source-Version: 3 +APT-ID: 1 +Priority: optional +Section: other +Multi-Arch: foreign +APT-Release: + a=experimental,n=experimental,c=main,b=all +APT-Pin: 1 + +Package: stuff +Source: stuff +Architecture: all +Version: 2 +Source-Version: 2 +APT-ID: 3 +Priority: optional +Section: other +Multi-Arch: foreign +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: stuff +Source: stuff +Architecture: all Version: 1 Source-Version: 1 Installed: yes -APT-ID: 2 +APT-ID: 8 Priority: optional Section: other APT-Pin: 100 -APT-Candidate: yes ' aptinternalsolver scenario stuff diff --git a/test/integration/test-handle-redirect-as-used-mirror-change b/test/integration/test-handle-redirect-as-used-mirror-change index a1842462a..737df97f6 100755 --- a/test/integration/test-handle-redirect-as-used-mirror-change +++ b/test/integration/test-handle-redirect-as-used-mirror-change @@ -17,7 +17,8 @@ rewritesourceslist "http://localhost:${APTHTTPPORT}/redirectme" testsuccessequal "Get:1 http://0.0.0.0:${APTHTTPPORT} unstable InRelease [$(stat -c %s aptarchive/dists/unstable/InRelease) B] Get:2 http://0.0.0.0:${APTHTTPPORT} unstable/main Sources [$(stat -c %s aptarchive/dists/unstable/main/source/Sources.gz) B] Get:3 http://0.0.0.0:${APTHTTPPORT} unstable/main amd64 Packages [$(stat -c %s aptarchive/dists/unstable/main/binary-amd64/Packages.gz) B] -Get:4 http://0.0.0.0:${APTHTTPPORT} unstable/main Translation-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] +Get:4 http://0.0.0.0:${APTHTTPPORT} unstable/main all Packages [$(stat -c %s aptarchive/dists/unstable/main/binary-all/Packages.gz) B] +Get:5 http://0.0.0.0:${APTHTTPPORT} unstable/main Translation-en [$(stat -c %s aptarchive/dists/unstable/main/i18n/Translation-en.gz) B] Reading package lists..." aptget update testsuccessequal "Hit:1 http://0.0.0.0:${APTHTTPPORT} unstable InRelease diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index ea266e934..dba873656 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -101,11 +101,11 @@ testequalpolicycoolstuff() { local BPO2ARCHIVE="" if [ ! "$7" = "2.0~bpo2" ]; then BPO1PIN="$AB" - BPO1ARCHIVE=" $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages" + BPO1ARCHIVE=" $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main all Packages" else BPO2ARCHIVE=" 2.0~bpo2 $AB - $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages" + $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main all Packages" SB="$(echo "$SB" | tail -n 1)" shift fi @@ -117,7 +117,7 @@ testequalpolicycoolstuff() { $IB 2.0~bpo1 $PB ${BPO1ARCHIVE}$SB $IS 1.0 $AS - $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} stable/main i386 Packages$SS" \ + $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} stable/main all Packages$SS" \ aptcache policy coolstuff -o Policy=${INSTALLED}-${CANDIDATE}-${AB}-${AS}-${PB} $* } diff --git a/test/integration/test-security-no-remote-status b/test/integration/test-security-no-remote-status index af4940982..2badb30a4 100755 --- a/test/integration/test-security-no-remote-status +++ b/test/integration/test-security-no-remote-status @@ -20,7 +20,7 @@ testequal "pretends-installed: Candidate: 1 Version table: 1 500 - 500 file:${TMPDIR}/aptarchive unstable/main amd64 Packages" aptcache policy pretends-installed + 500 file:${TMPDIR}/aptarchive unstable/main all Packages" aptcache policy pretends-installed testequal "really-installed: Installed: 1 diff --git a/test/integration/test-sourceslist-arch-plusminus-options b/test/integration/test-sourceslist-arch-plusminus-options index 0091964e6..d487cce60 100755 --- a/test/integration/test-sourceslist-arch-plusminus-options +++ b/test/integration/test-sourceslist-arch-plusminus-options @@ -18,68 +18,74 @@ testbinaries() { } echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'default & native' 'amd64' +testbinaries 'default & native' 'amd64' 'all' configarchitecture 'amd64' 'i386' -testbinaries 'default & native + foreign' 'amd64' 'i386' +testbinaries 'default & native + foreign' 'amd64' 'i386' 'all' configarchitecture 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' -testbinaries 'default & native + many foreigns' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'default & native + many foreigns' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=native' 'amd64' +testbinaries 'arch=native' 'amd64' 'all' echo 'deb [arch=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=foreign' 'mips' +testbinaries 'arch=foreign' 'mips' 'all' echo 'deb [arch=kfreebsd-armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=unknown' 'kfreebsd-armel' +testbinaries 'arch=unknown' 'kfreebsd-armel' 'all' echo 'deb [arch=amd64,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=native,foreign' 'amd64' 'i386' +testbinaries 'arch=native,foreign' 'amd64' 'i386' 'all' echo 'deb [arch=mips,armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=foreign,foreign' 'mips' 'armhf' +testbinaries 'arch=foreign,foreign' 'mips' 'armhf' 'all' echo 'deb [arch=kfreebsd-armel,hurd-powerpc,mipsel,armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch=unknown,unknown,foreign,foreign' 'kfreebsd-armel' 'hurd-powerpc' 'mipsel' 'armel' +testbinaries 'arch=unknown,unknown,foreign,foreign' 'kfreebsd-armel' 'hurd-powerpc' 'mipsel' 'armel' 'all' echo 'deb [arch+=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch+=native' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'arch+=native' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch+=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'arch+=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch+=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch+=foreign,foreign,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'arch+=foreign,foreign,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch+=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch+=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' +testbinaries 'arch+=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all' echo 'deb [arch+=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch+=foreign,unknown,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' +testbinaries 'arch+=foreign,unknown,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all' echo 'deb [arch-=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch-=native' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'arch-=native' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch-=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mipsel' +testbinaries 'arch-=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mipsel' 'all' echo 'deb [arch-=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch-=foreign,foreign,foreign' 'amd64' 'armel' 'mipsel' +testbinaries 'arch-=foreign,foreign,foreign' 'amd64' 'armel' 'mipsel' 'all' echo 'deb [arch-=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch-=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' +testbinaries 'arch-=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' echo 'deb [arch-=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'arch-=foreign,unknown,foreign' 'amd64' 'armel' 'armhf' 'mipsel' +testbinaries 'arch-=foreign,unknown,foreign' 'amd64' 'armel' 'armhf' 'mipsel' 'all' echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'substract from a arch-set' 'i386' +testbinaries 'substract from a arch-set' 'i386' 'all' echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'useless subtract from a arch-set' 'i386' +testbinaries 'useless subtract from a arch-set' 'i386' 'all' echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf' +testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf' 'all' echo 'deb [arch=mips,i386 arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list -testbinaries 'useless addition to a arch-set' 'i386' 'mips' +testbinaries 'useless addition to a arch-set' 'i386' 'mips' 'all' + +echo 'deb [arch=i386 arch-=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testbinaries 'substract all from arch-set' 'i386' + +echo 'deb [arch=i386 arch+=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list +testbinaries 'useless addition of all' 'i386' 'all' diff --git a/test/integration/test-sourceslist-lang-plusminus-options b/test/integration/test-sourceslist-lang-plusminus-options index c61d5a4ca..660018358 100755 --- a/test/integration/test-sourceslist-lang-plusminus-options +++ b/test/integration/test-sourceslist-lang-plusminus-options @@ -44,7 +44,8 @@ testlangs 'lang=de_DE' 'de_DE' echo 'deb [lang=none] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list testlangs 'lang=none' '' -testequal 'amd64' aptget indextargets --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)' +testequal 'amd64 +all' aptget indextargets --no-release-info 'Created-By: Packages' --format '$(ARCHITECTURE)' echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list testlangs 'lang+=pt' 'en,de,de_DE,pt' diff --git a/test/libapt/cdromfindpackages_test.cc b/test/libapt/cdromfindpackages_test.cc index 719dd8f63..6121d32b6 100644 --- a/test/libapt/cdromfindpackages_test.cc +++ b/test/libapt/cdromfindpackages_test.cc @@ -46,7 +46,7 @@ TEST(CDROMTest,FindPackages) createDirectory(path, "dists/stable/main/binary-i386"); createDirectory(path, "dists/stable/main/source"); createDirectory(path, "dists/stable/contrib/binary-amd64"); - createDirectory(path, "dists/stable/contrib/binary-all"); + createDirectory(path, "dists/stable/non-free/binary-all"); createDirectory(path, "dists/unstable/main/binary-i386"); createDirectory(path, "dists/unstable/main/i18n"); createDirectory(path, "dists/unstable/main/source"); @@ -57,7 +57,7 @@ TEST(CDROMTest,FindPackages) createFile(path, "dists/stable/main/source/Sources.xz"); createFile(path, "dists/stable/contrib/binary-amd64/Packages"); createFile(path, "dists/stable/contrib/binary-amd64/Packages.gz"); - createFile(path, "dists/stable/contrib/binary-all/Packages"); + createFile(path, "dists/stable/non-free/binary-all/Packages"); createFile(path, "dists/unstable/main/binary-i386/Packages.xz"); createFile(path, "dists/unstable/main/binary-i386/Packages.lzma"); createFile(path, "dists/unstable/main/i18n/Translation-en"); @@ -74,11 +74,12 @@ TEST(CDROMTest,FindPackages) std::vector Packages, Sources, Signatur, Translation; std::string InfoDir; EXPECT_TRUE(cd.FindPackages(path, Packages, Sources, Signatur, Translation, InfoDir)); - EXPECT_EQ(4, Packages.size()); + EXPECT_EQ(5, Packages.size()); EXPECT_EQ(path + "/dists/sid/main/binary-i386/", Packages[0]); EXPECT_EQ(path + "/dists/stable/contrib/binary-amd64/", Packages[1]); EXPECT_EQ(path + "/dists/stable/main/binary-i386/", Packages[2]); - EXPECT_EQ(path + "/dists/unstable/main/binary-i386/", Packages[3]); + EXPECT_EQ(path + "/dists/stable/non-free/binary-all/", Packages[3]); + EXPECT_EQ(path + "/dists/unstable/main/binary-i386/", Packages[4]); EXPECT_EQ(3, Sources.size()); EXPECT_EQ(path + "/dists/sid/main/source/", Sources[0]); EXPECT_EQ(path + "/dists/stable/main/source/", Sources[1]); @@ -103,10 +104,11 @@ TEST(CDROMTest,FindPackages) _error->DumpErrors(); cd.DropRepeats(Translation, ""); - EXPECT_EQ(3, Packages.size()); + EXPECT_EQ(4, Packages.size()); EXPECT_EQ(path + "/dists/stable/contrib/binary-amd64/", Packages[0]); EXPECT_EQ(path + "/dists/stable/main/binary-i386/", Packages[1]); - EXPECT_EQ(path + "/dists/unstable/main/binary-i386/", Packages[2]); + EXPECT_EQ(path + "/dists/stable/non-free/binary-all/", Packages[2]); + EXPECT_EQ(path + "/dists/unstable/main/binary-i386/", Packages[3]); EXPECT_EQ(2, Sources.size()); EXPECT_EQ(path + "/dists/stable/main/source/", Sources[0]); EXPECT_EQ(path + "/dists/unstable/main/source/", Sources[1]); -- cgit v1.2.3