summaryrefslogtreecommitdiff
path: root/test/integration/test-external-dependency-solver-protocol
Commit message (Collapse)AuthorAgeFilesLines
* edsp: optionally store a compressed copy of the last scenarioDavid Kalnischkies2016-06-081-3/+16
| | | | | | | | For bugreports and co it could be handy to have the scenario and all the settings used in it around later for inspection for EDSP like protocols. EDSP might not be the most interesting as the user can still interrupt the process before the solution is applied and users tend to have an opinion on the "rightness" of a solution, so it is disabled by default.
* edsp: use an ID mapping for the internal solverDavid Kalnischkies2016-06-041-0/+5
| | | | | | | Currently an EDSP solver gets send basically all versions which means the absolute count is the same, but that might not be true forever (and with the skipping of rc-only versions it kinda is already) and even if it were true, segfaulting on bad input seems wrong.
* refactor EDSP code into EDSP and EDSP-like partsDavid Kalnischkies2016-05-201-9/+9
| | | | | | | 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: warn if unexpected stanzas appear in the solutionDavid Kalnischkies2016-05-121-1/+51
| | | | | | 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.
* tests: expect no output while compiling noopchrootDavid Kalnischkies2016-03-061-1/+1
| | | | | | This way we hopefully notice (new) warnings in this little helper. Git-Dch: Ignore
* tests: support spaces in path and TMPDIRDavid Kalnischkies2015-12-191-2/+2
| | | | | | | This doesn't allow all tests to run cleanly, but it at least allows to write tests which could run successfully in such environments. Git-Dch: Ignore
* tests: use quiet level 0 by default in testsDavid Kalnischkies2015-11-191-2/+2
| | | | Git-Dch: Ignore
* support arch:all data e.g. in separate Packages fileDavid Kalnischkies2015-11-041-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a discussion with Niels Thykier who asked for Contents-all this implements apt trying for all architecture dependent files to get a file for the architecture all, which is treated internally now as an official architecture which is always around (like native). This way arch:all data can be shared instead of duplicated for each architecture requiring the user to download the same information again and again. There is one problem however: In Debian there is already a binary-all/ Packages file, but the binary-any files still include arch:all packages, so that downloading this file now would be a waste of time, bandwidth and diskspace. We therefore need a way to decide if it makes sense to download the all file for Packages in Debian or not. The obvious answer would be a special flag in the Release file indicating this, which would need to default to 'no' and every reasonable repository would override it to 'yes' in a few years time, but the flag would be there "forever". Looking closer at a Release file we see the field "Architectures", which doesn't include 'all' at the moment. With the idea outlined above that 'all' is a "proper" architecture now, we interpret this field as being authoritative in declaring which architectures are supported by this repository. If it says 'all', apt will try to get all, if not it will be skipped. This gives us another interesting feature: If I configure a source to download armel and mips, but it declares it supports only armel apt will now print a notice saying as much. Previously this was a very cryptic failure. If on the other hand the repository supports mips, too, but for some reason doesn't ship mips packages at the moment, this 'missing' file is silently ignored (= that is the same as the repository including an empty file). The Architectures field isn't mandatory through, so if it isn't there, we assume that every architecture is supported by this repository, which skips the arch:all if not listed in the release file.
* sanify API to get 'the' candidate versionDavid Kalnischkies2015-11-041-0/+19
| | | | | | | | | This was discussed a while ago on #debian-apt and now that I see myself making this mistake lets bite the bullet and fix it in the easy way out version: Using a new name which fits with a similar named setter and deprecate the old method instead of 'hostily' changing API. Closes: #803471
* suggest 'apt autoremove' to get right of unneeded packagesDavid Kalnischkies2015-11-041-1/+5
| | | | | | | | | | The bugreport is more conservative in asking for a conditional, but given that this is a message intended to be read by users to be run by users we should suggest using a command intended to be used by users. And while we are at, add sudo to the message – conditional of course. Closes: 801571
* various changes to increase test-coverageDavid Kalnischkies2015-09-141-2/+11
| | | | | | | And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore
* implement autobit and pinning in EDSP solver 'apt'David Kalnischkies2015-09-141-5/+38
| | | | | | | | The parser creates a preferences as well as an extended states file based on the EDSP scenario file, which isn't the most efficient way of dealing with this as thes text files have to be parsed again by another layer of the code, but it needs the least changes and works good enough for now. The 'apt' solver is in the end just a test solver like dump.
* fix insecure use of /tmp in EDSP solver 'dump'David Kalnischkies2015-09-141-9/+12
| | | | | | | | | | | | As said in the bugreport, this is hardly a serious problem on a security front, but it was always on the list to have the filename configurable somehow and the stable filename is a problem for parallel executions. Using an environment variable (APT_EDSP_DUMP_FILENAME) for this is more or less the best we can do here as solvers do not get told about our configuration and such. Closes: 795600
* add Source-Version field for EDSPDavid Kalnischkies2015-09-141-0/+1
| | | | | | The syntax of "Source" is different in EDSP compared to the the field of the same name in 'the rest' of Debian, so documented this accordingly and send the version as a new field.
* implement dpkgs vision of interpreting pkg:<arch> dependenciesDavid Kalnischkies2015-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
* test exitcode as well as string equalityDavid Kalnischkies2015-03-161-4/+4
| | | | | | | | We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore
* various small additional tests and testcasesDavid Kalnischkies2014-11-181-2/+30
| | | | | | | | | Usually they don't provide a lot in terms of what they test, but they help in covering many lines from strictly anecdotal commands (stats, moo) and error messages, so that stuff which really needs to be tested, but isn't is better visible in coverage reports. Git-Dch: Ignore
* do not call resolver twice on (dist-)upgradeDavid Kalnischkies2014-06-181-0/+6
|
* fix autopkgtest testsMichael Vogt2014-06-111-1/+1
|
* support parsing EDSP requests Architecture{,s} stanzaDavid Kalnischkies2014-05-301-0/+65
Adds also a small testcase for EDSP Git-Dch: Ignore