summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
Commit message (Collapse)AuthorAgeFilesLines
* tell download methods the expected hashesDavid Kalnischkies2014-05-091-0/+3
| | | | | | Now that we have all hashes in the acquire system, pass the info down to the methods, so that it can use it in the request and/or to precheck the response.
* use HashStringList in the acquire systemDavid Kalnischkies2014-05-091-16/+21
| | | | | | | | | | | | | It is not very extensible to have the supported Hashes hardcoded everywhere and especially if it is part of virtual method names. It is also possible that a method does not support the 'best' hash (yet), so we might end up not being able to verify a file even though we have a common subset of supported hashes. And those are just two of the cases in which it is handy to have a more dynamic selection. The downside is that this is a MAJOR API break, but the HashStringList has a string constructor for compatibility, so with a bit of luck the few frontends playing with the acquire system directly are okay.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+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)
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* allow http protocol to switch to httpsDavid Kalnischkies2014-02-141-1/+6
| | | | | | | | | switch protocols at random is a bad idea if e.g. http can switch to file, so we limit the possibilities to http to http and http to https. As very few people (less than 1% according to popcon) have https installed this likely changes nothing in terms of failure. The commit is adding a friendly hint which package needs to be installed though.
* properly handle if-modfied-since with libcurl/https Michael Vogt2013-05-081-3/+10
| | | | (closes: #705648)
* * apt-pkg/acquire*.cc:Raphael Geissert2012-05-141-0/+15
| | | | | | | - handle redirections in the worker with the right method instead of in the method the redirection occured in (Closes: #668111) * methods/http.cc: - forbid redirects to change protocol
* * apt-pkg/acquire-worker.cc:YOSHINO Yoshihito2012-05-071-3/+10
| | | | | | - revert the use of FileFd::Write in OutFdReady as we don't want error reports about EAGAIN here as we retry later. Thanks to YOSHINO Yoshihito for the report. (Closes: #671721)
* * apt-pkg/acquire-worker.cc:David Kalnischkies2012-04-221-30/+9
| | | - use Dump() to generate the configuration message for sending
* use a static FileFd::Write overload to reduce duplication of write()-retry codeDavid Kalnischkies2012-04-111-24/+3
|
* * apt-pkg/acquire-worker.cc:David Kalnischkies2012-03-201-1/+17
| | | | | | | | | | | - check return of write() as gcc recommends * apt-pkg/acquire.cc: - check return of write() as gcc recommends * apt-pkg/cdrom.cc: - check return of chdir() and link() as gcc recommends * apt-pkg/clean.cc: - check return of chdir() as gcc recommends * apt-pkg/contrib/netrc.cc: - check return of asprintf() as gcc recommends
* Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-4/+4
| | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-3/+5
|
* * apt-pkg/acquire*.{cc,h}:David Kalnischkies2011-07-051-2/+2
| | | | - try even harder to support really big files in the fetcher by converting (hopefully) everything to 'long long' (Closes: #632271)
* * apt-pkg/acquire-worker.cc:David Kalnischkies2011-04-261-6/+5
| | | - print filename in the unmatching size warning (Closes: #623137)
* * mirror method:Michael Vogt2011-03-141-0/+11
| | | - when downloading data, show the mirror being used
* * apt-pkg/acquire-worker.cc:Michael Vogt2009-07-021-5/+2
| | | | | | | | - show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144)
* [ABI break] merge support for http redirects, thanks toMichael Vogt2009-01-301-0/+14
| | | Jeff Licquia and Anthony Towns
* * apt-pkg/acquire-worker.cc, methods/connect.cc:Michael Vogt2008-01-071-0/+1
| | | | - consider a ResolveError a transient-network problem
* * apt-pkg/acquire-worker.cc:Michael Vogt2007-08-081-1/+3
| | | | | | - only pass a hash if we actually got one from the method * methods/copy.cc: - take hashes here too (*sigh*)
* * apt-pkg/acquire-item.{cc,h}:Michael Vogt2007-07-301-1/+16
| | | | | | | | | | | | | | | | | | | | | | | - rename "hash" into ExpectedHash in pkgAcqFile, pkgAcqIndex - add missing HashSum() call to class pkgAcqIndex - use the data provided by acquire-method (and send via the {SHA256,SHA1,MD5Sum}-Hash tag when comparing the hash, this avoids calculating the hash twice (just like old libapt) * apt-pkg/acquire-method.cc: - send MD5Sum-Hash tag to libapt to be consistant with HashString::SupportedHashes() * apt-pkg/acquire-worker.cc: - check with "Owner->HashSum().HashType()" what hash the frontend is expecting and pass it to pkgAcquireItem::Done() in the new HashString format - add some debugging output * apt-pkg/contrib/hashes.cc: - fix off-by-one error when constructing a HashString from a single input string * apt-pkg/contrib/hashes.h: - add "HashType()" method * apt-pkg/init.h, apt-pkg/makefile, methods/makefile: - break ABI
* * merged the remaining bits from the apt--no-pragma branchMichael Vogt2007-06-091-3/+0
|\
| * * remove all the remaining #pragma implementationMichael Vogt2007-06-081-3/+0
| |
* | * more work for the DefaultAptSources specMichael Vogt2006-02-211-0/+7
|/ | | | | | | | | | | | | | apt-pkg/acquire-item.h: - add new pkgAcquire::Item::StatTransientNetworkError status apt-pkg/acquire-item.cc: - if we get a StatTransientNetworkError use old sigfile and indexfiles apt-pkg/acquire-worker.cc: - set StatTransientNetworkError on "Timeout", "TmpResolveFailure", "ConnectionRefused" cmdline/apt-get.cc: - handle a StatTransientNetworkError different than a normal error (warning instead of error)
* * include a human readable string for the MediaChange status-fd message as wellMichael Vogt2005-08-311-2/+7
|
* * meda-change message is send over status-fd nowMichael Vogt2005-08-311-0/+14
|
* G++3 fixes from RandolphArch Librarian2004-09-201-3/+7
| | | | | | Author: jgg Date: 2001-05-22 04:42:54 GMT G++3 fixes from Randolph
* More snprintf stuffArch Librarian2004-09-201-5/+3
| | | | | | Author: jgg Date: 2001-03-23 01:47:14 GMT More snprintf stuff
* Join with aliencodeArch Librarian2004-09-201-7/+9
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* Typo in Algorithms.cc. Closes: #63577Arch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 2000-05-10 05:56:23 GMT Typo in Algorithms.cc. Closes: #63577
* Bug fixes, new major versionArch Librarian2004-09-201-2/+15
| | | | | | Author: jgg Date: 2000-01-27 04:15:09 GMT Bug fixes, new major version
* More CD fixesArch Librarian2004-09-201-6/+10
| | | | | | Author: jgg Date: 2000-01-17 07:11:49 GMT More CD fixes
* CDROMs are unmountedArch Librarian2004-09-201-2/+6
| | | | | | Author: jgg Date: 1999-10-18 00:37:35 GMT CDROMs are unmounted
* Fixed sign conversionArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-08-28 01:49:07 GMT Fixed sign conversion
* Random fixes..Arch Librarian2004-09-201-4/+3
| | | | | | Author: jgg Date: 1999-08-03 05:19:41 GMT Random fixes..
* Small segv bug fixArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-08-03 02:25:38 GMT Small segv bug fix
* Fixed up dpkginit and acquire stuff..Arch Librarian2004-09-201-5/+19
| | | | | | Author: jgg Date: 1999-07-30 05:36:52 GMT Fixed up dpkginit and acquire stuff..
* Minor cleanups, fix for checksum lowercase bugArch Librarian2004-09-201-6/+3
| | | | | | Author: jgg Date: 1999-07-26 17:46:07 GMT Minor cleanups, fix for checksum lowercase bug
* Fixed the cps resume problemArch Librarian2004-09-201-2/+3
| | | | | | Author: jgg Date: 1999-05-23 06:47:43 GMT Fixed the cps resume problem
* Working apt-get source build stuffArch Librarian2004-09-201-18/+2
| | | | | | Author: jgg Date: 1999-04-20 05:02:09 GMT Working apt-get source build stuff
* Signal safetyArch Librarian2004-09-201-2/+21
| | | | | | Author: jgg Date: 1999-03-16 00:43:55 GMT Signal safety
* Retry supportArch Librarian2004-09-201-4/+4
| | | | | | Author: jgg Date: 1999-01-30 08:08:54 GMT Retry support
* Moved strutl.hArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-01-27 02:48:52 GMT Moved strutl.h
* Hide hit for local urisArch Librarian2004-09-201-2/+7
| | | | | | Author: jgg Date: 1999-01-20 05:11:25 GMT Hide hit for local uris
* Havocs _exitArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1998-12-14 06:54:41 GMT Havocs _exit
* Fixed cdrom method problemsArch Librarian2004-09-201-2/+3
| | | | | | Author: jgg Date: 1998-12-05 01:45:19 GMT Fixed cdrom method problems
* CDROM supportArch Librarian2004-09-201-3/+34
| | | | | | Author: jgg Date: 1998-12-04 21:16:46 GMT CDROM support
* Minor Acquire cleanupArch Librarian2004-09-201-3/+2
| | | | | | Author: jgg Date: 1998-11-29 01:24:14 GMT Minor Acquire cleanup
* Local file fixesArch Librarian2004-09-201-1/+2
| | | | | | Author: jgg Date: 1998-11-14 01:39:41 GMT Local file fixes
* More or less working acquire systemArch Librarian2004-09-201-2/+53
| | | | | | Author: jgg Date: 1998-11-09 01:09:19 GMT More or less working acquire system