summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* really fix testMichael Vogt2013-10-091-36/+43
|
* use "insertpackage" instead of "buildsimplenativepackage"Michael Vogt2013-10-091-10/+12
|
* add test for upgrade, upgrade --with-new-pkgs, dist-upgradeMichael Vogt2013-10-091-0/+69
|
* Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2013-10-0515-106/+504
|\
| * tests: install --no-install-recommends and stunnel4 for travisDavid Kalnischkies2013-10-031-1/+1
| | | | | | | | | | | | stunnel4 is required for https tests Git-Dch: Ignore
| * test: use a multiarch capable dpkg rather than workaroundDavid Kalnischkies2013-10-031-4/+3
| | | | | | | | | | | | | | | | The tests require nowadays a (somewhat) multiarch-capable dpkg, so replace the workaround as marked in the FIXME with a proper install as the workaround isn't working always correctly, letting the test fail. Git-Dch: Ignore
| * use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies2013-10-033-11/+23
| | | | | | | | | | | | | | With a bit of trickery we can reuse the usual infrastructure we have in place to acquire deb files for the 'download' operation as well, which gains us authentification check & display, error messages, correct filenames and "downloads" from the root-owned archives.
| * tests: fix some problems travis encountersDavid Kalnischkies2013-10-025-48/+54
| | | | | | | | Git-Dch: Ignore
| * don't consider holds for autoremovalDavid Kalnischkies2013-10-011-0/+20
| | | | | | | | | | | | | | | | | | | | | | We can't remove packages which are held back by the user with a hold, so marking them (or its dependencies) as garbage will lead our autoremover into madness – and given that the package is important enough that the user has held it back it can't be garbage (at least at the moment), so even if a front-end wants to use the info just for information display its a good idea to not consider it garbage for them. Closes: 724995
| * handle complete responses to https range requestsDavid Kalnischkies2013-10-013-22/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | Servers might respond with a complete file either because they don't support Ranges at all or the If-Range condition isn't statisfied, so we have to parse the headers curl gets ourself to seek or truncate the file we have so far. This also finially adds the testcase testing a bunch of partial situations for both, http and https - which is now all green. Closes: 617643, 667699 LP: 1157943
| * retry without partial data after a 416 responseDavid Kalnischkies2013-10-011-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get a 416 from the server it means the Range we asked for is above the real filesize of the file on the server. Mostly this happens if the server isn't supporting If-Range, but regardless of how we end up with the partial data, the data is invalid so we discard it and retry with a fresh plate and hope for the best. Old behavior was to consider 416 an error and retry with a different compression until we ran out of compression and requested the uncompressed file (which doesn't exist on most mirrors) with an accept line which server answered with "406 Not Acceptable". Closes: 710924
| * add Range and If-Range support in the webserverDavid Kalnischkies2013-09-301-1/+63
| | | | | | | | Git-Dch: Ignore
| * access _config via GET requests in the webserverDavid Kalnischkies2013-09-301-3/+71
| | | | | | | | Git-Dch: Ignore
* | Merge remote-tracking branch 'mvo/bugfix/dpkg-progress-multiarch' into ↵Michael Vogt2013-10-051-0/+27
|\ \ | |/ |/| | | debian/sid
| * change maxsplit default from "0" to maxintMichael Vogt2013-10-011-0/+4
| |
| * add maxsplit parameter to StringSplitMichael Vogt2013-09-071-0/+6
| |
| * implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2013-09-071-0/+17
| |
* | test: apt-get source with more than one argumentDavid Kalnischkies2013-09-261-0/+6
| | | | | | | | | | Closes: 722549 Git-Dch: Ignore
* | print-uris prints regardless of quiet-level againDavid Kalnischkies2013-09-261-0/+24
| | | | | | | | | | | | | | | | | | | | While the InstallPackages code was moved from apt-get into the private library the output was moved from (std::)cout to c1out which isn't shown in quiet level 2 (and above), so we flip back to std::cout to ensure that it is always printed as you are not going to use --print-uris if you don't want to see the uris… Closes: 722207
* | pkg from only trusted sources keeps being trustedDavid Kalnischkies2013-09-262-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --allow-unauthenticated switches the download to a pre-0.6 system in which a package can come from any source, rather than that trusted packages can only come from trusted sources. To allow this the flag used to set all packages as untrusted, which is a bit much, so we check now if the package can be acquired via an untrusted source and only if this is the case set it as untrusted. As APT nowadays supports setting sources as trusted via a flag in the sources.list this mode shouldn't be used that much anymore though. [Note that this is not the patch from the BTS] Closes: 617690
* | don't strip :any from dependencies in single-archDavid Kalnischkies2013-09-261-0/+54
| | | | | | | | | | | | | | | | | | | | | | The parser goes a bit to far by stripping :any from dependencies in a single architecture environment. the flag "Multi-Arch: allowed" doesn't care any architecture restrictions in that case (as in single arch everything is native), but it still limits the possible versions statisfying the dependency so stripping :any over-simplifies in upgrade situations from "Multi-Arch: none" to "Multi-Arch: allowed". Closes: 723586
* | do not trust FileFd::Eof() in pkgTagFile::Fill()David Kalnischkies2013-09-203-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Eof check was added (by me of course) in 0aae6d14390193e25ab6d0fd49295bd7b131954f as part of a fix up ~a month ago (at DebConf). The idea was not that bad, but doesn't make that much sense either as this bit is set by the FileFd based on Actual as well, so this is basically doing the same check again – with the difference that the HitEof bit can still linger from a previous Read we did at the end of the file, but have seek'd away from it now. Combined with the length of entries, entry order and other not that easily controllable conditions you can be 'lucky' enough to hit this problem in a way which even visible (truncating of other fields might not be visible easily, like 'Tags' and others). Closes: 723705 Thanks: Cyril Brulebois
* | add a testcase for 100 char long path truncate bug #689582David Kalnischkies2013-09-121-0/+35
| | | | | | | | Git-Dch: Ignore
* | use FileFd in HashSum test to unbreak non-linux portsDavid Kalnischkies2013-09-031-16/+16
|/ | | | | | | | | | | | The testcode happily mixes FILE* operations and direct access to fds which is even a bit suprising that it works on linux and worked so long for non-linux ports, so we switch to usage of FileFd instead which provides us with simple fd-only operations. Its overkill for this test as its a bare file and we ask for the descriptor all the time, but it shouldn't hurt to implicitly test it a bit this way. Closes: 721723 Thanks: Aaron M. Ucko
* configurable compression for testcasesDavid Kalnischkies2013-08-285-24/+41
| | | | | | | | Compressing files in 4 different styles eats test-time for no practical gain if we don't test them explicitly, so default to just building 'gz' compressed files as it is the simplest compression algorithm supported Git-Dch: Ignore
* old-style dpkg foreign architecture adding for testsDavid Kalnischkies2013-08-271-1/+7
| | | | | | | | Looks like the travis service runs on Ubuntu in a version which has dpkg with an earlier interface implementation, so lets try if we can't make the framework work with this dpkg version as well. Git-Dch: Ignore
* Merge pull request #3 from cbaines/debian/sidMichael Vogt2013-08-191-0/+25
|\ | | | | Add test for bug 507998
| * Add test for bug 507998Christopher Baines2013-08-161-0/+25
| |
* | allow Pre-Install-Pkgs hooks to get info over an FD != stdinDavid Kalnischkies2013-08-161-39/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds ::InfoFD option alongside the ::Version one to request sending the information to the specified FD, by default it is STDIN as it was the case before. The environment variable APT_HOOK_INFO_FD contains the FD the data is on as a confirmation that the APT version used understood the request. Allowing the hook to choose the FD is needed/helpful e.g. for shellscripts which have a hard time accessing FDs above 9 (as >= 10 are usually used internally by them) Closes: #671728
* | set MALLOC_CHECK_ and MALLOC_PERTURB_ for testcasesDavid Kalnischkies2013-08-152-6/+6
| | | | | | | | | | | | | | In bugreport deb:719629 Paul Wise mentions both to enable some malloc checks and as more testing can't hurt we enable both for all testcases. Git-Dch: Ignore
* | rework the parameter creation for the Hashsum testDavid Kalnischkies2013-08-151-3/+5
| | | | | | | | | | | | Avoids having to different places from which test binaries are called Git-Dch: Ignore
* | do not call make from libapt/run-tests if its called by makeDavid Kalnischkies2013-08-151-3/+5
| | | | | | | | | | | | | | | | | | If we are called by make everything is build already and so this is just a noise nop we can just skip. (Noisy as it complains about being unable to communicate with the other makes to coordinate with the jobserver) Git-Dch: Ignore
* | * lp:~mvo/apt/add-glob-function:Michael Vogt2013-08-152-0/+47
| | | | | | | | | | | | | | - add Glob() to fileutl.{cc,h} Conflicts: apt-pkg/contrib/fileutl.h debian/changelog
* | * lp:~mvo/apt/config-clear:Michael Vogt2013-08-151-0/+4
|/ | | | | | | - support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
* let apt-key del work better with softlink and single key keyringsDavid Kalnischkies2013-08-121-0/+68
| | | | | | | Having fragement files means there is a good chance that there is one key per keyring, so deal with that as well as with setups in which keyrings are linked into trusted.gpg.d as we can't just modify those files (they might be in /usr for example).
* ensure that testcases exiting because of set -e aren't successfulDavid Kalnischkies2013-08-121-1/+11
| | | | Git-Dch: Ignore
* make the keyring locations in apt-key configurableDavid Kalnischkies2013-08-121-0/+39
| | | | Might come in handy for more than just a simple testcase.
* fix output redirection orderDavid Kalnischkies2013-08-124-7/+7
| | | | | | | First redirect output to a file, then redirect other outputs to this output, not the other way around as this will not work. Git-Dch: Ignore
* fix: --print-uris removes authenticationDavid Kalnischkies2013-08-122-1/+42
| | | | | | | | | | | | | | | | | The constructors of our (clear)sign-acquire-items move a pre-existent file for error-recovery away, which gets restored or discarded later as the acquire progresses, but --print-uris never really starts the acquire process, so the files aren't restored (as they should). To fix this both get a destructor which checks for signs of acquire doing anything and if it hasn't the file is restored. Note that these virtual destructors theoretically break the API, but only with classes extending the sign-acquire-items and nobody does this, as it would be insane for library users to fiddle with Acquire internals – and these classes are internals. Closes: 719263
* add chronic-like testsuccess/testfailure helpersDavid Kalnischkies2013-08-1226-93/+125
| | | | | | | | | | For many commands the output isn't stable (like then dpkg is called) but the exitcode is, so this helper enhances the common && msgpass || msgfail by generating automatically a msgtest and showing the output of the command in case of failure instead of discarding it unconditionally, the later being chronic-like behaviour Git-Dch: Ignore
* test Release file handling with expired keysDavid Kalnischkies2013-08-124-8/+62
| | | | | | | | | Signing files with expired keys is not as easy as it sounds, so the framework jumps a few loops to do it, but it might come in handy to have an expired key around for later tests even if it is not that different from having no key in regards to APT behaviour. Git-Dch: Ignore
* specific pins below 1000 cause downgradesDavid Kalnischkies2013-08-081-0/+81
| | | | | | | | | | | | | | | | | | | We start your quest by using the version of a package applying to a specific pin, but that version could very well be below the current version, which causes APT to suggest a downgrade even if it is advertised that it never does this below 1000. Its of course questionable what use a specific pin on a package has which has a newer version already installed, but reacting with the suggestion of a downgrade is really not appropriated (even if its kinda likely that this is actually the intend the user has – it could just as well be an outdated pin) and as pinning is complicated enough we should atleast do what is described in the manpage. So we look out for the specific pin and if we haven't seen it at the moment we see the installed version, we ignore the specific pin. Closes: 543966
* prefer native arch over higher priority for providersColin Watson2013-08-011-0/+25
| | | | | | | | | | | | | | | | | | | | | | The rational from the buglog: > The problem here is that the Priority field in one of the Packages files > is incorrect due to a mishap with reprepro configuration, […] the > amd64 version is Priority: standard but the arm64 version is Priority: > optional (and has a stray "optional: interpreters" field). > […] > However, Priority is a rather weak property of a package because it's > typically applied via overrides, and it's easy for maintainers of > third-party repositories to misconfigure them so that overrides aren't > applied correctly. It shouldn't be ranked ahead of choosing packages > from the native architecture. In this case, I have no user-mode > emulation for arm64 set up, so choosing m4:arm64 simply won't work. This effectly makes the priority the least interesting data point in chosing a provider, which is in line with the other checks we have already order above priority in the past and also has a certain appeal by the soft irony it provides. Closes: #718482
* unset LANGUAGE for showing [Y/n] answer hintsDavid Kalnischkies2013-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | nl_langinfo is used to acquire the YESEXPR of the language used, but it will return the one from LC_MESSAGES, which might be different from the language chosen for display of the question (based on LANGUAGE) so this commit removes the [Y/n] help text from the questions itself and moves it to the prompt creation in which the usage of LC_MESSAGES is forced for it, so that the helptext shown actually represents the characters accepted as input for the question. There is still room for problems of course starting with an untranslated "[Y/n]" but a translated YESEXPR or the problem that the question is asked in a completely different language which might have a conflicting definition of [Y/n] input or the user simple ignores the helptext and assumes that an answer matching the question language is accepted, but the mayority of users will never have this problem to begin with, so we should be fine (or at least a bit finer than before). Closes nothing really, but should at least help a bit with bugs like deb:194614, deb:471102, lp:1205578, and countless others.
* request absolute URIs from proxies again (0.9.9.3 regession)David Kalnischkies2013-07-262-8/+56
| | | | | | | | Commit 2b9c9b7f28b18f6ae3e422020e8934872b06c9f3 not only removes keep-alive, but also changes the request URI send to proxies which are required to be absolute URIs rather than the usual absolute paths. Closes: 717891
* pick up Translation-* even if only compressed availableDavid Kalnischkies2013-07-251-21/+34
| | | | | | | | | | | | | | | | On CD-ROMs Translation-* files are only in compressed form included in the Release file. This used to work while we had no record of Translation-* files in the Release file at all as APT would have just guessed the (compressed) filename and accepted it (unchecked), but now that it checks for the presents of entries and if it finds records it expects the uncompressed to be verifiable. This commit relaxes this requirement again to fix the regression. We are still secure "enough" as we can validate the compressed file we have downloaded, so we don't loose anything by not requiring a hashsum for the uncompressed files to double-check them. Closes: 717665
* fix 'apt-cache search' crash with missing descriptionDavid Kalnischkies2013-07-181-0/+26
| | | | | | | | | | | | | | | | Beside the earlier fixed 'apt-cache show', 'showpkg' and 'search' deal with descriptions. 'showpkg' was fixed by fixing the cache generation for 'show', but 'search' still segfaulted. On the upside, it doesn't segfault any longer, on the downside, if a package has no description at all (aka: not in the Packages file and not in a Translation-* file) the package can't be found with 'search', even if we search only by name. That is a shortcoming in the code, but fixing it means rewriting it completely for dubious gain at best. So this commit just skips packages without a description and is done. Closes: 647590
* skip all Description fields in apt-cache, not just firstDavid Kalnischkies2013-07-181-1/+51
| | | | | | | | | | | | | | | | Given a Packages file like: […] Description: foo bar baz moo moo moo Multi-Arch: foreign Description-md5: 97e204a9f4ad8c681dbd54ec7c505251 […] We have to display the Multi-Arch flag field as well as the fields after the Description-md5, but not this field itself, as we already have one printed alongside the Description we display. Closes: 717254
* fix if-clause to generate hook-info for 'rc' packagesDavid Kalnischkies2013-07-161-0/+25
| | | | | | | | | The code incorrectly skips printing of current version information, if the package has no current version (for APT, but for dpkg as it is the case for packages which are removed but not purged) by using an unintended "else if" rather than an "if". Closes: 717006
* prevent MarkInstall of unsynced Multi-Arch:same siblingsDavid Kalnischkies2013-07-111-0/+100
| | | | | | | | | | | | | | | | | | | Multi-Arch: same packages can be co-installed, but need to have the same version for all installed packages (aka "siblings"). Otherwise the unsynced versions will fight against each other and the auto-install as wel as the problem resolver will later have to decide between holding the packages or to remove one of the siblings (usually a foreign) taking a bunch of packages (like the entire foreign setup) with them. The idea here is now to be more pro-active: MarkInstall will fail for a package if the siblings aren't synced, so we don't allow a situation in which a resolver has to decide if to hold or to remove-upgrade under the assumption that the remove-upgrade decision is always wrong and doesn't deserve to be explored (expect valid out-of-syncs of course). Thats a pretty bold move to take for a library which is used by different solvers so this check is done in IsInstallOk and can be overridden if front-ends want to.