summaryrefslogtreecommitdiff
path: root/methods/mirror.cc
Commit message (Collapse)AuthorAgeFilesLines
* ignore lost+found in private directory cleanupDavid Kalnischkies2015-11-191-0/+1
| | | | | | | | | | In ce1f3a2c we started warning about failing unlinking, which we consistently do for directories. That isn't a problem as directories usually aren't in the places we do want to clean up – with the potential exeception of "lost+found", so lets ignore it like we ignore our own partial/ subdirectory. Closes: 805424
* wrap every unlink call to check for != /dev/nullDavid Kalnischkies2015-11-041-1/+1
| | | | | | | | | | | | | | | | Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-5/+5
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-131-14/+14
| | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-3/+3
|
* correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-4/+4
| | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
* Fix double free (closes: #711045)Michael Vogt2013-06-061-0/+3
| | | | | | | * Fix double free (closes: #711045) * Fix crash when the "mirror" method does not find any entry (closes: #699303)
* * methods/mirror.cc:Raphael Geissert2012-05-141-1/+1
| | | | - generate an equal sign also for the first arch (Closes: #669142)
* * methods/rred.cc:David Kalnischkies2012-03-201-2/+3
| | | | | | | | | | | - check return of writev() as gcc recommends * methods/mirror.cc: - check return of chdir() as gcc recommends * apt-pkg/deb/dpkgpm.cc: - check return of write() a gcc recommends * apt-inst/deb/debfile.cc: - check return of chdir() as gcc recommends * apt-inst/deb/dpkgdb.cc: - check return of chdir() as gcc recommends
* micro-optimize "(performance) Prefer prefix ++/-- operators for ↵David Kalnischkies2012-03-051-1/+1
| | | | non-primitive types."
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-1/+2
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-4/+20
|\
| * merged from lp:~mvo/apt/mvoMichael Vogt2011-08-151-1/+17
| |\
| | * * methods/mirror.cc:Michael Vogt2011-08-111-1/+17
| | | | | | | | | | | | - include the architecture(s) in the query string as well so that the server can make better decisions
| * | follow the recommendation of cppcheck to make some method methods (scnr)David Kalnischkies2011-08-111-1/+1
| | | | | | | | | | | | const and initial mostly Debug member values in the constructors
| * | cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-2/+2
| |/ | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* / reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-1/+3
|/
* append the dist (e.g. sid, wheezy) as a query string whenMichael Vogt2011-06-071-0/+5
| | | asking for a suitable mirror
* * methods/mirror.cc:Michael Vogt2011-06-071-2/+12
| | | | - ignore lines starting with "#" in the mirror file - ignore non http urls in the mirrors
* methods/mirror.cc: raise error if the mirror file can not be readMichael Vogt2011-03-241-0/+7
|
* do not crash if the mirror file fails to downloadMichael Vogt2011-03-241-2/+5
|
* merge fix from Matt Zimmerman, many thanks (LP: #741098)Michael Vogt2011-03-241-1/+3
|
* methods/mirror.cc: randomize only based on hostnameMichael Vogt2011-03-141-4/+15
|
* methods/mirror.cc: init random seed at startupMichael Vogt2011-03-141-1/+3
|
* randomize mirror list to ensure more even loadMichael Vogt2011-03-141-0/+30
|
* * mirror method:Michael Vogt2011-03-141-0/+4
| | | - when downloading data, show the mirror being used
* methods/mirror.cc: improve debug output and fix selecting the next mirrorMichael Vogt2011-03-111-4/+9
|
* fix compiler warning in the new mirror codeDavid Kalnischkies2010-06-091-11/+16
|
* methods/mirror.cc: debug improvementsMichael Vogt2010-06-021-2/+9
|
* implement Fail-Ignore bool in FetchItem that tells the method that a failure ↵Michael Vogt2010-06-021-12/+11
| | | | of this item is ok and does not need to be tried on all mirrors
* methods/mirror.cc: simplify uri.startswith()Michael Vogt2010-06-021-1/+1
|
* methods/mirrors.cc: make cycle through the mirrors work properlyMichael Vogt2010-06-021-15/+40
|
* methods/mirror.cc: remove Acquire::Mirror::RefreshInterval (not really useful)Michael Vogt2010-06-021-22/+0
|
* improve error message if mirror method failsMichael Vogt2010-06-021-6/+8
|
* methods/mirror.cc: on fail try the next mirrorMichael Vogt2010-06-021-1/+11
|
* * apt-pkg/deb/dpkgpm.cc:Michael Vogt2010-06-021-7/+23
| | | | | | | - add missing include * methods/mirror.{cc,h}: - add SelectNextMirror() and InitMirrors() functions - read all mirrors into the AllMirrors vector
* * methods/mirror.cc:Michael Vogt2009-03-191-2/+16
| | | | - when download the mirror file and the server is down, return a propper error message (LP: #278635)
* * methods/mirror.{cc,h}:Michael Vogt2007-11-281-59/+93
|\ | | | | - only update mirror list on IndexFile updates
| * methods/mirror.{cc,h}:Michael Vogt2007-11-281-59/+93
| | | | | | | | | | | | - improve the mirror method so that it only updates the mirror list from the server if we get new indexfiles - code cleanup
* | * merged the apt--mirror branchMichael Vogt2007-02-061-1/+1
|/
* * apt-pkg/acquire-item.cc:Michael Vogt2007-02-061-0/+1
| | | | | | | | | | | | - default to "/usr/lib/apt/apt-report-mirror-failure" * cmdline/apt-report-mirror-failure: - no default comit url for now * debian/rules: - move apt-report-mirror-failure into /usr/lib/apt * doc/examples/configure-index: - more documentation * methods/mirror.cc: - updated TODO
* * apt-pkg/acquire-item.cc:Michael Vogt2007-02-051-3/+6
| | | | | | - use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug)
* * get rid of magic mirrorMichael Vogt2007-02-051-16/+46
|
* * use pkgAcqMethod::FailReason() for consistent error reportingMichael Vogt2007-02-051-9/+3
|
* * commited the latest mirror failure detection codeMichael Vogt2007-02-011-41/+4
|
* make the mirror failures actually produce a error messageMichael Vogt2007-01-241-11/+35
|
* * mirror-failure.py: example mirror failure cgiMichael Vogt2007-01-171-0/+6
| | | | * methods/mirror.cc: prepare for the failure submit
* * basic error reporting from apt in place now (ReportMirrorFailures())Michael Vogt2007-01-171-6/+21
|
* * methods/mirror.cc:Michael Vogt2007-01-081-5/+9
| | | | - updated the TODO