summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* zh_TW.po: remove several fuzzy tags after reviewZhou Mo2016-04-301-8/+6
|
* deb822: Restore support for <multivalue>-{Add,Remove}James McCoy2016-04-282-2/+12
| | | | | | Redesign of multivalue options in 463c8d801595ce5ac94d7c032264820be7434232 caused the parser to look for <multivalue>{Add,Remove} (no hyphen) instead of the expected <multivalue>-{Add,Remove}.
* factor out Pkg/DepIterator prettyprinters into own headerDavid Kalnischkies2016-04-289-40/+141
| | | | | | | | | The old prettyprinters have only access to the struct they pretty print, which isn't enough usually as we want to know for a package also a bit of state information like which version is the candidate. We therefore need to pull the DepCache into context and hence use a temporary struct which is printed instead of the iterator itself.
* deprecate confusing Pkg.CandVersion() methodDavid Kalnischkies2016-04-282-2/+2
| | | | | | | This method does not return the 'current' candidate of the DepCache which would be most expected, but instead returns the version which would be candidate in a default-only policy setting – aka ignoring apt_preferences settings and co.
* respect user pinning in M-A:same version (un)screwingDavid Kalnischkies2016-04-282-2/+34
| | | | | | | | | | | | Using Pkg.CandVersion() here is wrong as its implementation will return a candidate based just on the default policy settings ignoring user preferences and otherwise set candidates (aka: it sidesteps the pkgDepCache). This causes M-A:same libraries to be detected as screwed even through they aren't, so that they end up being kept back. Reported-By: Felipe Sateler on IRC
* FileFd: avoid further writing if file failedDavid Kalnischkies2016-04-281-9/+13
| | | | | | | | If the file is in a failed state there is no point in trying to flush out the buffers as the file is to be discarded anyhow & its likely all this flushing is producing is additional error messages. Git-Dch: Ignore
* Merge branch 'fix-https-noproxy' of github.com:patcable/aptJulian Andres Klode2016-04-271-6/+6
|\
| * refactored no_proxy code to work regardless of where https proxy is setPatrick Cable2016-04-271-6/+6
|/ | | | | | | | when using the https transport mechanism, $no_proxy is ignored if apt is getting it's proxy information from $https_proxy (as opposed to Acquire::https::Proxy somewhere in apt config). if the source of proxy information is Acquire::https::Proxy set in apt.conf (or apt.conf.d), then $no_proxy is honored.
* private-show: Get rid of old policy support codeJulian Andres Klode2016-04-251-35/+2
| | | | | This does not make much sense anymore, now that we dropped the old candidate ver algorithm.
* policy: Remove TODO for replacing old GetCandidateVer()Julian Andres Klode2016-04-251-1/+0
| | | | Gbp-Dch: ignore
* policy: Get rid of old (pre-1.1) GetCandidateVer algorithmJulian Andres Klode2016-04-252-98/+0
| | | | | Bye bye old friend. You're in one Ubuntu LTS release for compat testing, now we do not need you anymore.
* restore pinning to min/max value of shortDavid Kalnischkies2016-04-252-3/+23
| | | | | | | | Broken in the previous commit (69cea1ef2cfda3c4da79fd756a8edaf2be26998e). Adding a test and a comment to avoid future embarrassment. Git-Dch: Ignore Reported-By: Julian Andres Klode on IRC
* give rc-status packages a pin of -1David Kalnischkies2016-04-251-7/+6
| | | | | | | | | | | | It would previously return a pin of 0, which is an invalid value, but the intend is that versions which are only in the dpkg/status file can't be selected for installation (= can't be a candidate) which is what a negative pin assures. This helps with the communication to EDSP solvers as they neither know about the rc-state (yet) nor that they shouldn't choose this version. Ideally they shouldn't be told about such versions at all as there is nothing to be solved here, but we will get there eventually.
* edsp: ask policy engine for the pin of the version directlyDavid Kalnischkies2016-04-251-5/+1
|
* use the same redirection mirror for all index filesDavid Kalnischkies2016-04-253-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redirection services like httpredir.debian.org tend to use a set of mirrors from which they pick a mirror at "random" for each requested file, which is usually benefitial for the download of debs, but for the index files this can quickly cause problems (aka hashsum mismatches) if the two (or more) mirrors involved are only slightly out-of-sync. This commit "resolves" this issue by using the mirror we ended up using to get the (signed) Release file directly to get the index files belonging to this Release file instead of asking the redirection service which eliminates the risk of hitting out-of-sync mirrors. As an obvious downside the redirection service can't serve partial mirrors anymore for indexes and the download of indexes indexed in the same Release file can't be done in parallel (from different mirrors). This does not effect the download of non-index files like deb-files as out-of-sync mirrors aren't a huge problem there, so the parallel download outweights a potentially 404 error (also because this causes no errenous downloads while hashsum mismatches download the entire file before finding out that it was pointless). The rational for this is that indexes are relative to the Release file. If we would be talking about a HTML page including images, such a behaviour is obvious and intended – not doing it means in the best case a bunch of "useless" requests which will all be answered with a redirect.
* show more details for "Writing more data" errors, tooDavid Kalnischkies2016-04-254-30/+68
| | | | | | They are the small brothers of the hashsum mismatch, so they deserve a similar treatment even through we have for architectual reasons not a much to display as for hashsum mismatches for now.
* show more details for "Hash Sum mismatch" errorsDavid Kalnischkies2016-04-258-28/+259
| | | | | | | | | | | | | | | | Users tend to report these errors with just this error message… not very actionable and hard to figure out if this is a temporary or 'permanent' mirror-sync issue or even the occasional apt bug. Showing the involved hashsums and modification times should help in triaging these kind of bugs – and eventually we will have less of them via by-hash. The subheaders aren't marked for translation for now as they are technical glibberish and probably easier to deal with if not translated. After all, our iconic "Hash Sum mismatch" is translated at least. These additions were proposed in #817240 by Peter Palfrader.
* format multiline errors properly in acquire progressDavid Kalnischkies2016-04-251-5/+21
| | | | | | | | | | | Together with the GlobalError change this allows us to add errors spanning multiple lines, just that we control GlobalError while the acquire progress is dealt with potentially by individual clients which might or might not need to be adapted. This isn't critical through as it either just works as expected anyhow or is a minor styling thing (after all, all this commit does it add two spaces to indent the lines a bit…).
* drop empty line from fetch errorDavid Kalnischkies2016-04-2549-368/+152
| | | | | | | | This is a duplicate of sorts of 0efb29eb36184bbe6de7b1013d1898796d94b171 which is the a lot more frequent case of this error – and also a duplicate of this error message, just without the \n at the end. Git-Dch: Ignore
* properly format multiline error messagesDavid Kalnischkies2016-04-252-6/+55
|
* sanify unused ReportMirrorFailure a tiny bitDavid Kalnischkies2016-04-252-63/+69
| | | | | | | | | | Calling the (non-existent) reporter multiple times for the same error with different codes for the same error (e.g. hashsum) is a bit strange. It also doesn't need to be a public API. Ideally that would all look and behave slightly different, but we will worry about that at the time this is actually (planed to be) used somewhere… Git-Dch: Ignore
* don't ask server if we have entire file in partial/David Kalnischkies2016-04-254-31/+81
| | | | | | | | | | | | We have this situation in cases were parts of the transaction are refused (e.g. in a hashsum mismatch) and rerun the update (e.g. in the hope that we get a mirror which is synced this time). Previously we would ask the server with an if-range and in the best case recieve a 416 in response (less featureful server might end up giving us the entire file again or we get the wrong file this time giving us a hashsum mismatch…), which is a waste of time if we know already by checking the hashsums that we got the complete and correct file.
* add dep11 files to default Release patternsDavid Kalnischkies2016-04-251-0/+4
|
* make random acquire queues work less randomDavid Kalnischkies2016-04-252-10/+26
| | | | | | | | | | | | | | Queues feeding workers like rred are created in a random pattern to get a few of them to run in parallel – but if we already have an idling queue we don't need to assign it to a (potentially new) random queue as that saves us the (agruably small) overhead of starting up a new queue, avoids adding jobs to an already busy queue while others idle and as a bonus reduces the size of debug logs a bit. We also keep starting new queues now until we reach our limit before we assign work at random to them, which should give us a more effective utilisation overall compared to potentially adding work to busy queues while we haven't reached our queue limit yet.
* Release 1.2.111.2.11Julian Andres Klode2016-04-2557-77/+99
|
* ensure outdated files are dropped without lists-cleanupDavid Kalnischkies2016-04-142-3/+69
| | | | | Tested via (newly) empty index files, but effects also files dropped from the repository or an otherwise changed repository config.
* silently skip acquire of empty index filesDavid Kalnischkies2016-04-148-47/+41
| | | | | There is just no point in taking the time to acquire empty files – especially as it will be tiny non-empty compressed files usually.
* allow uncompressed files to be empty in store againDavid Kalnischkies2016-04-142-1/+26
| | | | | | | With the previous fix for file applied we can again hit repositories which contain uncompressed empty files, which since the introduction of the central store: method wasn't accounted for anymore as we forbid empty compressed files.
* fix Alt-Filename handling of file methodDavid Kalnischkies2016-04-143-7/+8
| | | | | | | | | | A silly of-by-one error in the stripping of the extension to check for the uncompressed filename broken in an attempt to support all compressions in commit a09f6eb8fc67cd2d836019f448f18580396185e5. Fixing this highlights also mistakes in the handling of the Alt-Filename in libapt which would cause apt to remove the file from the repository (if root has the needed rights – aka the disk isn't readonly or similar)
* recheck Pre-Depends satisfaction in SmartConfigureDavid Kalnischkies2016-04-131-2/+2
| | | | | | | | | | | | | | | | | Regression introduced in commit 590f1923121815b36ef889033c1c416a23cbe9a2 (2011!) causing apt to not check if Pre-Depends are satisfied before calling --configure. This managed to hide so perfectly well for years as Pre-Depends aren't that common, apt prefers upgrading these packages first and checks for satisfaction is already in SmartUnpack, so there is only a small window of oppertunity to break a pre-dependency relation (usually with an unpack). Verified by logchecking with two provided status files in the buglog. I would have liked to write a test, but I wasn't able to reach the needed complexity to get apt to fail – but the change is small and reasonable, so what could possible go wrong™, right? LP: #1569099
* detect compressed status files on extension againDavid Kalnischkies2016-04-131-1/+1
| | | | | | | | | | It handy to be able to point apt at reading a compressed dpkg/status file in debugging cases, which worked pre-1.1 but somewhere down the line in the massive refactoring. Restoring this behavior in a central place for all realfile index files instead of just for the status file. (This has no effect on index files acquired from an archive – those are handled by different classes and support compressed files just fine)
* Hungarian program translation updateKelemen Gábor2016-04-131-195/+251
| | | | Closes: 820638
* do not require non-broken systems in 'upgrade'David Kalnischkies2016-04-131-8/+0
| | | | | | | | | There is a good chance that the attempt will fail, but if a user mentions certain packages explicitly on the commandline there is a chance that this will consist of a broken system which is resolved by upgrading more packages then just the mentioned. This limitation was not effecting external resolvers.
* webserver: 416 errors aren't closing connectionsDavid Kalnischkies2016-04-131-1/+1
| | | | | | | | Breaking here lets our handler die which a client will fix by reconnecting… but that eats time needlessly and is simple the wrong handling, too. Git-Dch: Ignore
* stop handling items in doomed transactionsDavid Kalnischkies2016-04-073-53/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous commit we track the state of transactions, so we can now use our knowledge to avoid processing data for a transaction which was already closed (via an abort in this case). This is needed as multiple independent processes are interacting in the process, so there isn't a simple immediate full-engine stop and it would also be bad to teach each and every item how to check if its manager has failed subordinate and what to do in that case. In the pdiff case, which deals (potentially) with many items during its lifetime e.g. a hashsum mismatch in another file can abort the transaction the file we try to patch via pdiff belongs to. This causes some of the items (which are already done) to be aborted with it, but items still in the process of acquisition continue in the processing and will later try to use all the items together failing in strange ways as cleanup already happened. The chosen solution is to dry up the communication channels instead by ignoring new requests for data acquisition, canceling requests which are not assigned to a queue and not calling Done/Failed on items anymore. This means that e.g. already started or pending (e.g. pipelined) downloads aren't stopped and continue as normal for now, but they remain in partial/ and aren't processed further so the next update command will pick them up and put them to good use while the current process fails updating (for this transaction group) in an orderly fashion. Closes: 817240 Thanks: Barr Detwix & Vincent Lefevre for log files
* ensure transaction states are changed only onceDavid Kalnischkies2016-04-072-11/+32
| | | | | | | | | | | | | | We want to keep track of the state of a transaction overall to base future decisions on it, but as a pre-requirement we have to make sure that a transaction isn't commited twice (which happened if the download of InRelease failed and Release takes over). It also happened to create empty commits after a transaction was already aborted in cases in which the Release files were rejected. This isn't effecting security at the moment, but to ensure this isn't happening again and can never be bad a bunch of fatal error messages are added to make regressions on this front visible.
* releasing package apt version 1.2.101.2.10Michael Vogt2016-04-0514-14/+35
|
* Fix `OnCalendar=*-*-* 6,18:00` instead of `OnCalendar=*-*-* 6:00,18:00`Michael Vogt2016-04-041-1/+1
| | | | | | | | See https://github.com/systemd/systemd/issues/2956 - it appears that `OnCalendar=*-*-* 6,18:00` and `OnCalendar=*-*-* 6:00,18:00` are quite different. Git-Dch: ignore
* Japanese program translation updateTakuma Yamada2016-04-041-122/+171
| | | | Closes: 819938
* don't leak on error in listparser creationDavid Kalnischkies2016-04-032-8/+32
| | | | | Git-Dch: Ignore Reported-By: gcc -fsanitize=address
* use buffered writing for InRelease splittingDavid Kalnischkies2016-04-031-1/+1
| | | | | | Hardly noticeable, but given that we have the option to easily enable it, lets enable it as every newline in the message is written individually by the code.
* consistently add APT_OVERRIDE as method markerDavid Kalnischkies2016-04-031-70/+70
| | | | | | | | Some methods had it missing, some used the keyword directly, which isn't a problem as it is a cc file, but for consistency lets stick to our macro for now. Git-Dch: Ignore
* Use systemd.timer instead of a cron jobMichael Vogt2016-04-019-39/+66
| | | | | | | | | | | | | | | | | | | | | | The rational is that we need to spread the load on the mirrors that apt update and unattended-upgrades cause. To do so, we leverage the RandomizeDelay feature of systemd. The other advantage is that the timer is not run at a fixed daily.daily time but instead every 24h. This also fixes the problem that the randomized deplay in the current apt.cron.daily causes other cron jobs to be deplayed. A compatibility cron job is also provided for systems that do not use systemd. Note that the time is fired two times a day, but the logic inside of apt.systemd.daily will ensure (via stamp files) that the servers are hit at most every 24h. Firing two times a day helps with the worst case update time and it also helps with systems that are not always on. LP: #246381, #727685 Closes: #600262, #709675, #663290
* Allow lowering trust level of a hash via configJulian Andres Klode2016-03-283-17/+26
| | | | | | Introduces APT::Hashes::<NAME> with entries Untrusted and Weak which can be set to true to cause the hash to be treated as untrusted and/or weak.
* test-apt-update-reporting: Make more use of frameworkJulian Andres Klode2016-03-271-12/+16
| | | | | | | Use msgtest and testsuccess with a function instead of failing with a simple exit 1. This looks nicer. Gbp-Dch: ignore
* test-acquire-same-file-multiple-times: Delete files before retryingJulian Andres Klode2016-03-271-0/+1
| | | | | | This gets rid of byte-range requests and 416 responses. Gbp-Dch: ignore
* test-apt-download-progress: Use a larger file for testingJulian Andres Klode2016-03-271-3/+3
| | | | | | | This should make the test less flaky, as with a small file, we might have already received all the data before trying to apply rate limits which is a constant source of failure on the i386 Ubuntu autopkgtest.
* zh_CN.po: update simplified Chinese translation. (100%)Zhou Mo2016-03-271-4/+4
|
* Release 1.2.91.2.9Julian Andres Klode2016-03-2713-13/+25
|
* Do not mark packages for keep that we want to removeJulian Andres Klode2016-03-272-2/+44
| | | | | | | | | | | | | | | | | | | | | | If the package is marked for removal, keep it marked for removal and do not mark it for keep. If we mark it for keep, we some how later get to a different stage where it is marked for unpack instead of removal. In the example in the bug report, we would get a: SmartUnPack maas-region-controller-min:amd64 (replace version 2.0.0~alpha3+bzr4810-0ubuntu1 with Segmentation fault maas-region-controller-min:amd64 was marked for removal, but we changed it to keep and somehow it thinks that this is to be replaced now instead of removed (probably because the InstallVer != CandidateVer [with InstallVer = 0]). This fixes a regression introduced in release 1.2.7, commit: 0390edd5452b081f8efcf412f96d535a1d959457 Reported-by: LaMont Jones on IRC LP: #1562402