]> git.saurik.com Git - apt.git/commitdiff
support arch:all data e.g. in separate Packages file
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 28 Oct 2015 13:38:49 +0000 (14:38 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 4 Nov 2015 17:42:27 +0000 (18:42 +0100)
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.

41 files changed:
apt-pkg/acquire-item.cc
apt-pkg/cdrom.cc
apt-pkg/deb/debmetaindex.cc
apt-pkg/deb/debmetaindex.h
apt-pkg/metaindex.cc
apt-pkg/metaindex.h
doc/apt-ftparchive.1.xml
ftparchive/apt-ftparchive.cc
ftparchive/writer.cc
ftparchive/writer.h
test/integration/framework
test/integration/test-acquire-binary-all [new file with mode: 0755]
test/integration/test-acquire-same-repository-multiple-times
test/integration/test-apt-acquire-additional-files
test/integration/test-apt-acquire-additional-files-duplicates
test/integration/test-apt-by-hash-update
test/integration/test-apt-cache
test/integration/test-apt-cdrom
test/integration/test-apt-cli-show
test/integration/test-apt-get-update-unauth-warning
test/integration/test-apt-sources-deb822
test/integration/test-apt-translation-has-no-packages
test/integration/test-apt-update-expected-size
test/integration/test-apt-update-failure-propagation
test/integration/test-apt-update-file
test/integration/test-apt-update-ims
test/integration/test-apt-update-not-modified
test/integration/test-apt-update-stale
test/integration/test-apt-update-transactions
test/integration/test-apt-update-unauth
test/integration/test-bug-543966-downgrade-below-1000-pin
test/integration/test-bug-683786-build-dep-on-virtual-packages
test/integration/test-compressed-indexes
test/integration/test-cve-2013-1051-InRelease-parsing
test/integration/test-external-dependency-solver-protocol
test/integration/test-handle-redirect-as-used-mirror-change
test/integration/test-policy-pinning
test/integration/test-security-no-remote-status
test/integration/test-sourceslist-arch-plusminus-options
test/integration/test-sourceslist-lang-plusminus-options
test/libapt/cdromfindpackages_test.cc

index b29de665b6273f22ae4581ed634434f3617bdba5..6cf23daae1088e84f94b7b36ca3c460c920fe7c3 100644 (file)
@@ -1050,6 +1050,16 @@ void pkgAcqMetaBase::QueueIndexes(bool const verify)                     /*{{{*/
         Target != IndexTargets.end();
         ++Target)
    {
         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)
       {
       bool trypdiff = Target->OptionBool(IndexTarget::PDIFFS);
       if (verify == true)
       {
@@ -1059,6 +1069,22 @@ void pkgAcqMetaBase::QueueIndexes(bool const verify)                     /*{{{*/
            if (Target->IsOptional)
               continue;
 
            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;
            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;
index dea4a88c3f6b5465e6d6d1d5854095a6222783c1..b950648b908cfeab5b9817c70facbf92dd2ac67d 100644 (file)
@@ -156,10 +156,7 @@ bool pkgCdrom::FindPackages(string CD,
       // Skip some files..
       if (strcmp(Dir->d_name,".") == 0 ||
          strcmp(Dir->d_name,"..") == 0 ||
       // 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,".disk") == 0 ||
-         strcmp(Dir->d_name,"experimental") == 0 ||
-         strcmp(Dir->d_name,"binary-all") == 0 ||
           strcmp(Dir->d_name,"debian-installer") == 0)
         continue;
 
           strcmp(Dir->d_name,"debian-installer") == 0)
         continue;
 
index a53d32d346c1c2ef9beca6f1cffc3629dbb9465d..a43ec706fd012eab7f3279b6cd43a3811932875f 100644 (file)
@@ -49,6 +49,8 @@ class APT_HIDDEN debReleaseIndexPrivate                                       /*{{{*/
    time_t ValidUntilMin;
    time_t ValidUntilMax;
 
    time_t ValidUntilMin;
    time_t ValidUntilMax;
 
+   std::vector<std::string> Architectures;
+
    debReleaseIndexPrivate() : CheckValidUntil(metaIndex::TRI_UNSET), ValidUntilMin(0), ValidUntilMax(0) {}
 };
                                                                        /*}}}*/
    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));
 
               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,
               IndexTarget Target(
                     MetaKey,
                     ShortDesc,
                     LongDesc,
                     Options.find("BASE_URI")->second + MetaKey,
-                    IsOptional,
+                    IsOpt,
                     KeepCompressed,
                     Options
                     );
                     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");
 
    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++)
 
    bool FoundHashSum = false;
    for (int i=0;HashString::SupportedHashes()[i] != NULL; i++)
@@ -591,6 +606,13 @@ bool debReleaseIndex::IsTrusted() const
    return FileExists(MetaIndexFile("InRelease"));
 }
                                                                        /*}}}*/
    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 <pkgIndexFile *> *debReleaseIndex::GetIndexFiles()         /*{{{*/
 {
    if (Indexes != NULL)
 std::vector <pkgIndexFile *> *debReleaseIndex::GetIndexFiles()         /*{{{*/
 {
    if (Indexes != NULL)
@@ -729,6 +751,10 @@ static std::vector<std::string> parsePlusMinusOptions(std::string const &Name, /
    else
       Values = defaultValues;
 
    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<std::string> const plus = VectorizeString(val->second, ',');
    if ((val = Options.find(Name + "+")) != Options.end())
    {
       std::vector<std::string> const plus = VectorizeString(val->second, ',');
index 37515f934e3b2b328d032b1fde4b1828a98ea032..538f13f331971ebf4d7a74ff0a95167a9a394fa3 100644 (file)
@@ -58,6 +58,7 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
    bool SetSignedBy(std::string const &SignedBy);
 
    virtual bool IsTrusted() const APT_OVERRIDE;
    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,
 
    void AddComponent(std::string const &sourcesEntry,
         bool const isSrc, std::string const &Name,
index 5c095a2ad2a6d2c820cbe7d9f50ac4b6dbaef413..fe948243ec57cef3150b163d975d4d4defdf1382 100644 (file)
@@ -3,6 +3,8 @@
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/metaindex.h>
 
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/metaindex.h>
 
+#include <apt-pkg/debmetaindex.h>
+
 #include <string>
 #include <vector>
                                                                        /*}}}*/
 #include <string>
 #include <vector>
                                                                        /*}}}*/
@@ -100,3 +102,12 @@ void metaIndex::swapLoad(metaIndex * const OldMetaIndex)           /*{{{*/
    std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully);
 }
                                                                        /*}}}*/
    std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully);
 }
                                                                        /*}}}*/
+
+bool metaIndex::IsArchitectureSupported(std::string const &arch) const /*{{{*/
+{
+   debReleaseIndex const * const deb = dynamic_cast<debReleaseIndex const *>(this);
+   if (deb != NULL)
+      return deb->IsArchitectureSupported(arch);
+   return true;
+}
+                                                                       /*}}}*/
index 94aec2d1f0d79186b79bf4a45c7134b717778f76..ff531b4d73fcfafbd947b54e9e4314de4e91d3f6 100644 (file)
@@ -107,6 +107,9 @@ public:
    metaIndex(std::string const &URI, std::string const &Dist,
              char const * const Type);
    virtual ~metaIndex();
    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
 };
 
 #endif
index 5b2cd83e8421d1fe14e27a99c4de205d635dbcf3..edebb0808593ea9afe62a562b628cd86131b254b 100644 (file)
@@ -368,9 +368,13 @@ for i in Sections do
       
       <varlistentry><term><option>Architectures</option></term>
       <listitem><para>
       
       <varlistentry><term><option>Architectures</option></term>
       <listitem><para>
-      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.</para></listitem>
+      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 <filename>Packages</filename> should not
+      include information about architecture <literal>all</literal> packages in
+      all files as they will be available in a dedicated file.
+      </para></listitem>
       </varlistentry>
 
       <varlistentry><term><option>LongDescription</option></term>
       </varlistentry>
 
       <varlistentry><term><option>LongDescription</option></term>
@@ -589,7 +593,7 @@ for i in Sections do
      </varlistentry>
 
      &apt-commonoptions;
      </varlistentry>
 
      &apt-commonoptions;
-     
+
    </variablelist>
  </refsect1>
 
    </variablelist>
  </refsect1>
 
index b31c928456f5de7afb67505cd39e0e0f255ac4d7..c7e38badfc1d9d166f702859e82b03c4e38fb299 100644 (file)
@@ -68,6 +68,7 @@ struct PackageMap
 
    // We generate for this given arch
    string Arch;
 
    // We generate for this given arch
    string Arch;
+   bool IncludeArchAll;
    
    // Stuff for the Source File
    string SrcFile;
    
    // Stuff for the Source File
    string SrcFile;
@@ -122,9 +123,9 @@ struct PackageMap
                    vector<PackageMap>::iterator End,
                    unsigned long &Left);
    
                    vector<PackageMap>::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),
    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)
    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;
    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)
    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<PackageMap> &PkgList, std::vector<TranslationWriter*
    bool const LongDescription = Setup.FindB("Default::LongDescription",
                                        _config->FindB("APT::FTPArchive::LongDescription", true));
    string const TranslationCompress = Setup.Find("Default::Translation::Compress",". gzip").c_str();
    bool const LongDescription = Setup.FindB("Default::LongDescription",
                                        _config->FindB("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");
 
    // Process 'tree' type sections
    const Configuration::Item *Top = Setup.Tree("tree");
@@ -501,25 +504,32 @@ static void LoadTree(vector<PackageMap> &PkgList, std::vector<TranslationWriter*
       string Section;
       while (ParseQuoteWord(Sections,Section) == true)
       {
       string Section;
       while (ParseQuoteWord(Sections,Section) == true)
       {
-        string Arch;
-        struct SubstVar const Vars[] = {{"$(DIST)",&Dist},
+        struct SubstVar Vars[] = {{"$(DIST)",&Dist},
                                         {"$(SECTION)",&Section},
                                         {"$(SECTION)",&Section},
-                                        {"$(ARCH)",&Arch},
-                                        {NULL, NULL}};
+                                        {"$(ARCH)",nullptr},
+                                        {nullptr, nullptr}};
         mode_t const Perms = Block.FindI("FileMode", Permissions);
         bool const LongDesc = Block.FindB("LongDescription", LongDescription);
         mode_t const Perms = Block.FindI("FileMode", Permissions);
         bool const LongDesc = Block.FindB("LongDescription", LongDescription);
-        TranslationWriter *TransWriter = NULL;
-
-        string const Tmp2 = Block.Find("Architectures");
-        const char *Archs = Tmp2.c_str();
-        while (ParseQuoteWord(Archs,Arch) == true)
+        TranslationWriter *TransWriter = nullptr;
+
+        std::string Tmp2 = Block.Find("Architectures");
+        std::transform(Tmp2.begin(), Tmp2.end(), Tmp2.begin(), ::tolower);
+        std::vector<std::string> 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);
 
            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);
            {
               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<PackageMap> &PkgList, std::vector<TranslationWriter*
               Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars);
               Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars);
               Itm.Arch = Arch;
               Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars);
               Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars);
               Itm.Arch = Arch;
+              Itm.IncludeArchAll = IncludeArchAll;
               Itm.LongDesc = LongDesc;
               if (TransWriter == NULL && DTrans.empty() == false && LongDesc == false && DTrans != "/dev/null")
               {
               Itm.LongDesc = LongDesc;
               if (TransWriter == NULL && DTrans.empty() == false && LongDesc == false && DTrans != "/dev/null")
               {
@@ -662,7 +673,8 @@ static bool SimpleGenPackages(CommandLine &CmdL)
    
    // Create a package writer object.
    PackagesWriter Packages(NULL, NULL, _config->Find("APT::FTPArchive::DB"),
    
    // Create a package writer object.
    PackagesWriter Packages(NULL, NULL, _config->Find("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;
    
    if (_error->PendingError() == true)
       return false;
    
index 27d6e98e0340a25c13cd6b665f2bd8ec47843110..0bd2be566fa8a59916a202d6967b5f6bbbc20f6a 100644 (file)
@@ -71,7 +71,8 @@ static void ConfigToDoHashes(unsigned int &DoHashes, std::string const &Conf)
                                                                        /*}}}*/
 
 // FTWScanner::FTWScanner - Constructor                                        /*{{{*/
                                                                        /*}}}*/
 
 // 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)
    {
 {
    if (GivenOutput == NULL)
    {
@@ -326,6 +327,32 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
       FileName = 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;
 }
                                                                        /*}}}*/
    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,
 /* */
 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;
 {
    SetExts(".deb .udeb");
    DeLinkLimit = 0;
@@ -363,31 +390,6 @@ PackagesWriter::PackagesWriter(FileFd * const GivenOutput, TranslationWriter * c
    _error->DumpErrors();
 }
                                                                         /*}}}*/
    _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 
 // 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 - 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");
 
 {
    SetExts(".deb");
index 98012beeeff656502208ca157edcd340238b97db..ea4c66da486e959bd58b972a01b2d10c6e0916c5 100644 (file)
@@ -40,6 +40,7 @@ class FTWScanner
    protected:
    vector<string> Patterns;
    string Arch;
    protected:
    vector<string> Patterns;
    string Arch;
+   bool IncludeArchAll;
    const char *OriginalPath;
    bool ErrorPrinted;
 
    const char *OriginalPath;
    bool ErrorPrinted;
 
@@ -79,7 +80,7 @@ class FTWScanner
    void AddPatterns(std::vector<std::string> const &patterns) { Patterns.insert(Patterns.end(), patterns.begin(), patterns.end()); };
    bool SetExts(string const &Vals);
 
    void AddPatterns(std::vector<std::string> 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();
 };
 
    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 = "",
    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();
 };
 
    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);};
 
    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() {};
 };
 
    virtual ~ContentsWriter() {};
 };
 
index f9bb2e8243c701c881bbef7c67cc2468b1309f99..04f54c8e2a9ae65069eeb0adc3afe0669987c7f5 100644 (file)
@@ -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 <<EOF
 tree "dists/$DIST" {
        for DIST in $(find ./pool/ -maxdepth 1 -name '*.pkglist' -type f | cut -d'/' -f 3 | cut -d'.' -f 1 | sort | uniq); do
                cat <<EOF
 tree "dists/$DIST" {
-       Architectures "$ARCHS source";
+       Architectures "$ARCHS all source";
        FileList "${DIST}.\$(SECTION).pkglist";
        SourceFileList "${DIST}.\$(SECTION).srclist";
        Sections "$(find ./pool/ -maxdepth 1 -name "${DIST}.*.pkglist" -type f | cut -d'/' -f 3 | cut -d'.' -f 2 | sort | uniq | tr '\n' ' ')";
        FileList "${DIST}.\$(SECTION).pkglist";
        SourceFileList "${DIST}.\$(SECTION).srclist";
        Sections "$(find ./pool/ -maxdepth 1 -name "${DIST}.*.pkglist" -type f | cut -d'/' -f 3 | cut -d'.' -f 2 | sort | uniq | tr '\n' ' ')";
@@ -816,7 +816,7 @@ insertpackage() {
                        continue
                fi
                for arch in $(getarchitecturesfromcommalist "$ARCH"); do
                        continue
                fi
                for arch in $(getarchitecturesfromcommalist "$ARCH"); do
-                       if [ "$arch" = 'all' -o "$arch" = 'none' ]; then
+                       if [ "$arch" = 'none' ]; then
                                ARCHS="$(getarchitectures)"
                        else
                                ARCHS="$arch"
                                ARCHS="$(getarchitectures)"
                        else
                                ARCHS="$arch"
@@ -962,6 +962,7 @@ getcodenamefromsuite() {
 getreleaseversionfromsuite() { true; }
 getlabelfromsuite() { true; }
 getoriginfromsuite() { true; }
 getreleaseversionfromsuite() { true; }
 getlabelfromsuite() { true; }
 getoriginfromsuite() { true; }
+getarchitecturesfromreleasefile() { echo "all $(getarchitectures)"; }
 
 aptftparchiverelease() {
        aptftparchive -qq release "$@" | sed -e '/0 Release$/ d' # remove the self reference
 
 aptftparchiverelease() {
        aptftparchive -qq release "$@" | sed -e '/0 Release$/ d' # remove the self reference
@@ -969,9 +970,12 @@ aptftparchiverelease() {
 generatereleasefiles() {
        # $1 is the Date header and $2 is the ValidUntil header to be set
        # both should be given in notation date/touch can understand
 generatereleasefiles() {
        # $1 is the Date header and $2 is the ValidUntil header to be set
        # both should be given in notation date/touch can understand
+       local DATE="$1"
+       local VALIDUNTIL="$2"
        msgninfo "\tGenerate Release files… "
        if [ -e aptarchive/dists ]; then
                for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
        msgninfo "\tGenerate Release files… "
        if [ -e aptarchive/dists ]; then
                for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
+                       local ARCHITECTURES="$(getarchitecturesfromreleasefile "$dir")"
                        local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
                        local CODENAME="$(getcodenamefromsuite $SUITE)"
                        local VERSION="$(getreleaseversionfromsuite $SUITE)"
                        local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
                        local CODENAME="$(getcodenamefromsuite $SUITE)"
                        local VERSION="$(getreleaseversionfromsuite $SUITE)"
@@ -986,9 +990,13 @@ generatereleasefiles() {
                        if [ -n "$ORIGIN" ]; then
                                ORIGIN="-o APT::FTPArchive::Release::Origin=${ORIGIN}"
                        fi
                        if [ -n "$ORIGIN" ]; then
                                ORIGIN="-o APT::FTPArchive::Release::Origin=${ORIGIN}"
                        fi
+                       if [ -n "$ARCHITECTURES" ]; then
+                               ARCHITECTURES="-o APT::FTPArchive::Release::Architectures=${ARCHITECTURES}"
+                       fi
                        aptftparchiverelease "$dir" \
                                -o APT::FTPArchive::Release::Suite="${SUITE}" \
                                -o APT::FTPArchive::Release::Codename="${CODENAME}" \
                        aptftparchiverelease "$dir" \
                                -o APT::FTPArchive::Release::Suite="${SUITE}" \
                                -o APT::FTPArchive::Release::Codename="${CODENAME}" \
+                               ${ARCHITECTURES} \
                                ${LABEL} \
                                ${ORIGIN} \
                                ${VERSION} \
                                ${LABEL} \
                                ${ORIGIN} \
                                ${VERSION} \
@@ -1001,15 +1009,15 @@ NotAutomatic: yes' "$dir/Release"
        else
                aptftparchiverelease ./aptarchive > aptarchive/Release
        fi
        else
                aptftparchiverelease ./aptarchive > 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
                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
                done
        fi
-       if [ -n "$2" ]; then
+       if [ -n "$VALIDUNTIL" ]; then
                sed -i "/^Date: / a\
                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"
 }
        fi
        msgdone "info"
 }
diff --git a/test/integration/test-acquire-binary-all b/test/integration/test-acquire-binary-all
new file mode 100755 (executable)
index 0000000..478bf1a
--- /dev/null
@@ -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-
index b99496e354ddc96f0a0750bd92fe61e46a7e055e..eea81fd69e34b94752bf386ae978e271211d2264 100755 (executable)
@@ -55,17 +55,17 @@ tworepos() {
   Candidate: 1.0
   Version table:
      1.0 500
   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'
        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
 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'
 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
 tworepos 'http' "//localhost:${APTHTTPPORT}" 'hit'
 testequal '2' grep -c '200%20URI%20Start' ./download.log
 testequal '4' grep -c '201%20URI%20Done' ./download.log
index 4ba3c5bd969ee663339e863b14da7420475a044c..552499ea2d228fe6fbd525a6835c78c8f82263c5 100755 (executable)
@@ -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 
 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]
 '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*'
 Reading package lists..." aptget update
 
 testempty find rootdir/var/lib/apt/lists -name '*Contents*'
@@ -37,40 +39,59 @@ Acquire::IndexTargets::deb::Contents {
 };
 EOF
 
 };
 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
 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 
 
 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/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]
 
 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
 
 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-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]
 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
 
 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-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-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,
 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 
 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/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]
 
 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
 
 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-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 
 
 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
 '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
index dbfc0eb74be991aeed363cd3feb2d534d6503126..c8d386cbe0808d04e3d6c2e1694f3f64285d8be1 100755 (executable)
@@ -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_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_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 <<EOF
 ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en" aptget indextargets --no-release-info --format '$(FILENAME)'
 
 cat >> rootdir/etc/apt/sources.list <<EOF
@@ -50,15 +52,19 @@ testwarningequal "${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_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_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
 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
+W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
+W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3" aptget indextargets --no-release-info --format '$(FILENAME)'
 
 cat >> rootdir/etc/apt/sources.list <<EOF
 W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3" aptget indextargets --no-release-info --format '$(FILENAME)'
 
 cat >> rootdir/etc/apt/sources.list <<EOF
@@ -69,18 +75,27 @@ testwarningequal "${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_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_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
 ${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
 ${APTLISTS}/example.org_debian_dists_stable_rocks_i18n_Translation-en
 ${APTLISTS}/example.org_debian_dists_stable_main_Contents-amd64
+${APTLISTS}/example.org_debian_dists_stable_main_Contents-all
 ${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
 ${APTLISTS}/example.org_debian_dists_stable_Contents-amd64
+${APTLISTS}/example.org_debian_dists_stable_Contents-all
 ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
 ${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-amd64
+${APTLISTS}/example.org_debian_dists_stable_rocks_Contents-all
 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (main/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
+W: Target Packages (main/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (main/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-amd64/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Packages (rocks/binary-i386/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
+W: Target Packages (rocks/binary-all/Packages) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
 W: Target Translations (rocks/i18n/Translation-en) is configured multiple times in ${APTETC}/sources.list:1 and ${APTETC}/sources.list:3
 W: Target Contents2 wants to acquire the same file (main/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
-W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4" aptget indextargets --no-release-info --format '$(FILENAME)'
+W: Target Contents2 wants to acquire the same file (main/Contents-all) as Contents1 from source ${APTETC}/sources.list:4
+W: Target Contents2 wants to acquire the same file (rocks/Contents-amd64) as Contents1 from source ${APTETC}/sources.list:4
+W: Target Contents2 wants to acquire the same file (rocks/Contents-all) as Contents1 from source ${APTETC}/sources.list:4" aptget indextargets --no-release-info --format '$(FILENAME)'
index 9b97bdeba90c798072329249ba791b76f8eb54c1..67ece60d2d623c8716fe2bea10189f1e58204fc0 100755 (executable)
@@ -10,6 +10,7 @@ confighashes 'SHA512'
 configcompression '.' 'gz'
 
 insertpackage 'unstable' 'foo' 'all' '1.0'
 configcompression '.' 'gz'
 
 insertpackage 'unstable' 'foo' 'all' '1.0'
+insertpackage 'unstable' 'bar' 'i386' '1.0'
 
 setupaptarchive --no-update
 
 
 setupaptarchive --no-update
 
@@ -22,6 +23,7 @@ makebyhashonly() {
        ln -s "${BYHASH}/${2}.gz" "${BYHASH}/$(sha512sum "${BYHASH}/${2}.gz" | cut -f1 -d' ')"
 }
 makebyhashonly 'binary-i386' 'Packages'
        ln -s "${BYHASH}/${2}.gz" "${BYHASH}/$(sha512sum "${BYHASH}/${2}.gz" | cut -f1 -d' ')"
 }
 makebyhashonly 'binary-i386' 'Packages'
+makebyhashonly 'binary-all' 'Packages'
 makebyhashonly 'source' 'Sources'
 
 ensureitsbroken() {
 makebyhashonly 'source' 'Sources'
 
 ensureitsbroken() {
@@ -46,6 +48,8 @@ ensureitworks() {
        testsuccess grep '^Ign' rootdir/tmp/aptupdate.output
        testsuccessequal "Inst foo (1.0 unstable [all])
 Conf foo (1.0 unstable [all])" aptget install -qq -s foo
        testsuccess grep '^Ign' rootdir/tmp/aptupdate.output
        testsuccessequal "Inst foo (1.0 unstable [all])
 Conf foo (1.0 unstable [all])" aptget install -qq -s foo
+       testsuccessequal "Inst bar (1.0 unstable [i386])
+Conf bar (1.0 unstable [i386])" aptget install -qq -s bar
 }
 msgmsg 'Test by-hash via' 'config option'
 ensureitworks -o Acquire::By-Hash=force
 }
 msgmsg 'Test by-hash via' 'config option'
 ensureitworks -o Acquire::By-Hash=force
index c254aa602dc6c20e2a01aac1cd18763af067129d..daa5974a134f12bcbae4809cebbb03b8523ae33e 100755 (executable)
@@ -55,8 +55,7 @@ testsuccessequal 'bar' aptcache pkgnames bar
 testsuccessequal 'fancy
 foo' aptcache pkgnames f
 
 testsuccessequal 'fancy
 foo' aptcache pkgnames f
 
-testsuccessequal "       foo |          1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages
-       foo |          1 | file:$(readlink -f .)/aptarchive unstable/main i386 Packages" aptcache madison foo
+testsuccessequal "       foo |          1 | file:$(readlink -f .)/aptarchive unstable/main all Packages" aptcache madison foo
 
 ### depends
 
 
 ### depends
 
index ce31b5934830a9a7e0b76120435ee02fc712ce3f..c5da17db2825833a4dc652f1d862fe3f6129add2 100755 (executable)
@@ -51,7 +51,7 @@ Unmounting CD-ROM...
 Repeat this process for the rest of the CDs in your set."
 
 testsuccessequal "$CDROM_PRE
 Repeat this process for the rest of the CDs in your set."
 
 testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
 Found label 'Debian APT Testdisk 0.8.15'
 $CDROM_POST" aptcdromlog add
 
 Found label 'Debian APT Testdisk 0.8.15'
 $CDROM_POST" aptcdromlog add
 
@@ -116,18 +116,18 @@ testcdromusage
 
 # check Idempotence of apt-cdrom (and disabling of Translation dropping)
 testsuccessequal "$CDROM_PRE
 
 # check Idempotence of apt-cdrom (and disabling of Translation dropping)
 testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
 $CDROM_POST" aptcdromlog add -o APT::CDROM::DropTranslation=0
 
 # take Translations from previous runs as needed
 testsuccessequal "$CDROM_PRE
 $CDROM_POST" aptcdromlog add -o APT::CDROM::DropTranslation=0
 
 # take Translations from previous runs as needed
 testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 2 translation indexes and 1 signatures
 $CDROM_POST" aptcdromlog add
 msgtest 'Test for the german description translation of' 'testing'
 aptcache show testing -o Acquire::Languages=de | grep -q '^Description-de: ' && msgpass || msgfail
 rm -rf rootdir/var/lib/apt/lists
 testsuccessequal "$CDROM_PRE
 $CDROM_POST" aptcdromlog add
 msgtest 'Test for the german description translation of' 'testing'
 aptcache show testing -o Acquire::Languages=de | grep -q '^Description-de: ' && msgpass || msgfail
 rm -rf rootdir/var/lib/apt/lists
 testsuccessequal "$CDROM_PRE
-Found 2 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
+Found 3 package indexes, 1 source indexes, 1 translation indexes and 1 signatures
 $CDROM_POST" aptcdromlog add
 msgtest 'Test for the english description translation of' 'testing'
 aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' && msgpass || msgfail
 $CDROM_POST" aptcdromlog add
 msgtest 'Test for the english description translation of' 'testing'
 aptcache show testing -o Acquire::Languages=en | grep -q '^Description-en: ' && msgpass || msgfail
index 5f4ef1b48c7237e9e9acebf8b8aa23974c864edf..59dd6ba25dee2247cde542c9773ec0942b2fec62 100755 (executable)
@@ -32,7 +32,7 @@ Maintainer: Joe Sixpack <joe@example.org>
 Installed-Size: 43.0 kB
 Download-Size: unknown
 APT-Manual-Installed: yes
 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
 Description: Some description 
  That has multiple lines
 " apt show foo
index f1515a9c8acdf7c8182b3ea167203c45b03f1e9a..43582829250d8a189e1118badc260d915916a826 100755 (executable)
@@ -37,7 +37,9 @@ testequal 'lock
 partial' ls rootdir/var/lib/apt/lists
 
 filesize() {
 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
 }
 # 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: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
   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: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
   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: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]
   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.
 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.
index 662a866aa70dbc0d807bd87adde5ce83f952bc66..c29fde0c4dfd390c7b6d5e30b171f95596d574a2 100755 (executable)
@@ -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 
 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/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
 '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
 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
 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
 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 
 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
 '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 
 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/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/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'
 '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 
 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/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
 '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 
 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/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'
 '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 
 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'
 '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 
 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.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
 '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 
 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
 '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
index 4c57623b14bf581570929e7f0a6f5cad23e8f0fb..329e529cecf8553e73f302d0e0a05f1030f08217 100755 (executable)
@@ -38,4 +38,4 @@ testsuccessequal "foo:
   Candidate: 1.0
   Version table:
      1.0 500
   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
index 21568e9c28ef323218ad2d03007b8b44c57953e7..825500b8e1d1a81327e00a3f5aeae0d8ab32554c 100755 (executable)
@@ -7,7 +7,7 @@ TESTDIR=$(readlink -f $(dirname $0))
 setupenvironment
 configarchitecture "i386"
 
 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
 
 setupaptarchive --no-update
 cp -a aptarchive/dists aptarchive/dists.good
@@ -26,7 +26,7 @@ test_inreleasetoobig() {
 }
 
 test_packagestoobig() {
 }
 
 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
        buildaptarchivefromfiles '+1 hour'
        signreleasefiles
        # append junk at the end of the Packages.gz/Packages
index e4ce5f968d76ec55807c83da33a543808a663c8b..eda9cff9902cf48590e0fe9c1243374f253af6b1 100755 (executable)
@@ -37,14 +37,15 @@ testsuccessequal "foo:
   Candidate: 2
   Version table:
      2 500
   Candidate: 2
   Version table:
      2 500
-        500 http://localhost:${APTHTTPPORT} sid/main amd64 Packages
+        500 http://localhost:${APTHTTPPORT} sid/main all Packages
      1 500
      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
 
 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
 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.
 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:
 mv aptarchive/dists/stable.good aptarchive/dists/stable
 posttest() {
        testsuccessequal "foo:
@@ -60,7 +70,7 @@ posttest() {
   Candidate: 2
   Version table:
      2 500
   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
 
 }
 posttest
 
index f976993ca5e6dc1930c0aa10f3323eebaa051425..c6e07f8b6b20613b7853d45579a58e0ba2fe98d2 100755 (executable)
@@ -19,8 +19,8 @@ insertsource 'unstable' 'foo' 'all' '1'
 setupaptarchive --no-update
 
 # ensure the archive is not writable
 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
 
 
 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
 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() {
 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
 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
 testsuccess grep -- "$canary" rootdir/tmp/update.output
 
 testfoo
index 623c3d380f69fdda3fd168f8d563313bdb21e24f..8b29fdbb9da2e0b3ddb70e7c77df0af32b7e6947 100755 (executable)
@@ -7,6 +7,7 @@ setupenvironment
 configarchitecture 'amd64'
 
 insertpackage 'unstable' 'unrelated' 'all' '0.5~squeeze1'
 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
 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
   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
   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
   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
   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.
 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.
index 8cfc766d38bd0ca15f3e43bb323c081cea44fb32..f6dea81e2d641597bc88307f361c7ef67693b003 100755 (executable)
@@ -7,7 +7,7 @@ TESTDIR=$(readlink -f $(dirname $0))
 setupenvironment
 configarchitecture 'amd64' 'i386'
 
 setupenvironment
 configarchitecture 'amd64' 'i386'
 
-insertpackage 'unstable' 'apt' 'all' '1.0'
+insertpackage 'unstable' 'apt' 'amd64,i386' '1.0'
 
 setupaptarchive --no-update
 
 
 setupaptarchive --no-update
 
index dd4799d95fcf8a969f24433e62b647fa736fa06b..fd5ec821403647e72c1936504ea194da7a8c7e94 100755 (executable)
@@ -12,7 +12,7 @@ TESTDIR=$(readlink -f $(dirname $0))
 setupenvironment
 configarchitecture "i386"
 
 setupenvironment
 configarchitecture "i386"
 
-insertpackage 'unstable' 'foo' 'all' '1.0'
+insertpackage 'unstable' 'foo' 'i386' '1.0'
 
 setupaptarchive --no-update
 changetowebserver
 
 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
 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
 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
index a5dac1737a74d60b9b004a0dacfc5e9f9f740e65..8651d3a157801d8c36095e189a32ec8a8f580b68 100755 (executable)
@@ -10,8 +10,8 @@ setupenvironment
 configarchitecture 'i386'
 configcompression '.' 'gz'
 
 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
 
 
 setupaptarchive --no-update
 
@@ -31,8 +31,8 @@ restorefile() {
 testrun() {
        rm -rf aptarchive/dists.good
        cp -a aptarchive/dists aptarchive/dists.good
 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
        buildaptarchivefromfiles '+1 hour'
 
        # produce an unsigned repository
index 7347f7d10ebb3eb82a7aa87fbf6ad5f976a72579..17e62db2244fc42806a4ab83cbaedd1b484c3a6e 100755 (executable)
@@ -13,8 +13,8 @@ umask 022
 setupenvironment
 configarchitecture "i386"
 
 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
 
 setupaptarchive --no-update
 changetowebserver
index 435b6876e0bd990000e704db92cb1961fa997f77..1aa37740ba9034e43766c354993be1874598bcd1 100755 (executable)
@@ -22,7 +22,7 @@ testsuccessequal "base-files:
  *** 5.0.0-1 100
         100 $STATUS
      5.0.0 500
  *** 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
 
 writepin() {
        echo "Package: $1
@@ -47,7 +47,7 @@ testpinning() {
  *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-99}
  *** 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:
 
        writepin "$1" '100'
        testsuccessequal "base-files:
@@ -57,7 +57,7 @@ testpinning() {
  *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-100}
  *** 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:
 
        writepin "$1" '999'
        testsuccessequal "base-files:
@@ -67,7 +67,7 @@ testpinning() {
  *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-999}
  *** 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:
 
        writepin "$1" '1000'
        testsuccessequal "base-files:
@@ -77,7 +77,7 @@ testpinning() {
  *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-1000}
  *** 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'
 }
 
 msgmsg 'Tests with generic-form pin'
index 4a7c516d4cb4f28bd00bfc324364df89b04f0dc0..0ee76ea03d9c0efca42021e4e7dcf2853596d6be 100755 (executable)
@@ -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'
 
 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'
 insertsource 'unstable' 'diffutils' 'any' '1' 'Build-Depends: texi2html'
 
 insertpackage 'unstable' 'libselinux1-dev' 'amd64' '1' 'Provides: libselinux-dev'
index d163a98eff966e67a71e22302f2251347c11f7ea..5101660990ba2586c31478f58d7ee5f1dc12b896 100755 (executable)
@@ -31,10 +31,12 @@ testrun() {
        local F
        msgtest 'Check if all index files are' "${1:-uncompressed}"
        if [ "$1" = 'compressed' ]; then
        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/*_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
                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
        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/*_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
                ! test -e rootdir/var/lib/apt/lists/*_Sources.* || F=1
                ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1
        fi
index 7a3e5f1569d5bd91cd1cc24f9d297061fe618394..83e0db968857062865ab2a7b049c44943171f41f 100755 (executable)
@@ -22,7 +22,7 @@ testsuccessequal "good-pkg:
   Candidate: 1.0
   Version table:
      1.0 500
   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
 
 # 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
   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
index cc8b5f1c4fcae5d5ad027c78831b1f0dd460f361..2657e2f4239527b3cc6291912aa37d261081f98c 100755 (executable)
@@ -159,12 +159,38 @@ testsuccess aptinternalsolver scenario
 testsuccessequal 'Package: stuff
 Source: stuff
 Architecture: all
 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
 Version: 1
 Source-Version: 1
 Installed: yes
-APT-ID: 2
+APT-ID: 8
 Priority: optional
 Section: other
 APT-Pin: 100
 Priority: optional
 Section: other
 APT-Pin: 100
-APT-Candidate: yes
 ' aptinternalsolver scenario stuff
 ' aptinternalsolver scenario stuff
index a1842462a7c55f2a154c13ae2b58551ad153009e..737df97f672450cf650287db403ebc428f254710 100755 (executable)
@@ -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]
 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
 Reading package lists..." aptget update
 
 testsuccessequal "Hit:1 http://0.0.0.0:${APTHTTPPORT} unstable InRelease
index ea266e934d25e598d4b89756f4158ddccd05c3bb..dba8736564f0cb46a6437d64610b1dc2fbe5c0dd 100755 (executable)
@@ -101,11 +101,11 @@ testequalpolicycoolstuff() {
        local BPO2ARCHIVE=""
        if [ ! "$7" = "2.0~bpo2" ]; then
                BPO1PIN="$AB"
        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
        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
                SB="$(echo "$SB" | tail -n 1)"
                shift
        fi
@@ -117,7 +117,7 @@ testequalpolicycoolstuff() {
  $IB 2.0~bpo1 $PB
 ${BPO1ARCHIVE}$SB
  $IS 1.0 $AS
  $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} $*
 }
 
                aptcache policy coolstuff -o Policy=${INSTALLED}-${CANDIDATE}-${AB}-${AS}-${PB} $*
 }
 
index af4940982af1077d90f61131ed788b967b588475..2badb30a44b01cc73c448c457c070201f4c8743a 100755 (executable)
@@ -20,7 +20,7 @@ testequal "pretends-installed:
   Candidate: 1
   Version table:
      1 500
   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
 
 testequal "really-installed:
   Installed: 1
index 0091964e60e1210c55c1daebf2277043774f06a2..d487cce603b478695d207a641a698e5ffc0796f1 100755 (executable)
@@ -18,68 +18,74 @@ testbinaries() {
 }
 
 echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
 }
 
 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'
 configarchitecture 'amd64' 'i386'
-testbinaries 'default & native + foreign' 'amd64' 'i386'
+testbinaries 'default & native + foreign' 'amd64' 'i386' 'all'
 configarchitecture 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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
 
 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'
index c61d5a4ca7b0e60956187d8bd9f7dd70db2ef536..6600183588e437451910c71e3571263b8fe818c3 100755 (executable)
@@ -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' ''
 
 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'
 
 echo 'deb [lang+=pt] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
 testlangs 'lang+=pt' 'en,de,de_DE,pt'
index 719dd8f63c8b0063c5099f7749206f689eee061e..6121d32b6c7fe6690b251c339841ef7b467c7119 100644 (file)
@@ -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/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");
    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/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");
    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<std::string> Packages, Sources, Signatur, Translation;
    std::string InfoDir;
    EXPECT_TRUE(cd.FindPackages(path, Packages, Sources, Signatur, Translation, InfoDir));
    std::vector<std::string> 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/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]);
    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, "");
 
    _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/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]);
    EXPECT_EQ(2, Sources.size());
    EXPECT_EQ(path + "/dists/stable/main/source/", Sources[0]);
    EXPECT_EQ(path + "/dists/unstable/main/source/", Sources[1]);