summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | TransactionManager can never be a nullptrDavid Kalnischkies2016-05-072-27/+20
| | | | | | | | | | | | | | | | The code naturally evolved from a TransactionManager optional to a required setup which resulted in various places doing unneeded checks suggesting a more complicated setup than is actually needed. Git-Dch: Ignore
* | fix same-mirror redirection for Release{,.gpg} pairDavid Kalnischkies2016-05-072-2/+23
| | | | | | | | | | | | | | | | | | | | | | Commit 9b8034a9fd40b4d05075fda719e61f6eb4c45678 just deals with InRelease properly and generates broken URIs in case the mirror (or the achieve really) has no InRelease file. [As this was in no released version no need to clutter changelog with a fix notice.] Git-Dch: Ignore
* | tests: disable generation of Release.gpg by defaultDavid Kalnischkies2016-05-049-40/+27
| | | | | | | | | | | | | | | | | | | | | | Most tests just need a signed repository and don't care if it signed by an InRelease file or a Release.gpg file, so we can save some time by just generating one of them by default. Sounds like not much, but quickly adds up to a few seconds with the amount of tests we have accumulated by now. Git-Dch: Ignore
* | tests: allow to disable generation of InRelease/Release.gpg fileDavid Kalnischkies2016-05-046-45/+33
| | | | | | | | | | | | | | If the test just signs release files to throw away one of them to test the other, we can just as well save the time and not create it. Git-Dch: Ignore
* | test: fix permission issue if run as rootDavid Kalnischkies2016-05-041-0/+1
| | | | | | | | | | | | | | Always those silly mistakes. Do what I mean, not what I said… Reported-By: Travis Git-Dch: Ignore
* | allow redirection for items without a space in the desc againDavid Kalnischkies2016-05-032-8/+14
| | | | | | | | | | | | | | | | | | | | Broken in a4b8112b19763cbd2c12b81d55bc7d43a591d610. If an item has a description which includes no space and is redirected to another mirror the code which wants to rewrite the description expects a space in there, but can't find it and the unguarded substr command on the string will fail with an exception thrown… Guarding it properly and everything is fine.
* | let DPKG_COLORS default to our APT::Color settingDavid Kalnischkies2016-05-031-0/+7
| | | | | | | | | | | | | | | | | | | | dpkg can optionally colorize its output since 1.18.5. Currently this defaults to 'never', but it will eventually be 'auto'. It seems reasonable to assume that a user who has enabled/disabled colors in apt will want to have dpkg have the same state regarding color usage. This isn't overriding explicit settings by the user, so in case a user feels strongly about it one way or the other there are options.
* | remove 100-levels config nesting limitDavid Kalnischkies2016-05-031-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | The actual reason for this commit isn't the limit – there isn't much point in using that much nesting – its in shutting up gcc mostly: apt/apt-pkg/contrib/configuration.cc: In function ‘bool ReadConfigFile(Configuration&, const string&, const bool&, const unsigned int&)’: apt/apt-pkg/contrib/configuration.cc:686:20: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] string Stack[100]; ^ by replacing this with C++s handy std::stack container (adapter). Also cleans some whitespace noise from the file in the process.
* | apt-key: add \n to dpkg-query --show --showformatCarsten Hey2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | Guarding against 'broken' greps not dealing with non-text inputs "just in case" by making the input text with a proper newline. [commit message by David Kalnischkies] Reported-On: IRC Git-Dch: Ignore
* | warn if apt-key is run unconditionally in maintainerscriptDavid Kalnischkies2016-05-012-1/+48
| | | | | | | | | | | | | | | | We want to stop hard-depending on gnupg and for this it is essential that apt-key isn't used in any critical execution path, which maintainerscript are. Especially as it is likely that these script call apt-key either only for (potentially now outdated cleanup) or still not use the much simpler trusted.gpg.d infrastructure.
* | move gnupg|gnupg2 from apt Depends to RecommendsDavid Kalnischkies2016-05-011-1/+2
|/ | | | | | | | | | | | apt doesn't need gnupg in its main execution paths to function, especially the Release file verification is done with gpgv only. It is only used by apt-key for advanced key management functionality most user will never use nor need. The intend is to demote it eventually to Suggests, but we opt here for a staged downgrade as there are still third-party repositories out there which require apt-key functionality without depending on gnupg (or apt for that matter).
* ftparchive: Support writing Signed-By fieldsJulian Andres Klode2016-05-011-0/+1
|
* bugscript: include all configuration fragment filesDavid Kalnischkies2016-05-011-1/+1
| | | | Closes: 820861
* support Signed-By in Release files as a sort of HPKPDavid Kalnischkies2016-05-0146-292/+177
| | | | | | | | | | | | Users have the option since apt >= 1.1 to enforce that a Release file is signed with specific key(s) either via keyring filename or fingerprints. This commit adds an entry with the same name and value (except that it doesn't accept filenames for obvious reasons) to the Release file so that the repository owner can set a default value for this setting effecting the *next* Release file, not the current one, which provides a functionality similar "HTTP Public Key Pinning". The pinning is in effect as long as the (then old) Release file is considered valid, but it is also ignored if the Release file has no Valid-Until at all.
* support multiple fingerprints in signed-byDavid Kalnischkies2016-05-014-32/+71
| | | | | A keyring file can include multiple keys, so its only fair for transitions and such to support multiple fingerprints as well.
* gpgv: cleanup statusfd parsing a bitDavid Kalnischkies2016-05-012-58/+46
| | | | | | | | | | | We parse the messages we receive into two big categories: Most of the messages have a keyid as well as a userid and as they are errors we want to show the userids as well. The other category is also errors, but have no userid (like NO_PUBKEY). Explicitly expressing this in code should make it a bit easier to look at and it also help in dropping additional fields or just the newline at the end consistently. Git-Dch: Ignore
* don't show NO_PUBKEY warning if repo is signed by another keyDavid Kalnischkies2016-05-016-49/+134
| | | | | | | | | | | | | | | Daniel Kahn Gillmor highlights in the bugreport that security isn't improving by having the user import additional keys – especially as importing keys securely is hard. The bugreport was initially about dropping the warning to a notice, but in given the previously mentioned observation and the fact that we weren't printing a warning (or a notice) for expired or revoked keys providing a signature we drop it completely as the code to display a message if this was the only key is in another path – and is considered critical. Closes: 618445
* gpgv: handle expired sig as worthlessDavid Kalnischkies2016-05-013-2/+34
| | | | | | | Signatures on data can have an expiration date, too, which we hadn't handled previously explicitly (no problem – gpg still has a non-zero exit code so apt notices the invalid signature) so the error message wasn't as helpful as it could be (aka mentioning the key signing it).
* gpgv: use EXPKEYSIG instead of KEYEXPIREDDavid Kalnischkies2016-05-012-5/+5
| | | | | | The upstream documentation says about KEYEXPIRED: "This status line is not very useful". Indeed, it doesn't mention which key is expired, and suggests to use the other message which does.
* show StateCache flags in Pkg debug prettyprintDavid Kalnischkies2016-05-015-35/+102
| | | | | | | | | | | This basically introduces ~33 flags in the output, but a package can have only ~11 of them displayed at the same time. There is quiet a bit of duplication also (an uninstalled package is by definition a newinstall if its getting installed), but as this is debug output we are better of showing them all in case one of them isn't set in a way it is supposed to be set. Git-Dch: Ignore
* 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
|\