Преглед изворни кода

More fixes
Author: jgg
Date: 1999-05-29 03:32:30 GMT
More fixes

Arch Librarian пре 22 година
родитељ
комит
dafaee5226
2 измењених фајлова са 18 додато и 10 уклоњено
  1. 15 10
      cmdline/apt-cdrom.cc
  2. 3 0
      debian/changelog

+ 15 - 10
cmdline/apt-cdrom.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // Description								/*{{{*/
-// $Id: apt-cdrom.cc,v 1.22 1999/04/07 06:00:20 jgg Exp $
+// $Id: apt-cdrom.cc,v 1.23 1999/05/29 03:32:30 jgg Exp $
 /* ######################################################################
 /* ######################################################################
    
    
    APT CDROM - Tool for handling APT's CDROM database.
    APT CDROM - Tool for handling APT's CDROM database.
@@ -51,10 +51,17 @@ bool FindPackages(string CD,vector<string> &List,string &InfoDir,
    if (chdir(CD.c_str()) != 0)
    if (chdir(CD.c_str()) != 0)
       return _error->Errno("chdir","Unable to change to %s",CD.c_str());
       return _error->Errno("chdir","Unable to change to %s",CD.c_str());
 
 
+   // Look for a .disk subdirectory
+   struct stat Buf;
+   if (stat(".disk",&Buf) == 0)
+   {
+      if (InfoDir.empty() == true)
+	 InfoDir = CD + ".disk/";
+   }
+
    /* Aha! We found some package files. We assume that everything under 
    /* Aha! We found some package files. We assume that everything under 
       this dir is controlled by those package files so we don't look down
       this dir is controlled by those package files so we don't look down
       anymore */
       anymore */
-   struct stat Buf;
    if (stat("Packages",&Buf) == 0) 
    if (stat("Packages",&Buf) == 0) 
    {
    {
       List.push_back(CD);
       List.push_back(CD);
@@ -63,13 +70,6 @@ bool FindPackages(string CD,vector<string> &List,string &InfoDir,
       if (_config->FindB("APT::CDROM::Thorough",false) == false)
       if (_config->FindB("APT::CDROM::Thorough",false) == false)
 	 return true;
 	 return true;
    }
    }
-
-   // Look for a .disk subdirectory
-   if (stat(".disk",&Buf) == 0)
-   {
-      if (InfoDir.empty() == true)
-	 InfoDir = CD + ".disk/";
-   }
    
    
    DIR *D = opendir(".");
    DIR *D = opendir(".");
    if (D == 0)
    if (D == 0)
@@ -506,8 +506,13 @@ bool CopyPackages(string CDROM,string Name,vector<string> &List)
 		     return false;
 		     return false;
 	       }
 	       }
 	       else
 	       else
+	       {
 		  if (Target.Write(Start,Stop-Start) == false)
 		  if (Target.Write(Start,Stop-Start) == false)
-		     return false;		  
+		     return false;
+		  if (Stop[-1] != '\n')
+		     if (Target.Write("\n",1) == false)
+			return false;
+	       }	       
 	    }
 	    }
 	    if (Target.Write("\n",1) == false)
 	    if (Target.Write("\n",1) == false)
 	       return false;
 	       return false;

+ 3 - 0
debian/changelog

@@ -16,6 +16,9 @@ apt (0.3.6.1) unstable; urgency=low
   * Accounted for resumed files in the cps calculation. Closes: #36787
   * Accounted for resumed files in the cps calculation. Closes: #36787
   * Deal with duplicate same version different packages. Closes: #30237
   * Deal with duplicate same version different packages. Closes: #30237
   * Added --no-download. Closes: #38095
   * Added --no-download. Closes: #38095
+  * Order of apt-cdrom dist detection. Closes: #38139
+  * Fix apt-cdrom chop handling and missing lines. Closes: #37276
+  * IPv6 http support
   
   
  -- Jason Gunthorpe <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700
  -- Jason Gunthorpe <jgg@debian.org>  Wed, 12 May 1999 09:18:49 -0700