summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-sources-deb822
AgeCommit message (Collapse)AuthorFilesLines
2016-07-22allow arch=all to override No-Support-for-Architecture-allDavid Kalnischkies1-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
2016-04-28deb822: Restore support for <multivalue>-{Add,Remove}James McCoy1-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}.
2016-01-02properly parse comments in apt_preferences and deb822-style sourcesDavid Kalnischkies1-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.
2015-12-19tests: support spaces in path and TMPDIRDavid Kalnischkies1-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
2015-11-04support arch:all data e.g. in separate Packages fileDavid Kalnischkies1-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.
2015-09-14various changes to increase test-coverageDavid Kalnischkies1-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
2015-08-29try xz instead of bz2 first for compressed filesDavid Kalnischkies1-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.
2015-08-19Support tabs in sources.list filesJulian Andres Klode1-0/+6
Also support vertical tabs, as isspace() does the same. Closes: #796067
2015-08-10bring back deb822 sources.list entries as .sourcesDavid Kalnischkies1-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.
2015-06-09rework hashsum verification in the acquire systemDavid Kalnischkies1-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().
2014-05-09use HashStringList in the acquire systemDavid Kalnischkies1-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.
2014-01-28add test for Suite with pathMichael Vogt1-0/+11
2014-01-26enable deb822 sources for associated testcaseDavid Kalnischkies1-2/+4
Git-Dch: Ignore
2014-01-25Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt1-1/+1
2014-01-25support " " in deb822 source optionsMichael Vogt1-1/+1
2014-01-21Merge remote-tracking branch 'upstream/debian/experimental-no-abi-break' ↵Michael Vogt1-28/+30
into feature/source-deb822 Conflicts: test/integration/test-apt-sources-deb822
2014-01-20add support for multipl types in one lineMichael Vogt1-3/+10
2014-01-20add support for multiple URIs in deb822 style sources.listMichael Vogt1-1/+10
2014-01-20add support for Enabled: no in deb822 sources.listMichael Vogt1-0/+4
2014-01-20add Description tag for deb822 sourcesMichael Vogt1-3/+3
2014-01-18Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt1-3/+3
debian/experimental-no-abi-break
2014-01-18rename "Suite/Section" to pluralMichael Vogt1-3/+3
2014-01-18Merge remote-tracking branch 'mvo/feature/source-deb822' into ↵Michael Vogt1-1/+1
debian/experimental-no-abi-break
2014-01-17implement suggestion by donkult (thanks!)Michael Vogt1-1/+1
2014-01-16merged mvo/feature/deb822Michael Vogt1-16/+15
2014-01-16support multiple "Suite:" entriesMichael Vogt1-0/+8
2014-01-16rename URL to Uri in deb822-sourcesMichael Vogt1-1/+1
2014-01-16rename "distribution" in sources.list to "suite"Michael Vogt1-2/+2
2014-01-16* refactor to have a new virtual ParseStanzaMichael Vogt1-1/+1
Have a similar ParseStanza() to the current ParseLine(). Rename the Architectures options in deb822 to make it more user friendly
2014-01-16remove "," in components againMichael Vogt1-11/+0
2014-01-15rework some testcases to not spit out textDavid Kalnischkies1-31/+39
Rework also uncovers two FIXMEs Git-Dch: Ignore
2014-01-04improve error messageMichael Vogt1-8/+22
2014-01-04improve testsMichael Vogt1-5/+16
2013-12-05fix section addingMichael Vogt1-0/+10
2013-12-05first version with testMichael Vogt1-0/+45