summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* CopyFile: avoid failing on EOF on some systemsPino Toscano2015-12-191-1/+1
| | | | | | | | | On EOF, ToRead will be 0, which might trigger on some systems (e.g. on the Hurd) an error due to the invalid byte count passed to write(). The whole loop already checks for ToRead != 0, so perform the writing step only when there was actual data read. Closes: #808381
* CopyFile: fix BufSize to a sane valuePino Toscano2015-12-191-2/+2
| | | | | | | | | | | | | | Commit e977b8b9234ac5db32f2f0ad7e183139b988340d tries to make BufSize calculated based on the size of the buffer; the problem is that std::unique_ptr::size() returns a pointer to the data, so sizeof() equals to the size of a pointer (later divided by sizeof(char), which is 1). The result is that the CopyFile copies in chunks of 8 bytes, which is not exactly ideal... As solution, declare BufSize in advance, and use its value to allocate the Buf array. Closes: #808381
* Fix FileUtlTest.GetTempDir failure when run as rootPino Toscano2015-12-191-3/+7
| | | | | | | | | | | Testing /usr as TMPDIR assumes that GetTempDir() cannot use it because it cannot write to it; this is true for non-root users, but not so much for root. Since root can access everything, perform this particular test case only when not running as root. Closes: #808383
* Release 1.1.51.1.5Julian Andres Klode2015-12-1458-279/+924
|
* test-apt-download-progress: Run the https test multiple timesJulian Andres Klode2015-12-141-2/+7
| | | | | This filters out errors due to timing issues. Early exits if enough pulses occured.
* pkgcache: Make hash arch-independent using fixed size integerJulian Andres Klode2015-12-142-3/+3
| | | | | | | | This helps writing test cases. Also adapt the test case that expected 64-bit. Nothing changes performance wise, the distribution of the hash values remains intact.
* debian/apt.auto-removal.sh: Adjust -dbg exclusion for multi-archJulian Andres Klode2015-12-141-2/+1
| | | | Allow an optional colon followed by anything at the end.
* tagfile: Hardcode error message for out of range integer valuesJulian Andres Klode2015-12-142-5/+4
| | | | | | This makes the test suite work on 32 bit-long platforms. Gbp-Dch: ignore
* test framework: More noopchroot fixesJulian Andres Klode2015-12-141-6/+11
| | | | | | | | | | | Use asprintf() so we have easy error detection and do not depend on PATH_MAX. Do not add another separator to the generated path, in both cases the path inside the chroot is guaranteed to have a leading / already. Also pass -Wall to gcc.
* test framework: Unset no_proxy as wellJulian Andres Klode2015-12-141-1/+1
| | | | | | This caused test-bug-717891-abolute-uris-for-proxies to fail Gbp-Dch: ignore
* test framework: Unset http proxy variables in setupenvironmentJulian Andres Klode2015-12-141-0/+1
| | | | | | This breaks a lot of test cases Gbp-Dch: ignore
* test framework: Correctly generate new paths in noopchrootJulian Andres Klode2015-12-141-6/+5
| | | | | | The allocated buffer was one byte too small. Allocate a buffer of PATH_MAX instead and use snprintf(), as suggested by Martin Pitt.
* test-apt-download-progress: Limit rate to 600kJulian Andres Klode2015-12-141-2/+2
| | | | | | This reduces the chance that the test fails. Gbp-Dch: ignore
* test-apt-download-progress: Allow smaller progress changeJulian Andres Klode2015-12-141-1/+1
| | | | | | | Instead of checking for [10%, 100%), check for (0%, 100%), that is everything < 100% and >0%. Gbp-Dch: ignore
* test-sourceslist-lang-plusminus-options: Use amd64 architectureJulian Andres Klode2015-12-141-1/+1
| | | | | | This should make the test work on non-amd64 systems Gbp-Dch: ignore
* tests: Depend on libfile-fcntllock-perl to shut up dpkg-gencontrolJulian Andres Klode2015-12-141-1/+2
| | | | | | | | | | | Ubuntu's autopkgtest server always prints dpkg-gencontrol: warning: File::FcntlLock not available; using flock which is not NFS-safe which is somewhat annoying. Work around that by depending on that perl stuff for the test suite. Gbp-Dch: ignore
* non-existing directories don't need to be cleanedDavid Kalnischkies2015-12-144-10/+50
| | | | | | | | | | Trying to clean up directories which do not exist seems rather silly if you think about it, so let apt think about it and stop it. Depends a bit on the caller if this is fixing anything for them as they might try to acquire a lock or doing other clever things as apt does. Closes: 807477
* support regex and co in 'apt-cache policy $pkg' againDavid Kalnischkies2015-12-142-1/+10
| | | | | | | | | | Regression of 1e064088bf7b3e29cd36d30760fb3e4143a1a49a (1.1~exp4) which moved code around and renamed methods heavily ending up calling the wrong method matching packagenames only instead of calling the full array. Most commands work with versions, so this managed to fly under the radar for quite a while. Closes: 807870
* show a more descriptive error for weak Release filesDavid Kalnischkies2015-12-144-4/+78
| | | | | | | | | | | | | | If we can't work with the hashes we parsed from the Release file we display now an error message if the Release file includes only weak hashes instead of downloading the indexes and failing to verify them with "Hash Sum mismatch" even through the hashes didn't mismatch (they were just weak). If for some (unlikely) reason we have got weak hashes only for individual targets we will show a warning to this effect (again, befor downloading and failing the index itself). Closes: 806459
* redirect which stderr to /dev/null for consistencyDavid Kalnischkies2015-12-141-5/+5
| | | | | | | | | | | | | | | | The "standard" which (debianutils) has no output whatsoever on stderr, bash and dash which use this implementation therefore haven't either. In zsh 'which' is a shell built-in – and has no stderr output either, it does print an error message on stdout… So, realistically, a redirection isn't needed at all, but it also can't hurt (<- I have said that before in this context ->) so why not for consistency with… well, not with "command -v" as that hasn't an error message either. Lets say for consistency with my mental image of shell, as I am still a bit puzzled by zsh's which and now could imagine even more strange things in other shells. Closes: 807373
* mention APT::AutoRemove::{Recommends,Suggests}Important optionAndreas Metzler2015-12-141-0/+3
| | | | Closes: 807413
* fix incorrect Korean translation of "manually" and "automatically"Seo Sanghyeon2015-12-141-6/+6
| | | | | | | | | | | Korean translation update is attached. I downloaded the original from https://www.debian.org/international/l10n/po/ko. Originally, "manually" and "automatically" were translated same, which was confusing. Mail-Reference: <CAPrzcnL_YynHQkCSE4xH29eW1O0Q6SPhoSf21KOFTu=Vv6-0Nw@mail.gmail.com> Mail-Archive: https://lists.debian.org/deity/2015/12/msg00108.html
* parse .diff/Index hashes in reverse orderDavid Kalnischkies2015-12-131-3/+11
| | | | | | | | | | | | | | | | Reversing the parsing order ensures that we parse weaker hashes (like SHA1) before we touch newer/stronger hashes (like SHA256) as the weaker ones will usually be there for a longer time already with data already present, which we would discard if we start with the strong one first. The discarding is visible in the debug logs: File X wasn't in the list for the first parsed hash! (history) File X wasn't in the list for the first parsed hash! (patches) which if file X is part of the patch-path means apt will not find a path and fallback to acquire the whole file instead needlessly. If file X isn't part of the patch-path that is no problem, so that effects only the update-call which updates with patches coming from before and after the addition of a new hash.
* fix typos and docs in GlobalError documentationDavid Kalnischkies2015-12-131-10/+9
| | | | | Reported-By: Manuel A. Fernandez Montecelo <mafm@debian.org> Git-Dch: Ignore
* update symbols files to 1.1.4 state of affairsDavid Kalnischkies2015-12-131-0/+5
|
* check library was built before comparing with symbols fileDavid Kalnischkies2015-12-131-2/+7
| | | | Git-Dch: Ignore
* .travis.yml: Switch to new trusty machinesJulian Andres Klode2015-12-111-3/+1
| | | | | | Yay, newer server Gbp-Dch: ignore
* mmap: Define _DEFAULT_SOURCE instead of _BSD_SOURCEJulian Andres Klode2015-12-111-1/+1
| | | | | | Fixes a warning reported by gcc. Gbp-Dch: ignore
* apt-internal-solver: Make ShowHelp() and GetCommands() staticJulian Andres Klode2015-12-111-2/+2
| | | | | | This fixes a warning reported by gcc. Gbp-Dch: ignore
* Bump cache minor version to 2 to trigger rebuildsJulian Andres Klode2015-12-111-1/+1
| | | | | | | | With the package names now normalized to lower case, the caches of affected systems need to be rebuild. Adjust the minor version to trigger such a rebuild. Gbp-Dch: ignore
* Convert package names from Packages files to lower caseJulian Andres Klode2015-12-113-2/+34
| | | | | | | | | dpkg does that when reading package files, so we should do the same. This only deals with parsing names from binary package paragraphs, it does not look at source package names and/or the list of binaries in a dsc file. Closes: #807012
* test: Fix testcases relying on mixed case package namesJulian Andres Klode2015-12-111-23/+23
| | | | Gbp-Dch: ignore
* Do not swap required and important in pkgCache::Priority()Julian Andres Klode2015-12-103-2/+18
| | | | | | | | required and important were swapped, leading to wrong output. Closes: #807523 Thanks: Manuel A. Fernandez Montecelo for discovering this
* Release 1.1.41.1.4Julian Andres Klode2015-12-0758-1505/+1527
|
* Use 0llu instead of 0ull in one place tooJulian Andres Klode2015-12-071-1/+1
| | | | Gbp-Dch: ignore
* Avoid overflow when summing up file sizesJulian Andres Klode2015-12-072-4/+4
| | | | | | | We need to pass 0llu instead of 0 as the init value, otherwise std::accumulate will calculate with ints. Reported-by: Raphaël Hertzog
* part revert, part redo 'which' replacementDavid Kalnischkies2015-12-073-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In e75e5879 'replace "which" with "command -v" for portability' I missed that command -v isn't actually required to be available in debian, so for the 5 files we are using it: Two (abicheck/run_abi_test & test/integration/framework) are called in environments were I believe sh is at least dash or 'better' as the first one is "interactive" for apt developers and the later is sourced by ~200 tests in the same directory run by hand and ci-services – for the later we have pulled some uglier hacks for worser things already, so if there should actually end up needing something more compatible we will notice eventually (and the later actually had a command -v call for some time already and nobody came running). debian/rules and debian/apt.cron.daily I switched back to which as that is more or less debian-specific or at least highly non-critical. That leaves cmdline/apt-key.in with a bunch of calls where I will implement that functionality in shell as this is relatively short-lived as it is used to detect wget (for net-update, which Michael wants to revive and in that process will properly use apt-helper instead of wget) and to detect gpg vs. gpg2 systems, where the earlier is supposed to go away in the longrun (or the later, but by replacing the earlier…). [and this gpg/gpg2 detection is new in sid, so I have some sympathy for that being a problem now.] Thanks: Jakub Wilk for pointing out #747320
* replace run-parts with find|sort to avoid debianutils usageDavid Kalnischkies2015-12-062-2/+2
| | | | | | | After e75e5879 the reason for an implicit dependency on debianutils (which is essential for debian, but likely not on other systems) was just two uses of run-parts, which can be replaced with the a lot more portable find-piped-into-sort duo.
* replace "which" with "command -v" for portabilityDavid Kalnischkies2015-12-065-15/+15
| | | | | | | | which is a debian specific tool packaged in debianutils (essential) while command is a shell builtin defined by POSIX. Closes: 807144 Thanks: Mingye Wang for the suggestion.
* apt-helper.cc: include <stdlib.h> for atoiFredrik Fornwall2015-12-061-0/+2
| | | | | | | Include <stdlib.h> to ensure that atoi(3) is defined to improve general portability and fix a specific build failure on Android. Closes: 807031
* use @CHANGEPATH@ as placeholder in changelog URI templatesDavid Kalnischkies2015-12-0217-29/+29
| | | | | | | | | This should make it more obvious that CHANGEPATH is a placeholder which apt will replace with a package specific path rather than a string constant. Mail-Reference: <87d1upgvaf.fsf@deep-thought.43-1.org> Mail-Archive: https://lists.debian.org/debian-dak/2015/12/msg00005.html
* tests: apt build-dep actually reports no depends correctlyDavid Kalnischkies2015-12-022-2/+14
| | | | | | | | | | 'Regression' of 7d19ee92f2368a40e739cb27d22d6d28f37ebf45, just that it now works more as expected than previously. Of course, build-essentials are implicitly also build dependencies, so by definition all packages have build dependencies, but that isn't what this message wants to say and it isn't what the user expects. Git-Dch: Ignore
* require explicit paths to dsc/control as we do for deb filesDavid Kalnischkies2015-12-016-60/+108
| | | | | | | | | | | | | | Otherwise a user is subject to unexpected content-injection depending on which directory she happens to start apt in. This also cleans up the code requiring less implementation details in build-dep which is always good. Technically, this is an ABI break as we override virtual methods, but that they weren't overridden was a mistake resulting in pure classes, which shouldn't be pure, so they were unusable – and as they are new in 1.1 nobody is using them yet (and hopefully ever as they are borderline implementation details). Closes: 806693
* deal with configured build-essential firstDavid Kalnischkies2015-12-011-16/+23
| | | | | | | There is no need to check configured build-essentials for each package, doing it once at the start ought to be enough. Git-Dch: Ignore
* split build-dep satisfier loop out of DoBuildDepDavid Kalnischkies2015-12-011-292/+302
| | | | | | | Lets do this non-behaviour change before we modify the source for real as the reflow and moving would otherwise hide all the interesting changes. Git-Dch: Ignore
* add a apt breaks (apt-utils << 1.1.3) for partial-upgradesDavid Kalnischkies2015-12-011-1/+1
| | | | | | | | You could think a0bf789783ea283914d059aea0f4d0f77d6bbaaf would be enough, but it turns out its only half of the puzzle. Closes: 806765 Suggested-By: Julian Andres Klode <jak@debian.org>
* defaults.mak: Set LC_COLLATE=C.UTF-8 for reproducible sort orderJulian Andres Klode2015-11-301-0/+3
| | | | | | | With the 1.1.3 release we have seen some re-ordering of the translation template and the translations. It turns out that this is because sort sorts differently depending on the locale, so let's force it to always sort in the C locale.
* release 1.1.31.1.3Michael Vogt2015-11-3057-4805/+4818
| | | | Git-dch: ignore
* add apt-utils Depends apt (= ${binary:Version})David Kalnischkies2015-11-291-1/+1
| | | | | | As we ship some tools in apt-utils which depend on our private library we have to ensure that apt-utils depends on a proper apt version. An exact version is probably a bit much, but the simplest way out.
* drop some needlessly public declarations in libapt-privateDavid Kalnischkies2015-11-2915-32/+29
| | | | Git-Dch: Ignore