Hello community, here is the log from the commit of package aria2 for openSUSE:Factory checked in at Sat Mar 7 11:41:32 CET 2009. -------- --- aria2/aria2.changes 2009-02-16 19:47:57.000000000 +0100 +++ /mounts/work_src_done/STABLE/aria2/aria2.changes 2009-03-06 16:56:48.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Mar 6 16:56:02 CET 2009 - poeml@suse.de + +- add patch for failing download when the adaptive URI selector is + used (https://sourceforge.net/support/tracker.php?aid=2666026) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- adaptiveuriselector.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aria2.spec ++++++ --- /var/tmp/diff_new_pack.M16168/_old 2009-03-07 11:41:21.000000000 +0100 +++ /var/tmp/diff_new_pack.M16168/_new 2009-03-07 11:41:21.000000000 +0100 @@ -30,7 +30,7 @@ Name: aria2 Version: 1.2.0 -Release: 1 +Release: 2 #define pkg_version %{version} %define pkg_version 1.2.0 Summary: Metalink client for the command line. @@ -39,6 +39,7 @@ Patch2: aria2-cares-lib64.patch Patch3: aria2-no-uint64.patch Patch4: aria2-atoi.patch +Patch5: adaptiveuriselector.patch Url: http://aria2.sourceforge.net/ Group: Productivity/Networking/Other License: GPL v2 only @@ -111,6 +112,7 @@ %endif %endif %patch4 +%patch5 %build export CFLAGS="%{optflags} -fPIC" @@ -152,6 +154,9 @@ %doc %{_mandir}/man1/aria2c.1* %changelog +* Fri Mar 06 2009 poeml@suse.de +- add patch for failing download when the adaptive URI selector is + used (https://sourceforge.net/support/tracker.php?aid=2666026) * Mon Feb 16 2009 poeml@suse.de - update to 1.2.0 release The list of changes is mainly as given below, plus bugfixes. ++++++ adaptiveuriselector.patch ++++++ Index: src/AdaptiveURISelector.cc =================================================================== --- src/AdaptiveURISelector.cc (revision 1084) +++ src/AdaptiveURISelector.cc (working copy) @@ -151,35 +151,45 @@ } else { /* Here we return a mirror which need to be tested again */ std::string toReTest = getFirstToTestUri(uris); - _logger->debug("AdaptiveURISelector: choosing mirror %s which has not" - " been tested recently for connection #%d", - toReTest.c_str(), _nbConnections); - return toReTest; + if(toReTest != A2STR::NIL) { + _logger->debug("AdaptiveURISelector: choosing mirror %s which has not" + " been tested recently for connection #%d", + toReTest.c_str(), _nbConnections); + return toReTest; + } else { + return getBestMirror(uris); + } } } else { - /* Here we return one of the bests mirrors */ - unsigned int max = getMaxDownloadSpeed(uris); - unsigned int min = max-(int)(max*0.25); - std::deque<std::string> bests = getUrisBySpeed(uris, min); - - if (bests.size() < 2) { - std::string uri = getMaxDownloadSpeedUri(uris); - _logger->debug("AdaptiveURISelector: choosing the best mirror :" - " %.2fKB/s %s (other mirrors are at least 25%% slower)", - (float) max/1024, uri.c_str()); - return uri; - } else { - std::string uri = selectRandomUri(bests); - _logger->debug("AdaptiveURISelector: choosing randomly one of the best" - " mirrors (range [%.2fKB/s, %.2fKB/s]): %s", - (float) min/1024, (float) max/1024, uri.c_str()); - return uri; - } + return getBestMirror(uris); } } } +std::string AdaptiveURISelector::getBestMirror +(const std::deque<std::string>& uris) const +{ + /* Here we return one of the bests mirrors */ + unsigned int max = getMaxDownloadSpeed(uris); + unsigned int min = max-(int)(max*0.25); + std::deque<std::string> bests = getUrisBySpeed(uris, min); + + if (bests.size() < 2) { + std::string uri = getMaxDownloadSpeedUri(uris); + _logger->debug("AdaptiveURISelector: choosing the best mirror :" + " %.2fKB/s %s (other mirrors are at least 25%% slower)", + (float) max/1024, uri.c_str()); + return uri; + } else { + std::string uri = selectRandomUri(bests); + _logger->debug("AdaptiveURISelector: choosing randomly one of the best" + " mirrors (range [%.2fKB/s, %.2fKB/s]): %s", + (float) min/1024, (float) max/1024, uri.c_str()); + return uri; + } +} + void AdaptiveURISelector::resetCounters() { const Option* op = _requestGroup->getOption(); Index: src/AdaptiveURISelector.h =================================================================== --- src/AdaptiveURISelector.h (revision 1084) +++ src/AdaptiveURISelector.h (working copy) @@ -70,6 +70,7 @@ std::string getFirstToTestUri(const std::deque<std::string>& uris) const; SharedHandle<ServerStat> getServerStats(const std::string& uri) const; unsigned int getNbTestedServers(const std::deque<std::string>& uris) const; + std::string getBestMirror(const std::deque<std::string>& uris) const; public: AdaptiveURISelector(const SharedHandle<ServerStatMan>& serverStatMan, const SharedHandle<RequestGroup>& requestGroup); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org