[Aptitude-svn-commit] r3602 - in branches/aptitude-0.3/aptitude: . src src/generic

Daniel Burrows dburrows@costa.debian.org
Sun Jul 3 22:25:00 UTC 2005


Author: dburrows
Date: Sun Jul  3 22:24:57 2005
New Revision: 3602

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.cc
   branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.h
   branches/aptitude-0.3/aptitude/src/view_changelog.cc
Log:
Also update more frequently when downloading changelogs.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sun Jul  3 22:24:57 2005
@@ -1,5 +1,9 @@
 2005-07-03  Daniel Burrows  <dburrows@debian.org>
 
+	* src/generic/pkg_changelog.cc, src/generic/pkg_changelog.h, src/view_changelog.cc:
+
+	  Update more frequently when downloading changelogs, too.
+
 	* doc/en/aptitude.xml, src/download.cc:
 
 	  Drop the frequency of screen updates by an order of magnitude,

Modified: branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.cc	Sun Jul  3 22:24:57 2005
@@ -1,6 +1,6 @@
 // pkg_changelog.cc
 //
-//  Copyright 2000 Daniel Burrows
+//  Copyright 2000, 2004-2005 Daniel Burrows
 //
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -39,7 +39,8 @@
 
 using namespace std;
 
-pkg_changelog::pkg_changelog(string _filename):filename(_filename)
+pkg_changelog::pkg_changelog(const string &_filename)
+  :filename(_filename)
 {
 }
 
@@ -72,7 +73,8 @@
 };
 
 pkg_changelog *get_changelog(pkgCache::VerIterator ver,
-			     pkgAcquireStatus *status)
+			     pkgAcquireStatus *status,
+			     int PulseInterval)
 {
   if(ver.FileList().end())
     return NULL;
@@ -159,7 +161,7 @@
   sigaddset(&signals, SIGWINCH);
   sigprocmask(SIG_UNBLOCK, &signals, &oldsigs);
 
-  if(fetcher.Run()!=pkgAcquire::Continue || failed)
+  if(fetcher.Run(PulseInterval)!=pkgAcquire::Continue || failed)
     {
       _error->Error("Couldn't fetch URL %s", uribuf);
 

Modified: branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/pkg_changelog.h	Sun Jul  3 22:24:57 2005
@@ -1,6 +1,6 @@
 // pkg_changelog.h    -*-c++-*-
 //
-//  Copyright 2000 Daniel Burrows
+//  Copyright 2000, 2005 Daniel Burrows
 //
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
@@ -33,9 +33,10 @@
 {
   std::string filename;
 
-  pkg_changelog::pkg_changelog(std::string _filename);
+  pkg_changelog::pkg_changelog(const std::string &_filename);
   friend pkg_changelog *get_changelog(pkgCache::VerIterator,
-				      pkgAcquireStatus *);
+				      pkgAcquireStatus *,
+				      int);
 public:
   std::string get_filename() {return filename;}
 
@@ -43,6 +44,7 @@
 };
 
 pkg_changelog *get_changelog(pkgCache::VerIterator ver,
-			     pkgAcquireStatus *status);
+			     pkgAcquireStatus *status,
+			     int PulseInterval=500000);
 
 #endif

Modified: branches/aptitude-0.3/aptitude/src/view_changelog.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/view_changelog.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/view_changelog.cc	Sun Jul  3 22:24:57 2005
@@ -26,7 +26,9 @@
 #include "download_manager.h"
 #include "ui.h"
 
+#include <generic/apt.h>
 #include <generic/pkg_changelog.h>
+#include <generic/config_signal.h>
 
 #include <sigc++/functors/mem_fun.h>
 
@@ -68,7 +70,8 @@
 						 "",
 						 _("Download Changelog"),
 						 NULL);
-  pkg_changelog *cl=get_changelog(ver, widget);
+  pkg_changelog *cl=get_changelog(ver, widget,
+				  aptcfg->FindI(PACKAGE "::UI::Download-Poll-Interval", 100000));
   widget->Complete();
   if(cl)
     {




More information about the Aptitude-svn-commit mailing list