summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-sources-deb822
Commit message (Collapse)AuthorAgeFilesLines
* Step over empty sections in TagFiles with commentsDavid Kalnischkies2019-02-011-0/+68
| | | | | | | | Implementing a parser with recursion isn't the best idea, but in practice we should get away with it for the time being to avoid needless codechurn. Closes: #920317 #921037
* Fix typo reported by codespell in code commentsDavid Kalnischkies2018-11-251-1/+1
| | | | | | | | No user visible change expect for some years old changelog entries, so we don't really need to add a new one for this… Reported-By: codespell Gbp-Dch: Ignore
* allow multivalue fields in deb822 sources to be foldedDavid Kalnischkies2017-11-191-0/+92
| | | | | | | | | | | | | | | The documentation said "spaces", but there is no real reason to be so strict and only allow spaces to separate values as that only leads to very long lines if e.g. multiple URIs are specified which are again hard to deal with from a user PoV which the deb822 format is supposed to avoid. It also deals with multiple consecutive spaces and strange things like tabs users will surely end up using in the real world. The old behviour on encountering folded lines is the generation of URIs which end up containing all these whitespace characters which tends to mess really bad with output and further processing. Closes: 881875
* acquire: Use priority queues and a 3 stage pipeline designJulian Andres Klode2016-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Employ a priority queue instead of a normal queue to hold the items; and only add items to the running pipeline if their priority is the same or higher than the priority of items in the queue. The priorities are designed for a 3 stage pipeline system: In stage 1, all Release files and .diff/Index files are fetched. This allows us to determine what files remain to be fetched, and thus ensures a usable progress reporting. In stage 2, all Pdiff patches are fetched, so we can apply them in parallel with fetching other files in stage 3. In stage 3, all other files are fetched (complete index files such as Contents, Packages). Performance improvements, mainly from fetching the pdiff patches before complete files, so they can be applied in parallel: For the 01 Sep 2016 03:35:23 UTC -> 02 Sep 2016 09:25:37 update of Debian unstable and testing with Contents and appstream for amd64 and i386, update time reduced from 37 seconds to 24-28 seconds. Previously, apt would first download new DEP11 icon tarballs and metadata files, causing the CPU to be idle. By fetching the diffs in stage 2, we can now patch our contents and Packages files while we are downloading the DEP11 stuff.
* allow arch=all to override No-Support-for-Architecture-allDavid Kalnischkies2016-07-221-3/+3
| | | | | | | | | | | | | If a user explicitly requests the download of arch:all apt shouldn't get in the way and perform its detection dance if arch:all packages are (also) in arch:any files or not. This e.g. allows setting arch=all on a source with such a field (or one which doesn't support all at all, but has the arch:all files like Debian itself ATM) to get only the arch:all packages from there instead of behaving like a no-op. Reported-By: Helmut Grohne on IRC
* deb822: Restore support for <multivalue>-{Add,Remove}James McCoy2016-04-281-0/+10
| | | | | | Redesign of multivalue options in 463c8d801595ce5ac94d7c032264820be7434232 caused the parser to look for <multivalue>{Add,Remove} (no hyphen) instead of the expected <multivalue>-{Add,Remove}.
* properly parse comments in apt_preferences and deb822-style sourcesDavid Kalnischkies2016-01-021-0/+2
| | | | | | | | | | apt_preferences and deb822-style sources used the specialized class pkgUserTagSection to deal with comments before/after a given stanza, but it couldn't deal with comments in the stanza at all. codesearch suggests that nobody else does and a vastely superior way of working with potentially commented files is implemented now, so we can officially discourage the use of the old incomplete hack class.
* 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
* support arch:all data e.g. in separate Packages fileDavid Kalnischkies2015-11-041-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* various changes to increase test-coverageDavid Kalnischkies2015-09-141-16/+37
| | | | | | | 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
* try xz instead of bz2 first for compressed filesDavid Kalnischkies2015-08-291-38/+38
| | | | | | | | | | | | | | | | | | xz has pretty much won "the compressor war" and e.g. the Debian archive doesn't even distribute bz2 anymore in favor of 'xz' and 'gz', so by changing the default order we have a more realistic --print-uris behavior as it will always show the first compressor. In practice this effects repositories without a Release file (very bad, we don't want to support them anymore anyhow) as xz will be tried before bz2 now [which is probably not available, but so might be bz2…] AND repositories which provide both, bz2 and xz (which isn't too common) in sofar as apt will now download xz instead of bz2. Users with special needs can stick with bz2 as first compressor tried with Acquire::CompressionTypes::Order:: "bz2"; (see man apt.conf) – but users with special needs usually prefer "gz" anyhow, so the realworld change is expected to be very low.
* Support tabs in sources.list filesJulian Andres Klode2015-08-191-0/+6
| | | | | | Also support vertical tabs, as isspace() does the same. Closes: #796067
* bring back deb822 sources.list entries as .sourcesDavid Kalnischkies2015-08-101-19/+56
| | | | | | | | | | | | | | | | | | Having two different formats in the same file is very dirty and causes external tools to fail hard trying to parse them. It is probably not a good idea for them to parse them in the first place, but they do and we shouldn't break them if there is a better way. So we solve this issue for now by giving our deb822 format a new filename extension ".sources" which unsupporting applications are likely to ignore an can begin gradually moving forward rather than waiting for the unknown applications to catch up. Currently and for the forseeable future apt is going to support both with the same feature set as documented in the manpage, with the longtime plan of adopting the 'new' format as default, but that is a long way to go and might get going more from having an easier time setting options than from us pushing it explicitely.
* rework hashsum verification in the acquire systemDavid Kalnischkies2015-06-091-28/+27
| | | | | | | | | | | | | | | | | | | | | Having every item having its own code to verify the file(s) it handles is an errorprune process and easy to break, especially if items move through various stages (download, uncompress, patching, …). With a giant rework we centralize (most of) the verification to have a better enforcement rate and (hopefully) less chance for bugs, but it breaks the ABI bigtime in exchange – and as we break it anyway, it is broken even harder. It shouldn't effect most frontends as they don't deal with the acquire system at all or implement their own items, but some do and will need to be patched (might be an opportunity to use apt on-board material). The theory is simple: Items implement methods to decide if hashes need to be checked (in this stage) and to return the expected hashes for this item (in this stage). The verification itself is done in worker message passing which has the benefit that a hashsum error is now a proper error for the acquire system rather than a Done() which is later revised to a Failed().
* use HashStringList in the acquire systemDavid Kalnischkies2014-05-091-24/+24
| | | | | | | | | | | | | It is not very extensible to have the supported Hashes hardcoded everywhere and especially if it is part of virtual method names. It is also possible that a method does not support the 'best' hash (yet), so we might end up not being able to verify a file even though we have a common subset of supported hashes. And those are just two of the cases in which it is handy to have a more dynamic selection. The downside is that this is a MAJOR API break, but the HashStringList has a string constructor for compatibility, so with a bit of luck the few frontends playing with the acquire system directly are okay.
* add test for Suite with pathMichael Vogt2014-01-281-0/+11
|
* enable deb822 sources for associated testcaseDavid Kalnischkies2014-01-261-2/+4
| | | | Git-Dch: Ignore
* Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt2014-01-251-1/+1
|\
| * support " " in deb822 source optionsMichael Vogt2014-01-251-1/+1
| |
* | Merge remote-tracking branch 'upstream/debian/experimental-no-abi-break' ↵Michael Vogt2014-01-211-28/+30
|\| | | | | | | | | | | | | into feature/source-deb822 Conflicts: test/integration/test-apt-sources-deb822
| * Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-3/+3
| |\ | | | | | | | | | debian/experimental-no-abi-break
| * \ Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt2014-01-181-1/+1
| |\ \ | | | | | | | | | | | | debian/experimental-no-abi-break
| * \ \ merged mvo/feature/deb822Michael Vogt2014-01-161-16/+15
| |\ \ \
| * | | | rework some testcases to not spit out textDavid Kalnischkies2014-01-151-31/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework also uncovers two FIXMEs Git-Dch: Ignore
* | | | | add support for multipl types in one lineMichael Vogt2014-01-201-3/+10
| | | | |
* | | | | add support for multiple URIs in deb822 style sources.listMichael Vogt2014-01-201-1/+10
| | | | |
* | | | | add support for Enabled: no in deb822 sources.listMichael Vogt2014-01-201-0/+4
| | | | |
* | | | | add Description tag for deb822 sourcesMichael Vogt2014-01-201-3/+3
| |_|_|/ |/| | |
* | | | rename "Suite/Section" to pluralMichael Vogt2014-01-181-3/+3
| |_|/ |/| |
* | | implement suggestion by donkult (thanks!)Michael Vogt2014-01-171-1/+1
| |/ |/|
* | support multiple "Suite:" entriesMichael Vogt2014-01-161-0/+8
| |
* | rename URL to Uri in deb822-sourcesMichael Vogt2014-01-161-1/+1
| |
* | rename "distribution" in sources.list to "suite"Michael Vogt2014-01-161-2/+2
| |
* | * refactor to have a new virtual ParseStanzaMichael Vogt2014-01-161-1/+1
| | | | | | | | | | | | Have a similar ParseStanza() to the current ParseLine(). Rename the Architectures options in deb822 to make it more user friendly
* | remove "," in components againMichael Vogt2014-01-161-11/+0
|/
* improve error messageMichael Vogt2014-01-041-8/+22
|
* improve testsMichael Vogt2014-01-041-5/+16
|
* fix section addingMichael Vogt2013-12-051-0/+10
|
* first version with testMichael Vogt2013-12-051-0/+45