Browse Source

* Simplified HttpMethod::Fetch on http.cc removing Tail variable;
* Fix pipeline handling on http.cc (closes: #413324)
* Fix building to properly support binNMUs. Thanks to Daniel Schepler
<schepler@math.unipd.it> by the patch (closes: #359634)
* Fix example for Install-{Recommends,Suggests} options on
configure-index example file. Thanks to Peter Eisentraut
<peter_e@gmx.net> by the patch (closes: #432223)
*

Michael Vogt 19 years ago
parent
commit
f0efdda074
3 changed files with 33 additions and 8 deletions
  1. 14 1
      debian/changelog
  2. 1 1
      debian/rules
  3. 18 6
      methods/http.cc

+ 14 - 1
debian/changelog

@@ -1,3 +1,17 @@
+apt (0.7.2ubuntu9) unstable; urgency=low
+
+  [Otavio Salvador]
+  * Simplified HttpMethod::Fetch on http.cc removing Tail variable;
+  * Fix pipeline handling on http.cc (closes: #413324)
+  * Fix building to properly support binNMUs. Thanks to Daniel Schepler
+    <schepler@math.unipd.it> by the patch (closes: #359634)
+  * Fix example for Install-{Recommends,Suggests} options on
+    configure-index example file. Thanks to Peter Eisentraut
+    <peter_e@gmx.net> by the patch (closes: #432223)
+  * 
+
+ --
+
 apt (0.7.2ubuntu8) gutsy; urgency=low
 
   [Michael Vogt]
@@ -5,7 +19,6 @@ apt (0.7.2ubuntu8) gutsy; urgency=low
     - fix in the task-install code regexp (thanks to Adam Conrad and
       Colin Watson). This should bring the livecd build back into
       shape
-  
   [Otavio Salvador]
   * Fix compilation warnings:
     - apt-pkg/contrib/configuration.cc: wrong argument type;

+ 1 - 1
debian/rules

@@ -38,7 +38,7 @@ build:
 
 PKG=apt
 DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
-APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' -e 's/\+.*$$//')
+APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' | sed -e 's/\+.*$$//')
 APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in)
 APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g')
 

+ 18 - 6
methods/http.cc

@@ -998,7 +998,6 @@ bool HttpMethod::Fetch(FetchItem *)
 
    // Queue the requests
    int Depth = -1;
-   bool Tail = false;
    for (FetchItem *I = Queue; I != 0 && Depth < (signed)PipelineDepth; 
 	I = I->Next, Depth++)
    {
@@ -1010,8 +1009,6 @@ bool HttpMethod::Fetch(FetchItem *)
       if (Server->Comp(I->Uri) == false)
 	 break;
       if (QueueBack == I)
-	 Tail = true;
-      if (Tail == true)
       {
 	 QueueBack = I->Next;
 	 SendReq(I,Server->Out);
@@ -1073,7 +1070,6 @@ int HttpMethod::Loop()
 	 delete Server;
 	 Server = new ServerState(Queue->Uri,this);
       }
-      
       /* If the server has explicitly said this is the last connection
          then we pre-emptively shut down the pipeline and tear down 
 	 the connection. This will speed up HTTP/1.0 servers a tad
@@ -1170,8 +1166,24 @@ int HttpMethod::Loop()
 	       URIDone(Res);
 	    }
 	    else
-	       Fail(true);
-	    
+	    {
+	       if (Server->ServerFd == -1)
+	       {
+		  FailCounter++;
+		  _error->Discard();
+		  Server->Close();
+		  
+		  if (FailCounter >= 2)
+		  {
+		     Fail(_("Connection failed"),true);
+		     FailCounter = 0;
+		  }
+		  
+		  QueueBack = Queue;
+	       }
+	       else
+		  Fail(true);
+	    }
 	    break;
 	 }