summaryrefslogtreecommitdiff
path: root/apt-pkg/update.cc
Commit message (Collapse)AuthorAgeFilesLines
* Implement update --error-on=anyJulian Andres Klode2021-01-081-2/+19
| | | | | | | | | | | People have been asking for a feature to error out on transient network errors for a while, this gives them one while keeping the door open for other modes we need, such as --error-on=no-success which we need to determine when to retry the daily update job. Closes: #594813 (and a whole bunch of duplicates...)
* Keep URIs encoded in the acquire systemDavid Kalnischkies2020-12-181-0/+2
| | | | | | | | | | | | | | | | | | | We do not deal a lot with URIs which need encoding, but then we do it is a pain that we store it decoded in the acquire system as it means we have to decode and reencode URIs eventually which is potentially giving us slightly different URIs. We see that in our own testing framework while setting up redirects as the config options are effectively double-encoded and decoded to pass them around successfully as otherwise %2f and / in an URI are treated the same. This commit adds the infrastructure for methods to opt into getting URIs send in encoded form (and returning them to us in encoded form, too) so that we eventually do not have to touch the URIs which is how it should be. This means though that we have to deal with methods who do not support this yet (aka: all at the moment) for which we decode and encode while communicating with them.
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-1/+1
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* run update post-invokes even on (partial) failuresDavid Kalnischkies2016-06-221-19/+25
| | | | | | | Unsecure repositories result in error messages by default which causes the acquire run to fail hard, but non-failing repositories are still updated just like in the slightly less hard-failures which got this behaviour in 35664152e47a1d4d712fd52e0f0a2dc8ed359d32.
* update: Run Post-Invoke-Success if not all sources failedJulian Andres Klode2016-05-101-5/+10
| | | | | | | | | | | | | | | | Failures can happen and APT regardless will do a partial cache update anyway. Because APT ensures that the list directory is in a sane state, it makes sense to also call success hooks if success was only partial - otherwise it loses sync with APT. Most importantly, this causes the appstream cache to be empty, see launchpad bug #1562733. This is somewhat overly optimistic though: As soon as any repository has nonexisting optional files, the missing optional files are also treated as success, which means a single broken repository without an InRelease file still runs Success hooks, even though it really should not.
* Report non-transient errors as errors, not as warningsJulian Andres Klode2016-03-161-3/+7
| | | | | This makes it easier to understand what really is an error and what not.
* Fix all the wrong removals of includes that iwyu got wrongMichael Vogt2015-08-171-0/+1
| | | | Git-Dch: ignore
* Cleanup includes after running iwyuMichael Vogt2015-08-171-2/+0
|
* drop extra newline in 'Failed to fetch' and 'GPG error' messageDavid Kalnischkies2015-08-101-1/+1
| | | | | | I never understood why there is an extra newline in those messages, so now is as good time as any to drop them. Lets see if someone complains with a good reason to keep it…
* ensure partial dirs are 0700 and owned by _apt:rootDavid Kalnischkies2014-10-071-2/+2
| | | | | | | | | Reworks the API involved in creating and setting up the fetcher to be a bit more pleasent to look at and work with as e.g. an empty string for no lock isn't very nice. With the lock we can also stop creating all our partial directories "just in case". This way we can also be a bit more aggressive with the partial directory itself as with a lock, we know we will gone need it.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-15/+8
| | | | | | | | 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)
* Move ListUpdate/AquireUpdate into update.{cc,h}Michael Vogt2013-10-051-0/+126
This moves the ListUpdate/AquireUpdate out of the "catch-all" algorithm.{cc,h} file into its own update.{cc,h}