Forráskód Böngészése

Fixed ftp resume
Author: jgg
Date: 2000-01-10 03:44:54 GMT
Fixed ftp resume

Arch Librarian 22 éve
szülő
commit
7ef724464c
5 módosított fájl, 21 hozzáadás és 9 törlés
  1. 2 2
      apt-pkg/contrib/strutl.cc
  2. 11 2
      apt-pkg/pkgcachegen.cc
  3. 5 1
      debian/changelog
  4. 1 1
      doc/apt.conf.5.yo
  5. 2 3
      methods/ftp.cc

+ 2 - 2
apt-pkg/contrib/strutl.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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)
 		    &Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec,&Tm.tm_year) != 6)
 	 {
 	 {
 	    // 'ftp' time
 	    // '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)
 		       &Tm.tm_mday,&Tm.tm_hour,&Tm.tm_min,&Tm.tm_sec) != 6)
 	       return false;
 	       return false;
 	    Tm.tm_mon--;
 	    Tm.tm_mon--;

+ 11 - 2
apt-pkg/pkgcachegen.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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 <sys/stat.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <errno.h>
 #include <errno.h>
-
+#include <stdio.h>
 #include <system.h>
 #include <system.h>
 									/*}}}*/
 									/*}}}*/
 
 
@@ -470,6 +470,15 @@ bool pkgSrcCacheCheck(pkgSourceList &List)
       struct stat Buf;
       struct stat Buf;
       if (stat(File.c_str(),&Buf) != 0)
       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)",
 	 _error->WarningE("stat","Couldn't stat source package list '%s' (%s)",
 			  I->PackagesInfo().c_str(),File.c_str());	 
 			  I->PackagesInfo().c_str(),File.c_str());	 
 	 Missing++;
 	 Missing++;

+ 5 - 1
debian/changelog

@@ -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
   * Now compiles on OpenBSD, Solaris and HP-UX
   * Clarify segfault errors
   * 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
   
   

+ 1 - 1
doc/apt.conf.5.yo

@@ -109,7 +109,7 @@ dit(bf(Retries))
 Number of retries to perform. If this is non-zero apt will retry failed 
 Number of retries to perform. If this is non-zero apt will retry failed 
 files the given number of times.
 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
 Use symlinks for source archives. If set to true then source archives will
 be symlinked when possible instead of copying. True is the default
 be symlinked when possible instead of copying. True is the default
 
 

+ 2 - 3
methods/ftp.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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.Size = Buf.st_size;
 	 Res.LastModified = Buf.st_mtime;
 	 Res.LastModified = Buf.st_mtime;
+	 Res.ResumePoint = Buf.st_size;
 	 URIDone(Res);
 	 URIDone(Res);
 	 return true;
 	 return true;
       }
       }
@@ -843,7 +844,6 @@ bool FtpMethod::Fetch(FetchItem *Itm)
 	 
 	 
 	 // Timestamp
 	 // Timestamp
 	 struct utimbuf UBuf;
 	 struct utimbuf UBuf;
-	 time(&UBuf.actime);
 	 UBuf.actime = FailTime;
 	 UBuf.actime = FailTime;
 	 UBuf.modtime = FailTime;
 	 UBuf.modtime = FailTime;
 	 utime(FailFile.c_str(),&UBuf);
 	 utime(FailFile.c_str(),&UBuf);
@@ -863,7 +863,6 @@ bool FtpMethod::Fetch(FetchItem *Itm)
    
    
    // Timestamp
    // Timestamp
    struct utimbuf UBuf;
    struct utimbuf UBuf;
-   time(&UBuf.actime);
    UBuf.actime = FailTime;
    UBuf.actime = FailTime;
    UBuf.modtime = FailTime;
    UBuf.modtime = FailTime;
    utime(Queue->DestFile.c_str(),&UBuf);
    utime(Queue->DestFile.c_str(),&UBuf);