]> git.saurik.com Git - apt.git/commitdiff
* merged with apt--ubuntu--0
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2005 12:31:17 +0000 (12:31 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 28 Jun 2005 12:31:17 +0000 (12:31 +0000)
Patches applied:

 * apt@packages.debian.org/apt--ubuntu--0--base-0
   tag of apt@packages.debian.org/apt--main--0--patch-88

 * apt@packages.debian.org/apt--ubuntu--0--patch-1
   Merge from Debian branch

 * apt@packages.debian.org/apt--ubuntu--0--patch-2
   0.6.38ubuntu1

 * apt@packages.debian.org/apt--ubuntu--0--patch-3
   Merge with mainline

 * apt@packages.debian.org/apt--ubuntu--0--patch-4
   Improved arch-build rule

 * apt@packages.debian.org/apt--ubuntu--0--patch-5
   Merge with mainline

 * apt@packages.debian.org/apt--ubuntu--0--patch-6
   Merge with mvo

 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--base-0
   tag of apt@packages.debian.org/apt--main--0--patch-79

 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-1
   * merged with mainline and apt--fixes--0

 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-2
   * patch from aj (slighly modified to use auto_ptr<>) applied

 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-3
   * changelog updated

 * michael.vogt@ubuntu.com--2005/apt--bts225947--0--patch-4
   * work for arch=all packages too now

 * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--base-0
   tag of apt@packages.debian.org/apt--main--0--patch-87

 * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--patch-1
   * report timeouts (from Connect) and fail if they happen in pkgAcqMetaSig

 * michael.vogt@ubuntu.com--2005/apt--sane-handle-timeout--0--patch-2
   * merged with the fixes branch to make it build again

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-1
   tag of apt@packages.debian.org/apt--main--0--patch-88

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-2
   * merged apt--mvo (to make pining on components work again)

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-3
   * merged with apt--fixes--0 (to make the building of the french manpages work and to fix a incorrect man-page example

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-4
   * merged with the bts225947 code

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-5
   * merged the imporoved timoeut handling patch

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-6
   * merged with matt

 * michael.vogt@ubuntu.com--2005/apt--ubuntu--0--patch-7
   * removed another conflict with apt--main

apt-pkg/acquire-item.cc
configure.in
debian/changelog
debian/rules
ftparchive/apt-ftparchive.cc
ftparchive/override.cc
ftparchive/override.h
ftparchive/writer.cc
ftparchive/writer.h
methods/connect.cc
share/debian-archive.gpg [deleted file]

index b2f896627f23e44433c4214c1ab562e4b32efa68..14acad85a39e28987d69e572cbf230a3973d9acf 100644 (file)
@@ -400,6 +400,12 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
    unlink(Final.c_str());
 
+   // if we get a timeout if fail
+   if(LookupTag(Message,"FailReason") == "Timeout") {
+      Item::Failed(Message,Cnf);
+      return;
+   }
+
    // queue a pkgAcqMetaIndex with no sigfile
    new pkgAcqMetaIndex(Owner, MetaIndexURI, MetaIndexURIDesc, MetaIndexShortDesc,
                       "", IndexTargets, MetaIndexParser);
index fd3eac884242d87a519838369c75801d53e62fa5..f78ce1d1e42a46603b13a6f6e81f5bbfa8ee5422 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.39")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.38ubuntu1mvo1")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index ad775c2307f18f409b79f8703a09e54417419127..78559fd56aab5979c0bae899b093fc7e5aa5f67a 100644 (file)
@@ -1,4 +1,4 @@
-apt (0.6.39) unstable; urgency=low
+apt (0.6.38ubuntu1mvo1) unstable; urgency=low
 
   * Welsh translation update: daf@muse.19inch.net--2005/apt--main--0--patch-6
   * Merge mvo's changes from 0.6.36ubuntu1:
@@ -6,8 +6,38 @@ apt (0.6.39) unstable; urgency=low
   * Merge aggregated translation updates:
     bubulle@debian.org--2005/apt--main--0
   * Update priority of apt-utils to important, to match the override file
+  * Michael Vogt
+    - Change debian/bugscript to use #!/bin/bash (Closes: #313402)
+    - Fix a incorrect example in the man-page (closes: #282918)
+    - Support architecture-specific extra overrides 
+      (closes: #225947). Thanks to  Anthony Towns for idea and 
+      the patch, thanks to Colin Watson for testing it.
+    - better report network timeouts from the methods to the acuire code, 
+      only timeout once per sources.list line 
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 28 Jun 2005 11:18:24 +0200
+
+apt (0.6.38ubuntu1) breezy; urgency=low
+
+  * First release from Ubuntu branch
+  * Merge with --main--0, switch back to Ubuntu keyring
+
+ -- Matt Zimmerman <mdz@ubuntu.com>  Sat, 25 Jun 2005 16:52:41 -0700
 
- -- 
+apt (0.6.38) unstable; urgency=low
+
+  * Merge michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6, a workaround
+    for the French man pages' failure to build
+  * Branch Debian and Ubuntu
+    - apt.postinst, apt-key: use the appropriate keyring
+    - debian/rules: install all keyrings
+  * Add the current Debian archive signing key (4F368D5D) to
+    debian-archive.gpg
+  * make pinning on the "component" work again (using the section of the 
+    archive, we don't use per-section Release files anymore with apt-0.6)
+    (closes ubuntu #9935)
+  
+ -- Matt Zimmerman <mdz@debian.org>  Sat, 25 Jun 2005 09:51:00 -0700
 
 apt (0.6.38) unstable; urgency=low
 
@@ -24,6 +54,7 @@ apt (0.6.38) unstable; urgency=low
   
  -- Matt Zimmerman <mdz@debian.org>  Sat, 25 Jun 2005 09:51:00 -0700
 
+>>>>>>> MERGE-SOURCE
 apt (0.6.37) breezy; urgency=low
 
   * Merge bubulle@debian.org--2005/apt--main--0 up to patch-81
index d6ae540ee0cc31289eb8b13f13231e91f1ba6137..ee02baeb6d01323b91399ab8deb9f04f05c1d30d 100755 (executable)
@@ -336,4 +336,4 @@ arch-build:
        mkdir -p debian/arch-build/apt-$(APT_DEBVER)
        baz inventory -s | xargs cp -a --parents --target=debian/arch-build/apt-$(APT_DEBVER)
        $(MAKE) -C debian/arch-build/apt-$(APT_DEBVER) startup doc
-       (cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG))
+       (cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG); dpkg-genchanges -S > ../apt_$(APT_DEBVER)_source.changes)
index 31ff8d600b7cc8e3e9fafe6fa89a553fa62b21d6..0e2be8a00ad2843410754ff1b114e73633b4eed5 100644 (file)
@@ -56,6 +56,9 @@ struct PackageMap
    string BinCacheDB;
    string BinOverride;
    string ExtraOverride;
+
+   // We generate for this given arch
+   string Arch;
    
    // Stuff for the Source File
    string SrcFile;
@@ -158,7 +161,8 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
    // Create a package writer object.
    PackagesWriter Packages(flCombine(CacheDir,BinCacheDB),
                           flCombine(OverrideDir,BinOverride),
-                          flCombine(OverrideDir,ExtraOverride));
+                          flCombine(OverrideDir,ExtraOverride),
+                          Arch);
    if (PkgExt.empty() == false && Packages.SetExts(PkgExt) == false)
       return _error->Error(_("Package extension list is too long"));
    if (_error->PendingError() == true)
@@ -489,6 +493,7 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
               Itm.BaseDir = SubstVar(Block.Find("Directory",DDir.c_str()),Vars);
               Itm.PkgFile = SubstVar(Block.Find("Packages",DPkg.c_str()),Vars);
               Itm.Tag = SubstVar("$(DIST)/$(SECTION)/$(ARCH)",Vars);
+              Itm.Arch = Arch;
               Itm.Contents = SubstVar(Block.Find("Contents",DContents.c_str()),Vars);
               Itm.ContentsHead = SubstVar(Block.Find("Contents::Header",DContentsH.c_str()),Vars);
               Itm.FLFile = SubstVar(Block.Find("FileList",DFLFile.c_str()),Vars);
index 669ce25bf29ea06bf661ba033cf33129c60fe562..b8b94843f38d0b27cd1e98163e014fa7e7dd83b1 100644 (file)
@@ -207,6 +207,44 @@ bool Override::ReadExtraOverride(string File,bool Source)
    return true;
 }
                                                                        /*}}}*/
+
+// Override::GetItem - Get a architecture specific item        /*{{{*/
+// ---------------------------------------------------------------------
+/* Returns a override item for the given package and the given architecture.
+ * Treats "all" special
+ */
+Override::Item* Override::GetItem(string Package, string Architecture)
+{
+   map<string,Item>::iterator I = Mapping.find(Package);
+   map<string,Item>::iterator J = Mapping.find(Package + "/" + Architecture);
+
+   if (I == Mapping.end() && J == Mapping.end())
+   {
+      return 0;
+   }
+
+   Item *result = new Item;
+   if (I == Mapping.end()) *result = J->second;
+   else
+   {
+      *result = I->second;
+      if (J != Mapping.end())
+      {
+        Item *R = &J->second;
+        if (R->Priority != "") result->Priority = R->Priority;
+        if (R->OldMaint != "") result->OldMaint = R->OldMaint;
+        if (R->NewMaint != "") result->NewMaint = R->NewMaint;
+        for (map<string,string>::iterator foI = R->FieldOverride.begin();
+             foI != R->FieldOverride.end(); foI++)
+         {
+           result->FieldOverride[foI->first] = foI->second;
+        }
+      } 
+   } 
+   return result;
+};
+
+
 // Override::Item::SwapMaint - Swap the maintainer field if necessary  /*{{{*/
 // ---------------------------------------------------------------------
 /* Returns the new maintainer string after evaluating the rewriting rule. If
index 2d6a4e27ce3b0afb09a7b6ee47b7e56a233d0001..e646417760a9714f1749e4000d2c9c8297a3f41d 100644 (file)
@@ -34,17 +34,16 @@ class Override
 
       map<string,string> FieldOverride;
       string SwapMaint(string Orig,bool &Failed);
+      ~Item() {};
    };
    
    map<string,Item> Mapping;
    
    inline Item *GetItem(string Package) 
    {
-      map<string,Item>::iterator I = Mapping.find(Package);
-      if (I == Mapping.end())
-        return 0;
-      return &I->second;
-   };
+      return GetItem(Package, "");
+   }
+   Item *GetItem(string Package, string Architecture);
    
    bool ReadOverride(string File,bool Source = false);
    bool ReadExtraOverride(string File,bool Source = false);
index 35a23a3d7b30744888990c502399a98b65d9a9dd..0b68d0bbf74569ea0ae780e53ea9fe5f88d6064a 100644 (file)
@@ -36,7 +36,6 @@
 #include "apt-ftparchive.h"
 #include "multicompress.h"
                                                                        /*}}}*/
-
 using namespace std;
 FTWScanner *FTWScanner::Owner;
 
@@ -285,8 +284,9 @@ bool FTWScanner::Delink(string &FileName,const char *OriginalPath,
 // PackagesWriter::PackagesWriter - Constructor                                /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides) :
-                   Db(DB),Stats(Db.Stats)
+PackagesWriter::PackagesWriter(string DB,string Overrides,string ExtOverrides,
+                              string aArch) :
+   Db(DB),Stats(Db.Stats), Arch(aArch)
 {
    Output = stdout;
    SetExts(".deb .udeb .foo .bar .baz");
@@ -371,14 +371,22 @@ bool PackagesWriter::DoPackage(string FileName)
    // Lookup the overide information
    pkgTagSection &Tags = Db.Control.Section;
    string Package = Tags.FindS("Package");
-   Override::Item Tmp;
-   Override::Item *OverItem = Over.GetItem(Package);
+   string Architecture;
+   // if we generate a Packages file for a given arch, we use it to
+   // look for overrides. if we run in "simple" mode without the 
+   // "Architecures" variable in the config we use the architecure value
+   // from the deb file
+   if(Arch != "")
+      Architecture = Arch;
+   else
+      Architecture = Tags.FindS("Architecture");
+   auto_ptr<Override::Item> OverItem(Over.GetItem(Package,Architecture));
    
    if (Package.empty() == true)
       return _error->Error(_("Archive had no package field"));
-   
+
    // If we need to do any rewriting of the header do it now..
-   if (OverItem == 0)
+   if (OverItem.get() == 0)
    {
       if (NoOverride == false)
       {
@@ -386,9 +394,9 @@ bool PackagesWriter::DoPackage(string FileName)
         ioprintf(c1out, _("  %s has no override entry\n"), Package.c_str());
       }
       
-      OverItem = &Tmp;
-      Tmp.FieldOverride["Section"] = Tags.FindS("Section");
-      Tmp.Priority = Tags.FindS("Priority");
+      OverItem = auto_ptr<Override::Item>(new Override::Item);
+      OverItem->FieldOverride["Section"] = Tags.FindS("Section");
+      OverItem->Priority = Tags.FindS("Priority");
    }
 
    char Size[40];
@@ -557,7 +565,7 @@ bool SourcesWriter::DoPackage(string FileName)
    string BestPrio;
    string Bins = Tags.FindS("Binary");
    char Buffer[Bins.length() + 1];
-   Override::Item *OverItem = 0;
+   auto_ptr<Override::Item> OverItem(0);
    if (Bins.empty() == false)
    {
       strcpy(Buffer,Bins.c_str());
@@ -570,10 +578,10 @@ bool SourcesWriter::DoPackage(string FileName)
       unsigned char BestPrioV = pkgCache::State::Extra;
       for (unsigned I = 0; BinList[I] != 0; I++)
       {
-        Override::Item *Itm = BOver.GetItem(BinList[I]);
-        if (Itm == 0)
+        auto_ptr<Override::Item> Itm(BOver.GetItem(BinList[I]));
+        if (Itm.get() == 0)
            continue;
-        if (OverItem == 0)
+        if (OverItem.get() == 0)
            OverItem = Itm;
 
         unsigned char NewPrioV = debListParser::GetPrio(Itm->Priority);
@@ -586,8 +594,7 @@ bool SourcesWriter::DoPackage(string FileName)
    }
    
    // If we need to do any rewriting of the header do it now..
-   Override::Item Tmp;   
-   if (OverItem == 0)
+   if (OverItem.get() == 0)
    {
       if (NoOverride == false)
       {
@@ -595,15 +602,19 @@ bool SourcesWriter::DoPackage(string FileName)
         ioprintf(c1out, _("  %s has no override entry\n"), Tags.FindS("Source").c_str());
       }
       
-      OverItem = &Tmp;
+      OverItem = auto_ptr<Override::Item>(new Override::Item);
    }
    
-   Override::Item *SOverItem = SOver.GetItem(Tags.FindS("Source"));
-   if (SOverItem == 0)
+   auto_ptr<Override::Item> SOverItem(SOver.GetItem(Tags.FindS("Source")));
+   const auto_ptr<Override::Item> autoSOverItem(SOverItem);
+   if (SOverItem.get() == 0)
    {
-      SOverItem = BOver.GetItem(Tags.FindS("Source"));
-      if (SOverItem == 0)
-        SOverItem = OverItem;
+      SOverItem = auto_ptr<Override::Item>(BOver.GetItem(Tags.FindS("Source")));
+      if (SOverItem.get() == 0)
+      {
+        SOverItem = auto_ptr<Override::Item>(new Override::Item);
+        *SOverItem = *OverItem;
+      }
    }
    
    // Add the dsc to the files hash list
index ce4c947a916b7f50cb1bc44020eeb198cbe64de8..16d014ef895647417409c3a63ba7f62e3b3f5dda 100644 (file)
@@ -92,13 +92,15 @@ class PackagesWriter : public FTWScanner
    string DirStrip;
    FILE *Output;
    struct CacheDB::Stats &Stats;
-   
+   string Arch;
+
    inline bool ReadOverride(string File) {return Over.ReadOverride(File);};
    inline bool ReadExtraOverride(string File) 
       {return Over.ReadExtraOverride(File);};
    virtual bool DoPackage(string FileName);
 
-   PackagesWriter(string DB,string Overrides,string ExtOverrides=string());
+   PackagesWriter(string DB,string Overrides,string ExtOverrides=string(),
+                 string Arch=string());
    virtual ~PackagesWriter() {};
 };
 
@@ -170,6 +172,7 @@ protected:
       string SHA1;
       // Limited by FileFd::Size()
       unsigned long size;
+      ~CheckSum() {};
    };
    map<string,struct CheckSum> CheckSums;
 };
index 981ac1371cc1d902eabf011fb398f5126db94466..b85df68874a8524b83610e31db743725eb43196f 100644 (file)
@@ -88,9 +88,11 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    
    /* This implements a timeout for connect by opening the connection
       nonblocking */
-   if (WaitFd(Fd,true,TimeOut) == false)
+   if (WaitFd(Fd,true,TimeOut) == false) {
+      Owner->SetFailExtraMsg("\nFailReason: Timeout");
       return _error->Error(_("Could not connect to %s:%s (%s), "
                           "connection timed out"),Host.c_str(),Service,Name);
+   }
 
    // Check the socket for an error condition
    unsigned int Err;
diff --git a/share/debian-archive.gpg b/share/debian-archive.gpg
deleted file mode 100644 (file)
index c391d8f..0000000
Binary files a/share/debian-archive.gpg and /dev/null differ