summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* use std::locale::global instead of setlocaleDavid Kalnischkies2016-05-2821-78/+27
| | | | | | We use a wild mixture of C and C++ ways of generating output, so having a consistent world-view in both styles sounds like a good idea and should help in preventing regressions.
* use de-localed std::put_time instead rolling our ownDavid Kalnischkies2016-05-281-9/+5
|
* avoid changing the global LC_TIME for Release writingDavid Kalnischkies2016-05-281-17/+12
| | | | | Using C++ here avoids calling setlocale here which never really was that ideal, but needed to avoid locale specific weekday/month names.
* accept only the expected UTC timezones in date parsingDavid Kalnischkies2016-05-284-24/+107
| | | | | | | | | | | | | | | | | | HTTP/1.1 hardcodes GMT (RFC 7231 §7.1.1.1) and what is good enough for the internet must be good enough for us™ as we reuse the implementation internally to parse (most) dates we encounter in various places like the Release files with their Date and Valid-Until header fields. Implementing a fully timezone aware parser just feels too hard for no effective benefit as it would take 5+ years (= until LTS's are out of fashion) until a repository could use non-UTC dates and expect it to work. Not counting non-apt implementations which might or might not only want to encounter UTC here as well. As a bonus, this eliminates the use of an instance of setlocale in libapt. Closes: 819697
* prevent C++ locale number formatting in text APIsDavid Kalnischkies2016-05-2715-127/+98
| | | | | | | | | | | Setting the C++ locale via std::locale::global(std::locale("")); which would otherwise default to the default C locale (aka: unaffected by setlocale) effects the formatting of numeric types in IO streams, which for output for humans is perfectly sensible, but breaks our many text interfaces used and parsed by us and others without expecting the numbers to be formatted. Closes: #825396
* fix and document on the fly compressor configDavid Kalnischkies2016-05-277-56/+102
| | | | | | | libapt allows to configure compressors to be used by its system via configuration implemented in 03bef78461c6f443187b60799402624326843396, but that was never really documented and also only partly working, which also explains why the tests weren't using it…
* use *.docs files instead of hardcoding in debian/rulesDavid Kalnischkies2016-05-255-15/+17
| | | | Git-Dch: Ignore
* remove semi-support for different build-dirsDavid Kalnischkies2016-05-251-16/+2
| | | | | | | | | | | The debian/rules file tries to guess in which directory it is supposed to be building, but that guess is always ./build – if it wasn't it would fail later as not all rules take alternatives into acount. So, as this is clearly not used lets remove this complexity instead of fixing it up. Git-Dch: Ignore
* override lintian on doxygens embedded-javascript-libraryDavid Kalnischkies2016-05-243-2/+6
| | | | | | | The embedding is done completely automatic by doxygen and documented to be that way for reasons: /usr/share/doc/doxygen/README.jquery As we can't do anything about it, it is pointless to keep the warning.
* use https instead of git for Vcs-GitDavid Kalnischkies2016-05-241-1/+1
| | | | | Reported-By: lintian: vcs-field-uses-insecure-uri Git-Dch: Ignore
* fix two typos in untranslated errors of libapt-pkgDavid Kalnischkies2016-05-242-4/+4
| | | | | Reported-By: lintian: spelling-error-in-binary Git-Dch: Ignore
* fix two typos in apt.conf & apt-cache manpageDavid Kalnischkies2016-05-2412-33/+33
| | | | | Reported-By: lintian: spelling-error-in-manpage Git-Dch: Ignore
* remove duplicated 'the' from guides doc-base abstractDavid Kalnischkies2016-05-241-1/+1
| | | | | Reported-By: lintian: spelling-error-in-doc-base-abstract-field Git-Dch: Ignore
* no-change bump of Standards-Version to 3.9.8David Kalnischkies2016-05-241-1/+1
| | | | We don't have no menu file.
* update symbols fileDavid Kalnischkies2016-05-201-1/+14
|
* don't try to get acquire lock in simulation modeDavid Kalnischkies2016-05-201-0/+2
| | | | | | | | | | | The code moving in eb1f04dda07c2b69549ad9fd793cca0e91841b3e moved the acquire stuff above the simulation exit, so before getting locks (and creating/chmod directories) we should be checking if we should actually really do it… [ignore as bugfix of an unreleased commit] Git-Dch: Ignore
* refactor EDSP code into EDSP and EDSP-like partsDavid Kalnischkies2016-05-202-56/+74
| | | | | | | No real code change, just moving code around heavily to decouple the EDSP specific parts from those we can reuse for EDSP-like protocols. Git-Dch: Ignore
* edsp: use a limited scenario based on bool-arrayDavid Kalnischkies2016-05-203-8/+18
| | | | | | | Its more space and runtime efficient to use a boolean set instead of a CacheSet-based implementation. Git-Dch: Ignore
* edsp: add Forbid-{New-Install,Remove} and Upgrade-AllDavid Kalnischkies2016-05-206-47/+139
| | | | | This allows to differentiate properly between 'apt-get upgrade', 'apt upgrade' and 'apt full-upgrade'.
* avoid triggering gcc's -Wunsafe-loop-optimizations in EDSPDavid Kalnischkies2016-05-201-14/+19
| | | | | | | | | | apt/apt-pkg/edsp.cc: In function ‘bool EDSP::WriteLimitedScenario(pkgDepCache&, FILE*, const PackageSet&, OpProgress*)’: apt/apt-pkg/edsp.cc:245:56: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] std::string dependencies[pkgCache::Dep::Enhances + 1]; ^ Using a std::array to silence gcc as well as as a code improvement feels right here. Git-Dch: Ignore
* edsp: dump: support dumping into compressed fileDavid Kalnischkies2016-05-201-1/+1
|
* edsp: try harder to not generate unneeded error messagesDavid Kalnischkies2016-05-202-84/+90
| | | | | | | | | | | The &= introduced in the EDSP-FileFd conversion isn't working to full satisfaction for multiple && clauses as the && has a higher binding than &= has, so that the methods were called even through they shouldn't have because of previous errors. Using variadic functions we can solve this in a slightly cleaner way bringing down the amount of 'broken pipe' errors for the error case of the dump resolver substantially. Git-Dch: Ignore
* convert EDSP to be based on FileFd instead of FILE*David Kalnischkies2016-05-205-27/+356
| | | | I doubt there is any non-src:apt usage of these interfaces.
* fail instead of segfault on unreadable config filesDavid Kalnischkies2016-05-208-51/+111
| | | | | | | | | | | | | The report mentions "apt list --upgradable", but there are others which have inconsistent behavior ranging from segfaulting to doing something with the partial (and hence incomplete) data. We had a recent report about sources.list (#818628), this one mentions prefences, the obvious next step is conf files… so the testcase is adapted to check for all three in file and directory versions and run a bunch of commands each time which should all have more or less the same behavior in such a case (aka error out). Closes: 824503
* Russian program translation updateYuri Kozlov2016-05-191-113/+159
| | | | Closes: 824702
* document --no- as --show-upgraded is the defaultDavid Kalnischkies2016-05-161-3/+2
| | | | | | | | | | | | | --show-upgraded is the default since 906fbf8886926eeb302332d997c9bd861291e155 so documenting it as if it would be an option having an effect as is feels wrong and we do the same for other options like install-recomends, download, …, too. This commit also removes -u from the documentation, but still supports it in the commandline parsing. Eventually we should deprecate the short option, but for now lets just stop documenting it. Closes: 824456
* show final solution in --no-download --fix-missing modeDavid Kalnischkies2016-05-163-110/+120
| | | | | | | | | | | | | | This commit moves the creation of the fetcher and with it the calculation of the filenames before the code generation the various lists detailing the solution. This means that simulation comes even so slightly closer to a real run as it will require and parse the package indexes for filenames and queuing of URIs, so that a simulation "using" an unavailable download method actually fails now. The real benefit of this change is through that the rather special but nontheless handy --no-download --fix-missing mode now actually shows what the solution is it will apply to the system rather than the solution it would if it could download all not-downloaded packages.
* show globalerrors before asking for confirmationDavid Kalnischkies2016-05-166-27/+41
| | | | | | | | | | | | | | Errors cause a kind of automatic no already, but warnings and notices are only displayed at the end of the apt execution even through they could effect the choice of saying yes/no to questions: E.g. if a configuration (file) was ignored you wanted to have an effect or if an external solver you used generated warnings suggesting that the solution might be valid, but bogus non-the-less and similar things. Note that this only moves those messages up to the question if the answer is interactive – not if e.g. -y is used or no question is asked at all so this has an effect only on interactive usage of apt(-get), not script who might be parsing apt output.
* Normalize Signed-By values by removing trailing commas everywhereJulian Andres Klode2016-05-152-4/+36
| | | | | This fixes comparisons where either the stored or the input string have a trailing comma.
* Add conflicting Signed-By values to error messageJulian Andres Klode2016-05-151-1/+1
| | | | This hopefully makes debugging things easier.
* apt.systemd.daily: Put opening brace of check_power on extra lineJulian Andres Klode2016-05-151-1/+2
| | | | | | | The rest is also on the same line, so let's go consistent here now that we have a bug report about it. LP: #1581985
* zh_CN.po: update simplified Chinese translation.Zhou Mo2016-05-141-2/+2
|
* Provide complete apt bash completionJulian Andres Klode2016-05-131-6/+122
| | | | | | | | | This fixes Debian/apt#13 and the launchpad bug listed below, but is far more advanced. I went through private-cmndline.cc and looked at the supported options. LP: #1573547 Thanks: Elias Fröhner and Svyatoslav Gryaznov for the initial work
* edsp: warn if unexpected stanzas appear in the solutionDavid Kalnischkies2016-05-123-17/+84
| | | | | | Unexpected are for examples removal requests for versions which aren't installed, installations of already installed versions & requests to install and remove a package at the same time.
* edsp: document unique package identifiersJohannes 'josch' Schauer2016-05-121-5/+10
| | | | | | | | | | Document that package identifiers must be unique (apt only uses the last action for a given identifier) and that install requests do also imply upgrades and downgrades (and thus removal of the old version). This is to prevent that solvers express an upgrade or downgrade instruction as two stanzas: a removal of the old version and an installation of the new version. Instead, a single install stanza is sufficient to express upgrade or downgrade requests.
* Release 1.3~exp11.3_exp1Julian Andres Klode2016-05-1159-1313/+1707
|
* Dutch program translation updateFrans Spiesschaert2016-05-101-6/+13
| | | | Closes: 823976
* edsp: support generic and solver-specific configsDavid Kalnischkies2016-05-102-14/+29
| | | | | | | | | | | | | | The spec was slightly inconsistent if the preferences setting is available only as generic or specific setting & the code only supported the specific one, while for the strict-pinning was only generic… As the usual pattern for apt is to have both options we adapt the spec and code to support both as well. This also adds a purely informal "Solver" field so in case the request is saved in a file, we know to which solver the sent preferences apply. Closes: 823918
* update: Run Post-Invoke-Success if not all sources failedJulian Andres Klode2016-05-102-5/+53
| | | | | | | | | | | | | | | | 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.
* Strip trailing commas for created signed-by fingerprint listsJulian Andres Klode2016-05-102-0/+15
| | | | | This prevented some sources.list entries from working, an example of which can be found in the test.
* Merge pull request julian-klode/apt#3 from adrian17/masterJulian Andres Klode2016-05-102-11/+22
|\ | | | | | | Improve GetLocalitySortedVersionSet, speeds up apt search by 30%
| * Speed up GetLocalitySortedVersionSet.Adrian Wielgosik2016-05-091-9/+20
| |
| * Don't copy strings in Startswith, EndswithAdrian Wielgosik2016-05-011-2/+2
| |
* | don't sent uninstallable rc-only versions via EDSPDavid Kalnischkies2016-05-102-23/+72
| | | | | | | | | | | | | | | | | | | | | | Versions which are only available in dpkg/status aren't installable and apt doesn't pick them as candidate for this reason – for the same reason such packages shouldn't be sent to an external solver via EDSP. The packages are pinned to -1, but if the solver has strict pinning disabled it could end up picking this version anyhow – which is a request apt can not satisfy. Reported-By: Maximiliano Curia <maxy@debian.org> on IRC
* | gpgv: show always webportal error on NODATADavid Kalnischkies2016-05-084-41/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gpg doesn't give use a UID on NODATA, which we were "expecting" (but not using for anything), but just an error number. Instead of collecting these as badsigners which will trigger a "invald signature" error with remarks like "NODATA 1" we instead adapt a message similar to the NODATA error of a clearsigned file (which is actually not reached anymore as we split them up, which fails with a NOSPLIT error, which uses the same general error message). In other words: Not a security relevant change, just a user experience improvement as we now point them to the most likely cause of the problem instead of saying "invalid signature" which would point them in the direction of the archive being broken (for everyone) instead. Closes: 823746
* | implement Identifier field for IndexTargetsDavid Kalnischkies2016-05-0811-62/+101
| | | | | | | | | | | | | | | | | | | | | | A frontend like apt-file is only interested in a specific set of files and selects those easily via "Created-By". If it supports two locations for those files through it would need to select both and a user would need to know that implementation detail for sources.list configuration. The "Identifier" field is hence introduced which by default has the same value as "Created-By", but can be freely configured – especially it can be used to give two indexes the same identifier.
* | implement Fallback-Of for IndexTargetsDavid Kalnischkies2016-05-086-11/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes index files are in different locations in a repository as it is currently the case for Contents files which are per-component in Debian, but aren't in Ubuntu. This has historic reasons and is perhaps changed soon, but such cases of transitions can always happen in the future again, so we should prepare: Introduced is a new field declaring that the current item should only be downloaded if the mentioned item wasn't allowing for transitions without a flagday in clients and archives. This isn't implemented 'simpler' with multiple MetaKeys as items (could) change their descriptions and perhaps also other configuration bits with their location.
* | download arch:all also for NATIVE_ARCHITECTURE indextargetsDavid Kalnischkies2016-05-072-104/+122
| | | | | | | | | | | | | | It looks a bit strange on the outside to have multiple "native architecture", but all is considered an implementation detail and e.g. packages of arch:all are in dependency resolution equal to native packages.
* | don't construct MetaIndex acquire items with IndexTargetsDavid Kalnischkies2016-05-073-57/+41
| | | | | | | | | | | | | | | | We don't have to initialize the Release files with a set of IndexTargets to acquire, but instead wait for the Release file to be acquired and only then ask which IndexTargets to get. Git-Dch: Ignore
* | delay progress until Release files are downloadedDavid Kalnischkies2016-05-073-30/+26
| | | | | | | | | | | | | | | | | | | | | | | | Progress reporting used an "upper bound" on files we might get, expect that this wasn't correct in case pdiff entered the picture. So instead of calculating a value which is perhaps incorrect, we just accept that we can't tell how many files we are going to download and just keep at 0% until we know. Additionally, if we have pdiffs we wait until we got these (sub)index files, too. That could all be done better by downloading all Release files first and planing with them in hand accordingly, but one step at a time.