]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
* add "purge" commandline argument, closes: #133421)
[apt.git] / apt-pkg / acquire-item.cc
index 3fd2304d2cd9b8e0182a4bebd3ca7abc21dba910..1b912058614de84cdb3bf874850d23b40110ab7d 100644 (file)
@@ -13,9 +13,6 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/acquire-item.h"
-#endif
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/sourcelist.h>
@@ -78,7 +75,7 @@ void pkgAcquire::Item::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
         Dequeue();
         return;
       }
         Dequeue();
         return;
       }
-
+      
       Status = StatError;
       Dequeue();
    }   
       Status = StatError;
       Dequeue();
    }   
@@ -274,9 +271,9 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
       if(found) 
       {
         // queue the diffs
       if(found) 
       {
         // queue the diffs
-       int last_space = Description.rfind(" ");
-       if(last_space != string::npos)
-         Description.erase(last_space, Description.size()-last_space);
+        int last_space = Description.rfind(" ");
+        if(last_space != string::npos)
+           Description.erase(last_space, Description.size()-last_space);
         new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
                              ExpectedMD5, available_patches);
         Complete = false;
         new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
                              ExpectedMD5, available_patches);
         Complete = false;
@@ -285,7 +282,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
         return true;
       }
    }
         return true;
       }
    }
-
+   
    // Nothing found, report and return false
    // Failing here is ok, if we return false later, the full
    // IndexFile is queued
    // Nothing found, report and return false
    // Failing here is ok, if we return false later, the full
    // IndexFile is queued
@@ -467,7 +464,6 @@ bool pkgAcqIndexDiffs::QueueNextDiff()
    // queue the right diff
    Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
    Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
    // queue the right diff
    Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
    Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
-
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);
 
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
    DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);
 
@@ -606,7 +602,6 @@ string pkgAcqIndex::Custom600Headers()
 
 void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 {
 
 void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 {
-
    // no .bz2 found, retry with .gz
    if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
       Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz"; 
    // no .bz2 found, retry with .gz
    if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
       Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz"; 
@@ -855,7 +850,7 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    if(Status == StatTransientNetworkError)
    {
       Item::Failed(Message,Cnf);
    if(Status == StatTransientNetworkError)
    {
       Item::Failed(Message,Cnf);
-      // move the sigfile back on network failures (and re-authenticated?)
+      // move the sigfile back on transient network failures 
       if(FileExists(DestFile))
         Rename(DestFile,Final);
 
       if(FileExists(DestFile))
         Rename(DestFile,Final);