Michael Vogt 18 роки тому
батько
коміт
453a5e964e

+ 1 - 0
apt-pkg/acquire-worker.cc

@@ -325,6 +325,7 @@ bool pkgAcquire::Worker::RunMessages()
 	    // set some status
 	    if(LookupTag(Message,"FailReason") == "Timeout" || 
 	       LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
+	       LookupTag(Message,"FailReason") == "ResolveFailure" ||
 	       LookupTag(Message,"FailReason") == "ConnectionRefused") 
 	       Owner->Status = pkgAcquire::Item::StatTransientNetworkError;
 

+ 79 - 1
apt-pkg/algorithms.cc

@@ -19,7 +19,7 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/sptr.h>
-
+#include <apt-pkg/acquire-item.h>
     
 #include <apti18n.h>
 #include <sys/types.h>
@@ -1301,3 +1301,81 @@ void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List)
 }
 									/*}}}*/
 
+// CacheFile::ListUpdate - update the cache files                    	/*{{{*/
+// ---------------------------------------------------------------------
+/* This is a simple wrapper to update the cache. it will fetch stuff
+ * from the network (or any other sources defined in sources.list)
+ */
+bool ListUpdate(pkgAcquireStatus &Stat, 
+		pkgSourceList &List, 
+		int PulseInterval)
+{
+   pkgAcquire::RunResult res;
+   pkgAcquire Fetcher(&Stat);
+
+   // Populate it with the source selection
+   if (List.GetIndexes(&Fetcher) == false)
+	 return false;
+
+   // Run scripts
+   RunScripts("APT::Update::Pre-Invoke");
+   
+   // check arguments
+   if(PulseInterval>0)
+      res = Fetcher.Run(PulseInterval);
+   else
+      res = Fetcher.Run();
+
+   if (res == pkgAcquire::Failed)
+      return false;
+
+   bool Failed = false;
+   bool TransientNetworkFailure = false;
+   for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); 
+	I != Fetcher.ItemsEnd(); I++)
+   {
+      if ((*I)->Status == pkgAcquire::Item::StatDone)
+	 continue;
+
+      (*I)->Finished();
+
+      _error->Warning(_("Failed to fetch %s  %s\n"),(*I)->DescURI().c_str(),
+	      (*I)->ErrorText.c_str());
+
+      if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) 
+      {
+	 TransientNetworkFailure = true;
+	 continue;
+      }
+
+      Failed = true;
+   }
+   
+   // Clean out any old list files
+   // Keep "APT::Get::List-Cleanup" name for compatibility, but
+   // this is really a global option for the APT library now
+   if (!TransientNetworkFailure && !Failed &&
+       (_config->FindB("APT::Get::List-Cleanup",true) == true &&
+	_config->FindB("APT::List-Cleanup",true) == true))
+   {
+      if (Fetcher.Clean(_config->FindDir("Dir::State::lists")) == false ||
+	  Fetcher.Clean(_config->FindDir("Dir::State::lists") + "partial/") == false)
+	 // something went wrong with the clean
+	 return false;
+   }
+   
+   if (TransientNetworkFailure == true)
+      _error->Warning(_("Some index files failed to download, they have been ignored, or old ones used instead."));
+   else if (Failed == true)
+      return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead."));
+
+
+   // Run the success scripts if all was fine
+   if(!TransientNetworkFailure && !Failed)
+      RunScripts("APT::Update::Post-Invoke-Success");
+
+   // Run the other scripts
+   RunScripts("APT::Update::Post-Invoke");
+   return true;
+}
+									/*}}}*/

+ 3 - 0
apt-pkg/algorithms.h

@@ -33,6 +33,7 @@
 
 #include <apt-pkg/packagemanager.h>
 #include <apt-pkg/depcache.h>
+#include <apt-pkg/acquire.h>
 
 #include <iostream>
 
@@ -130,5 +131,7 @@ bool pkgAllUpgrade(pkgDepCache &Cache);
 bool pkgMinimizeUpgrade(pkgDepCache &Cache);
 
 void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List);
+
+bool ListUpdate(pkgAcquireStatus &progress, pkgSourceList &List, int PulseInterval=0);
 		     
 #endif

+ 3 - 0
apt-pkg/cachefile.cc

@@ -19,6 +19,8 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/policy.h>
 #include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/acquire-item.h>
+#include <apt-pkg/fileutl.h>
     
 #include <apti18n.h>
 									/*}}}*/
@@ -107,6 +109,7 @@ bool pkgCacheFile::Open(OpProgress &Progress,bool WithLock)
 }
 									/*}}}*/
 
+
 // CacheFile::Close - close the cache files				/*{{{*/
 // ---------------------------------------------------------------------
 /* */

+ 2 - 0
apt-pkg/cachefile.h

@@ -19,6 +19,8 @@
 
 
 #include <apt-pkg/depcache.h>
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/sourcelist.h>
 
 class pkgPolicy;
 class pkgCacheFile

+ 66 - 1
apt-pkg/contrib/fileutl.cc

@@ -8,9 +8,12 @@
    CopyFile - Buffered copy of a single file
    GetLock - dpkg compatible lock file manipulation (fcntl)
    
-   This source is placed in the Public Domain, do with it what you will
+   Most of this source is placed in the Public Domain, do with it what 
+   you will
    It was originally written by Jason Gunthorpe <jgg@debian.org>.
    
+   The exception is RunScripts() it is under the GPLv2
+
    ##################################################################### */
 									/*}}}*/
 // Include Files							/*{{{*/
@@ -38,6 +41,68 @@
 
 using namespace std;
 
+// RunScripts - Run a set of scripts from a configuration subtree	/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool RunScripts(const char *Cnf)
+{
+   Configuration::Item const *Opts = _config->Tree(Cnf);
+   if (Opts == 0 || Opts->Child == 0)
+      return true;
+   Opts = Opts->Child;
+
+   // Fork for running the system calls
+   pid_t Child = ExecFork();
+   
+   // This is the child
+   if (Child == 0)
+   {
+      if (chdir("/tmp/") != 0)
+	 _exit(100);
+	 
+      unsigned int Count = 1;
+      for (; Opts != 0; Opts = Opts->Next, Count++)
+      {
+	 if (Opts->Value.empty() == true)
+	    continue;
+	 
+	 if (system(Opts->Value.c_str()) != 0)
+	    _exit(100+Count);
+      }
+      _exit(0);
+   }      
+
+   // Wait for the child
+   int Status = 0;
+   while (waitpid(Child,&Status,0) != Child)
+   {
+      if (errno == EINTR)
+	 continue;
+      return _error->Errno("waitpid","Couldn't wait for subprocess");
+   }
+
+   // Restore sig int/quit
+   signal(SIGQUIT,SIG_DFL);
+   signal(SIGINT,SIG_DFL);   
+
+   // Check for an error code.
+   if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
+   {
+      unsigned int Count = WEXITSTATUS(Status);
+      if (Count > 100)
+      {
+	 Count -= 100;
+	 for (; Opts != 0 && Count != 1; Opts = Opts->Next, Count--);
+	 _error->Error("Problem executing scripts %s '%s'",Cnf,Opts->Value.c_str());
+      }
+      
+      return _error->Error("Sub-process returned an error code");
+   }
+   
+   return true;
+}
+									/*}}}*/
+
 // CopyFile - Buffered copy of a file					/*{{{*/
 // ---------------------------------------------------------------------
 /* The caller is expected to set things so that failure causes erasure */

+ 1 - 0
apt-pkg/contrib/fileutl.h

@@ -77,6 +77,7 @@ class FileFd
    virtual ~FileFd();
 };
 
+bool RunScripts(const char *Cnf);
 bool CopyFile(FileFd &From,FileFd &To);
 int GetLock(string File,bool Errors = true);
 bool FileExists(string File);

+ 4 - 63
apt-pkg/deb/dpkgpm.cc

@@ -14,6 +14,7 @@
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/strutl.h>
 #include <apti18n.h>
+#include <apt-pkg/fileutl.h>
 
 #include <unistd.h>
 #include <stdlib.h>
@@ -95,68 +96,6 @@ bool pkgDPkgPM::Remove(PkgIterator Pkg,bool Purge)
    return true;
 }
 									/*}}}*/
-// DPkgPM::RunScripts - Run a set of scripts				/*{{{*/
-// ---------------------------------------------------------------------
-/* This looks for a list of script sto run from the configuration file,
-   each one is run with system from a forked child. */
-bool pkgDPkgPM::RunScripts(const char *Cnf)
-{
-   Configuration::Item const *Opts = _config->Tree(Cnf);
-   if (Opts == 0 || Opts->Child == 0)
-      return true;
-   Opts = Opts->Child;
-
-   // Fork for running the system calls
-   pid_t Child = ExecFork();
-   
-   // This is the child
-   if (Child == 0)
-   {
-      if (chdir("/tmp/") != 0)
-	 _exit(100);
-	 
-      unsigned int Count = 1;
-      for (; Opts != 0; Opts = Opts->Next, Count++)
-      {
-	 if (Opts->Value.empty() == true)
-	    continue;
-	 
-	 if (system(Opts->Value.c_str()) != 0)
-	    _exit(100+Count);
-      }
-      _exit(0);
-   }      
-
-   // Wait for the child
-   int Status = 0;
-   while (waitpid(Child,&Status,0) != Child)
-   {
-      if (errno == EINTR)
-	 continue;
-      return _error->Errno("waitpid","Couldn't wait for subprocess");
-   }
-
-   // Restore sig int/quit
-   signal(SIGQUIT,SIG_DFL);
-   signal(SIGINT,SIG_DFL);   
-
-   // Check for an error code.
-   if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
-   {
-      unsigned int Count = WEXITSTATUS(Status);
-      if (Count > 100)
-      {
-	 Count -= 100;
-	 for (; Opts != 0 && Count != 1; Opts = Opts->Next, Count--);
-	 _error->Error("Problem executing scripts %s '%s'",Cnf,Opts->Value.c_str());
-      }
-      
-      return _error->Error("Sub-process returned an error code");
-   }
-   
-   return true;
-}
-                                                                        /*}}}*/
 // DPkgPM::SendV2Pkgs - Send version 2 package info			/*{{{*/
 // ---------------------------------------------------------------------
 /* This is part of the helper script communication interface, it sends
@@ -763,14 +702,16 @@ bool pkgDPkgPM::Go(int OutStatusFd)
       sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN);
 
       struct	termios tt;
+      struct	termios tt_out;
       struct	winsize win;
       int	master;
       int	slave;
 
       // FIXME: setup sensible signal handling (*ick*)
       tcgetattr(0, &tt);
+      tcgetattr(1, &tt_out);
       ioctl(0, TIOCGWINSZ, (char *)&win);
-      if (openpty(&master, &slave, NULL, &tt, &win) < 0) 
+      if (openpty(&master, &slave, NULL, &tt_out, &win) < 0) 
       {
 	 const char *s = _("Can not write log, openpty() "
 			   "failed (/dev/pts not mounted?)\n");

+ 0 - 1
apt-pkg/deb/dpkgpm.h

@@ -64,7 +64,6 @@ class pkgDPkgPM : public pkgPackageManager
    vector<Item> List;
 
    // Helpers
-   bool RunScripts(const char *Cnf);
    bool RunScriptsWithPkgs(const char *Cnf);
    bool SendV2Pkgs(FILE *F);
 

+ 41 - 12
apt-pkg/packagemanager.cc

@@ -118,6 +118,41 @@ bool pkgPackageManager::FixMissing()
 }
 									/*}}}*/
 
+// PM::ImmediateAdd - Add the immediate flag recursivly			/*{{{*/
+// ---------------------------------------------------------------------
+/* This adds the immediate flag to the pkg and recursively to the
+   dependendies 
+ */
+void pkgPackageManager::ImmediateAdd(PkgIterator I, bool UseInstallVer)
+{
+   DepIterator D;
+   
+   if(UseInstallVer)
+   {
+      if(Cache[I].InstallVer == 0)
+	 return;
+      D = Cache[I].InstVerIter(Cache).DependsList(); 
+   } else {
+      if (I->CurrentVer == 0)
+	 return;
+      D = I.CurrentVer().DependsList(); 
+   }
+
+   for ( /* nothing */  ; D.end() == false; D++)
+      if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
+      {
+	 if(!List->IsFlag(D.TargetPkg(), pkgOrderList::Immediate))
+	 {
+	    if(Debug)
+	       clog << "ImmediateAdd(): Adding Immediate flag to " << I.Name() << endl;
+	    List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
+	    ImmediateAdd(D.TargetPkg(), UseInstallVer);
+	 }
+      }
+   return;
+}
+									/*}}}*/
+
 // PM::CreateOrderList - Create the ordering class			/*{{{*/
 // ---------------------------------------------------------------------
 /* This populates the ordering list with all the packages that are
@@ -144,21 +179,15 @@ bool pkgPackageManager::CreateOrderList()
 	   (I->Flags & pkgCache::Flag::Important) == pkgCache::Flag::Important) &&
 	  NoImmConfigure == false)
       {
+	 if(Debug)
+	    clog << "CreateOrderList(): Adding Immediate flag for " << I.Name() << endl;
 	 List->Flag(I,pkgOrderList::Immediate);
-	 
-	 // Look for other packages to make immediate configurea
-	 if (Cache[I].InstallVer != 0)
-	    for (DepIterator D = Cache[I].InstVerIter(Cache).DependsList(); 
-		 D.end() == false; D++)
-	       if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
-		  List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
+
+	 // Look for other install packages to make immediate configurea
+	 ImmediateAdd(I, true);
 	 
 	 // And again with the current version.
-	 if (I->CurrentVer != 0)
-	    for (DepIterator D = I.CurrentVer().DependsList(); 
-		 D.end() == false; D++)
-	       if (D->Type == pkgCache::Dep::Depends || D->Type == pkgCache::Dep::PreDepends)
-		  List->Flag(D.TargetPkg(),pkgOrderList::Immediate);
+	 ImmediateAdd(I, false);
       }
       
       // Not interesting

+ 1 - 0
apt-pkg/packagemanager.h

@@ -49,6 +49,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    bool Debug;
          
    bool DepAdd(pkgOrderList &Order,PkgIterator P,int Depth = 0);
+   void ImmediateAdd(PkgIterator P, bool UseInstallVer);
    virtual OrderResult OrderInstall();
    bool CheckRConflicts(PkgIterator Pkg,DepIterator Dep,const char *Ver);
    bool CreateOrderList();

+ 9 - 48
cmdline/apt-get.cc

@@ -1351,14 +1351,15 @@ bool DoUpdate(CommandLine &CmdL)
 	 return _error->Error(_("Unable to lock the list directory"));
    }
    
-   // Create the download object
+   // Create the progress
    AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0));
-   pkgAcquire Fetcher(&Stat);
-
-   
+      
    // Just print out the uris an exit if the --print-uris flag was used
    if (_config->FindB("APT::Get::Print-URIs") == true)
    {
+      // get a fetcher
+      pkgAcquire Fetcher(&Stat);
+
       // Populate it with the source selection and get all Indexes 
       // (GetAll=true)
       if (List.GetIndexes(&Fetcher,true) == false)
@@ -1371,54 +1372,14 @@ bool DoUpdate(CommandLine &CmdL)
       return true;
    }
 
-   // Populate it with the source selection
-   if (List.GetIndexes(&Fetcher) == false)
-	 return false;
-   
-   // Run it
-   if (Fetcher.Run() == pkgAcquire::Failed)
-      return false;
-
-   bool Failed = false;
-   bool TransientNetworkFailure = false;
-   for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
-   {
-      if ((*I)->Status == pkgAcquire::Item::StatDone)
-	 continue;
-
-      (*I)->Finished();
-
-      fprintf(stderr,_("Failed to fetch %s  %s\n"),(*I)->DescURI().c_str(),
-	      (*I)->ErrorText.c_str());
-
-      if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) 
-      {
-	 TransientNetworkFailure = true;
-	 continue;
-      }
-
-      Failed = true;
-   }
-   
-   // Clean out any old list files
-   if (!TransientNetworkFailure &&
-       _config->FindB("APT::Get::List-Cleanup",true) == true)
-   {
-      if (Fetcher.Clean(_config->FindDir("Dir::State::lists")) == false ||
-	  Fetcher.Clean(_config->FindDir("Dir::State::lists") + "partial/") == false)
-	 return false;
-   }
-   
-   // Prepare the cache.   
+   // do the work
    CacheFile Cache;
+   bool res = ListUpdate(Stat, List);
+     
+   // Rebuild the cache.   
    if (Cache.BuildCaches() == false)
       return false;
    
-   if (TransientNetworkFailure == true)
-      _error->Warning(_("Some index files failed to download, they have been ignored, or old ones used instead."));
-   else if (Failed == true)
-      return _error->Error(_("Some index files failed to download, they have been ignored, or old ones used instead."));
-
    return true;
 }
 									/*}}}*/

+ 39 - 3
cmdline/apt-key

@@ -9,9 +9,39 @@ GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-k
 GPG="$GPG_CMD --keyring /etc/apt/trusted.gpg"
 
 
+MASTER_KEYRING=""
+#MASTER_KEYRING=/usr/share/keyrings/debian-master-keyring.gpg
 ARCHIVE_KEYRING=/usr/share/keyrings/debian-archive-keyring.gpg
 REMOVED_KEYS=/usr/share/keyrings/debian-archive-removed-keys.gpg
 
+add_keys_with_verify_against_master_keyring() {
+    ADD_KEYRING=$1
+    MASTER=$2
+    
+    if [ ! -f "$ADD_KEYRING" ]; then
+	echo "ERROR: '$ADD_KEYRING' not found"
+	return
+    fi 
+    if [ ! -f "$MASTER" ]; then
+	echo "ERROR: '$MASTER' not found"
+	return
+    fi
+
+    # when adding new keys, make sure that the archive-master-keyring
+    # is honored. so:
+    #   all keys that are exported and have the name
+    #   "Ubuntu Archive Automatic Signing Key" must have a valid signature
+    #   from a key in the ubuntu-master-keyring
+    add_keys=`$GPG_CMD --keyring $ADD_KEYRING --with-colons --list-keys | grep ^pub | cut -d: -f5`
+    master_keys=`$GPG_CMD --keyring $MASTER --with-colons --list-keys | grep ^pub | cut -d: -f5`
+    for add_key in $add_keys; do
+	for master_key in $master_keys; do
+	    if $GPG --list-sigs --with-colons $add_key | grep ^sig | cut -d: -f5 | grep -q $master_key; then
+		$GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export $add_key | $GPG --import
+	    fi
+	done
+    done
+}
 
 update() {
     if [ ! -f $ARCHIVE_KEYRING ]; then
@@ -20,10 +50,15 @@ update() {
 	exit 1
     fi
 
-    # add new keys
-    $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
+    # add new keys, if no MASTER_KEYRING is used, use the traditional
+    # way
+    if [ -z "$MASTER_KEYRING" ]; then
+	$GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
+    else
+	add_keys_with_verify_against_master_keyring $ARCHIVE_KEYRING $MASTER_KEYRING
+    fi
 
-    # remove no-longer used keys
+    # remove no-longer supported/used keys
     keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
     for key in $keys; do
 	if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
@@ -32,6 +67,7 @@ update() {
     done
 }
 
+
 usage() {
     echo "Usage: apt-key [command] [arguments]"
     echo

+ 34 - 2
debian/changelog

@@ -1,4 +1,27 @@
-apt (0.7.10) UNRELEASED; urgency=low
+apt (0.7.11) UNRELEASED; urgency=low
+
+  [ Colin Watson ]
+  * apt-pkg/algorithms.cc:
+    - Since APT::Get::List-Cleanup and APT::List-Cleanup both default to
+      true, the effect of the compatibility code was to require both of them
+      to be set to false in order to disable list cleanup; this broke the
+      installer. Instead, disable list cleanup if either of them is set to
+      false.
+  
+  [ Michael Vogt ]
+  * cmdline/apt-key:
+    - add support for a master-keyring that contains signing keys
+      that can be used to sign the archive signing keys. This should
+      make key-rollover easier.
+  * apt-pkg/deb/dpkgpm.cc:
+    - merged patch from Kees Cook to fix anoying upper-case display
+      on amd64 in sbuild
+  * apt-pkg/algorithms.cc: 
+    - add APT::Update::Post-Invoke-Success script slot
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 10 Jan 2008 12:06:12 +0100
+
+apt (0.7.10) unstable; urgency=low
 
   [ Otavio Salvador ]
   * Applied patch from Mike O'Connor <stew@vireo.org> to add a manpage to
@@ -43,6 +66,15 @@ apt (0.7.10) UNRELEASED; urgency=low
   * apt-pkg/acquire-item.{cc,h}:
     - make the authentication download code more robust against
       servers/proxies with broken If-Range implementations
+  * apt-pkg/packagemanager.{cc,h}:
+    - propergate the Immediate flag to make hitting the 
+      "E: Internal Error, Could not perform immediate configuration (2)"
+      harder
+  * debian/control:
+    - build against libdb-dev (instead of libdb4.4-dev)
+  * merged the apt--DoListUpdate branch, this provides a common interface
+    for "apt-get update" like operations for the frontends and also provides
+    hooks to run stuff in APT::Update::{Pre,Post}-Invoke
 
   [ Chris Cheney ]
   * ftparchive/contents.cc:
@@ -59,7 +91,7 @@ apt (0.7.10) UNRELEASED; urgency=low
   * Fix wording for "After unpacking...". Thans to Michael Gilbert
     for the patch. Closes: #260825
 
- -- Christian Perrier <bubulle@debian.org>  Mon, 17 Dec 2007 10:10:17 +0530
+ -- Michael Vogt <mvo@debian.org>  Mon, 07 Jan 2008 21:40:47 +0100
 
 apt (0.7.9) unstable; urgency=low
 

+ 1 - 1
debian/control

@@ -4,7 +4,7 @@ Priority: important
 Maintainer: APT Development Team <deity@lists.debian.org>
 Uploaders: Jason Gunthorpe <jgg@debian.org>, Adam Heath <doogie@debian.org>, Matt Zimmerman <mdz@debian.org>, Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>
 Standards-Version: 3.7.2.2
-Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5)
+Build-Depends: debhelper (>= 5.0), libdb-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5)
 Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1)
 XS-Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/
 

+ 6 - 0
doc/examples/configure-index

@@ -77,6 +77,12 @@ APT
      NoAct "false";
   };
 
+  Update
+  {
+     Pre-Invoke {"touch /var/lib/apt/pre-update-stamp"; };
+     Post-Invoke {"touch /var/lib/apt/post-update-stamp"; };
+  };
+
   Authentication
   {
      TrustCDROM "false";            // consider the CDROM always trusted

+ 1 - 0
methods/connect.cc

@@ -164,6 +164,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
 		  DefPort = 0;
 		  continue;
 	       }
+	       Owner->SetFailExtraMsg("\nFailReason: ResolveFailure");
 	       return _error->Error(_("Could not resolve '%s'"),Host.c_str());
 	    }