]> git.saurik.com Git - apt.git/commitdiff
Fixed ftp resume
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:37 +0000 (16:55 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:37 +0000 (16:55 +0000)
Author: jgg
Date: 2000-01-10 03:44:54 GMT
Fixed ftp resume

apt-pkg/contrib/strutl.cc
apt-pkg/pkgcachegen.cc
debian/changelog
doc/apt.conf.5.yo
methods/ftp.cc

index 8e80c5efd1f416c541ed5c775bb4071170435370..6b22cfe032635e41f5f48e8ea9eab84220dbdbf4 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: strutl.cc,v 1.31 1999/12/10 07:21:52 jgg Exp $
+// $Id: strutl.cc,v 1.32 2000/01/10 03:44:54 jgg Exp $
 /* ######################################################################
 
    String Util - Some usefull string functions.
 /* ######################################################################
 
    String Util - Some usefull string functions.
@@ -660,7 +660,7 @@ bool StrToTime(string Val,time_t &Result)
                    &Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec,&Tm.tm_year) != 6)
         {
            // 'ftp' time
                    &Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec,&Tm.tm_year) != 6)
         {
            // 'ftp' time
-           if (sscanf(I,"%4d%2d%2d%2d%2d%2d",&Tm.tm_year,&Tm.tm_mon,
+           if (sscanf(Val.c_str(),"%4d%2d%2d%2d%2d%2d",&Tm.tm_year,&Tm.tm_mon,
                       &Tm.tm_mday,&Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec) != 6)
               return false;
            Tm.tm_mon--;
                       &Tm.tm_mday,&Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec) != 6)
               return false;
            Tm.tm_mon--;
index 4033dc54006b6eba24d6b3f7af4979acb59d399d..404ef652a6b3a839a79c1f37c82faef07d97c25c 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: pkgcachegen.cc,v 1.43 1999/12/10 23:40:29 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.44 2000/01/10 03:44:54 jgg Exp $
 /* ######################################################################
    
    Package Cache Generator - Generator for the cache structure.
 /* ######################################################################
    
    Package Cache Generator - Generator for the cache structure.
@@ -26,7 +26,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
-
+#include <stdio.h>
 #include <system.h>
                                                                        /*}}}*/
 
 #include <system.h>
                                                                        /*}}}*/
 
@@ -470,6 +470,15 @@ bool pkgSrcCacheCheck(pkgSourceList &List)
       struct stat Buf;
       if (stat(File.c_str(),&Buf) != 0)
       {
       struct stat Buf;
       if (stat(File.c_str(),&Buf) != 0)
       {
+        // Old format file name.. rename it
+        if (File[0] == '_' && stat(File.c_str()+1,&Buf) == 0)
+        {
+           if (rename(File.c_str()+1,File.c_str()) != 0)
+              return _error->Errno("rename","Failed to rename %s to %s",
+                                   File.c_str()+1,File.c_str());
+           continue;
+        }       
+        
         _error->WarningE("stat","Couldn't stat source package list '%s' (%s)",
                          I->PackagesInfo().c_str(),File.c_str());       
         Missing++;
         _error->WarningE("stat","Couldn't stat source package list '%s' (%s)",
                          I->PackagesInfo().c_str(),File.c_str());       
         Missing++;
index d2b433d0e50c072589164301d2e2218e4dde93cb..d9f6cb267a9cd89ce9960996008f0ce0120facdd 100644 (file)
@@ -1,8 +1,12 @@
 apt (0.3.15.1) unstable; urgency=low
  
 apt (0.3.15.1) unstable; urgency=low
  
-  * Made --no-download work.
+  * Made --no-download work. Closes: #52993
   * Now compiles on OpenBSD, Solaris and HP-UX
   * Clarify segfault errors
   * Now compiles on OpenBSD, Solaris and HP-UX
   * Clarify segfault errors
+  * More debhelper fixes. Closes: #52662, #54566
+  * Fix for Joel's discovery of glibc removal behavoir.
+  * Fix for Ben Collins file: uri from slink upgrade.
+  * Fixed resume code in FTP. Closes: #54323
   
  -- Jason Gunthorpe <jgg@debian.org>  Sat,  4 Dec 1999 21:17:24 -0800
   
   
  -- Jason Gunthorpe <jgg@debian.org>  Sat,  4 Dec 1999 21:17:24 -0800
   
index c9a116d45f87ec548abd0ecf0035a7e42927b49e..996de3a4246dad9ebcee3bcac0b405a2d3e5cd7b 100644 (file)
@@ -109,7 +109,7 @@ dit(bf(Retries))
 Number of retries to perform. If this is non-zero apt will retry failed 
 files the given number of times.
 
 Number of retries to perform. If this is non-zero apt will retry failed 
 files the given number of times.
 
-dit(bf(Acquire::Source-Symlinks))
+dit(bf(Source-Symlinks))
 Use symlinks for source archives. If set to true then source archives will
 be symlinked when possible instead of copying. True is the default
 
 Use symlinks for source archives. If set to true then source archives will
 be symlinked when possible instead of copying. True is the default
 
index 1780ac7400d098042ccfe951af2a9143dd192c18..ac12d09131d20a1f61ffc7f0b978f2fa7e67e777 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: ftp.cc,v 1.18 1999/12/10 07:21:52 jgg Exp $
+// $Id: ftp.cc,v 1.19 2000/01/10 03:44:54 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the FTP aquire method for APT.
 /* ######################################################################
 
    HTTP Aquire Method - This is the FTP aquire method for APT.
@@ -814,6 +814,7 @@ bool FtpMethod::Fetch(FetchItem *Itm)
       {
         Res.Size = Buf.st_size;
         Res.LastModified = Buf.st_mtime;
       {
         Res.Size = Buf.st_size;
         Res.LastModified = Buf.st_mtime;
+        Res.ResumePoint = Buf.st_size;
         URIDone(Res);
         return true;
       }
         URIDone(Res);
         return true;
       }
@@ -843,7 +844,6 @@ bool FtpMethod::Fetch(FetchItem *Itm)
         
         // Timestamp
         struct utimbuf UBuf;
         
         // Timestamp
         struct utimbuf UBuf;
-        time(&UBuf.actime);
         UBuf.actime = FailTime;
         UBuf.modtime = FailTime;
         utime(FailFile.c_str(),&UBuf);
         UBuf.actime = FailTime;
         UBuf.modtime = FailTime;
         utime(FailFile.c_str(),&UBuf);
@@ -863,7 +863,6 @@ bool FtpMethod::Fetch(FetchItem *Itm)
    
    // Timestamp
    struct utimbuf UBuf;
    
    // Timestamp
    struct utimbuf UBuf;
-   time(&UBuf.actime);
    UBuf.actime = FailTime;
    UBuf.modtime = FailTime;
    utime(Queue->DestFile.c_str(),&UBuf);
    UBuf.actime = FailTime;
    UBuf.modtime = FailTime;
    utime(Queue->DestFile.c_str(),&UBuf);