summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: try to support spaces in TMPDIRDavid Kalnischkies2015-09-1421-386/+392
| | | | | | | | Not all tests work yet, most notable the cdrom tests, but those require changes in libapt itself to have a proper fix and what we have fixed so far is good enough progress for now. Git-Dch: Ignore
* deal with spaces in path, command and filepaths in apt-keyDavid Kalnischkies2015-09-142-50/+69
| | | | | | | | Filenames we get could include spaces, but also the tmpdir we work in and the failures we print in return a very generic and unhelpful… Properly supporting spaces is a bit painful as we constructed gpg command before, which is now moved to (multilevel) calls to temporary scripts instead.
* tests: use SHA1 checksum only by default in testsDavid Kalnischkies2015-09-149-42/+52
| | | | | | | | | This is mostly a small speedup for the testcases, but it is also handy to document which tests actually deal with a specific hash compared to those which 'just' need some hash which can be important while adding new hashes. Git-Dch: Ignore
* add --sha512 option + documentation for apt-ftparchiveDavid Kalnischkies2015-09-142-4/+9
|
* use APT::FTPArchive hash settings as default for APT::FPArchive::$filetypeDavid Kalnischkies2015-09-141-1/+1
|
* do not generate bogus hashes if hash is disabled in apt-ftparchiveDavid Kalnischkies2015-09-141-4/+9
|
* do not ignore differently versioned self-providesDavid Kalnischkies2015-09-142-1/+53
| | | | Reported-By: Konomi on IRC
* various changes to increase test-coverageDavid Kalnischkies2015-09-1412-82/+115
| | | | | | | 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 apt-get source msg 'Please use: $vcs' for gitDavid Kalnischkies2015-09-1446-113/+101
| | | | | A bit unfair that only Bzr had this message. Lets at least print it for git as well with the option of adding more later without string changes.
* dereference redirect in Vcs-Browser URI to cgitDavid Kalnischkies2015-09-141-1/+1
| | | | Git-Dch: Ignore
* srv test: do 100 pulls twice and compare listDavid Kalnischkies2015-09-142-27/+65
| | | | | | | The previous implementation was still a bit unstable in terms of failing at times. Lets try if we have more luck with this one. Git-Dch: Ignore
* fix alloc-dealloc-mismatch (operator new [] vs operator delete)David Kalnischkies2015-09-141-4/+4
| | | | | Reported-By: gcc -fsanitize=address -fno-sanitize=vptr Git-Dch: Ignore
* fix two memory leaks reported by gccDavid Kalnischkies2015-09-147-24/+30
| | | | | Reported-By: gcc -fsanitize=address -fno-sanitize=vptr Git-Dch: Ignore
* use std-algorithms instead of manual loops to avoid overflow warningDavid Kalnischkies2015-09-142-21/+26
| | | | | | Reported-By: gcc Understandable: no Git-Dch: Ignore
* do not report deprecate warnings for the None declarationDavid Kalnischkies2015-09-141-0/+2
| | | | | | | | This is defined for compatibility, warning about it is intended, but only in places where it is actually used, rather than at the place we declare it for compatability… Git-Dch: Ignore
* move std=c++11 from CXXFLAGS to CXXDavid Kalnischkies2015-09-141-2/+2
| | | | | | | | Setting CXXFLAGS like --coverage on the commandline fails if we set the std too late, so if we set it with the compiler name we set it always first. A bit hacky as it bends the expectation, but seems to work. Git-Dch: Ignore
* fix 'Dead assignment' by dropping unneeded booleanDavid Kalnischkies2015-09-141-3/+1
| | | | | Reported-By: scan-build Git-Dch: Ignore
* tests: use more 'native' instead of 'amd64' if possibleDavid Kalnischkies2015-09-143-17/+11
| | | | | | | | | | The tests usually run on amd64 boxes, but once in a while I run it on a (slow) armel box as well, which has its fair share of problems with some tests, but at least the low hanging fruits can be dealt with: Do not assume that amd64 is the native dpkg architecture – instead use whatever dpkg thinks is native as architecture for the test. Git-Dch: Ignore
* avoid using global PendingError to avoid failing too often too soonDavid Kalnischkies2015-09-1422-88/+111
| | | | | | | | | | | | | | | | | | | Our error reporting is historically grown into some kind of mess. A while ago I implemented stacking for the global error which is used in this commit now to wrap calls to functions which do not report (all) errors via return, so that only failures in those calls cause a failure to propergate down the chain rather than failing if anything (potentially totally unrelated) has failed at some point in the past. This way we can avoid stopping the entire acquire process just because a single source produced an error for example. It also means that after the acquire process the cache is generated – even if the acquire process had failures – as we still have the old good data around we can and should generate a cache for (again). There are probably more instances of this hiding, but all these looked like the easiest to work with and fix with reasonable (aka net-positive) effects.
* use a less generic special trigger filename for stdinDavid Kalnischkies2015-09-144-6/+10
| | | | Git-Dch: Ignore
* include debug information in the autoremove-kernels fileDavid Kalnischkies2015-09-141-3/+23
| | | | | | | | Figuring out after the fact what went wrong in the kernel hook is kinda hart, also as the bugreports are usually very lacking on the details front. Collecting the internal variables in the debug output we attach to the generated file might help shine some light on the matter. It's at least not going to hurt…
* do not discard new manual-bits while applying EDSP solutionsDavid Kalnischkies2015-09-143-8/+13
| | | | | | | | | | | | | | In private-install.cc we call MarkInstall with FromUser=true, which sets the bit accordingly, but while applying the EDSP solution we call mark install on all packages with FromUser=false, so MarkInstall believes this install is an automatic one and sets it to auto – so that a new package which is explicitely installed via an external solver is marked as auto and is hence also up for garbage collection in a following call. Ideally MarkInstall wouldn't reset it, but the detection is hard to do without regressing in other cases – and ideally ideally MarkInstall wouldn't deal with the autobit at all – so we work around this on the calling side for now.
* implement autobit and pinning in EDSP solver 'apt'David Kalnischkies2015-09-146-14/+134
| | | | | | | | 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.
* remove incorrect optimization branchesDavid Kalnischkies2015-09-142-36/+6
| | | | | | | | | | | | These assumptions were once true, but they aren't anymore, so what is supposed to be a speed up is effectively a slowdown [not that it would be noticible]. Usage of SingleArchFindPkg was nuked in a stable update already as the included assumption was actually harmful btw, which is why we should get right of other 'non-harmful' but still untrue assumptions while we can. Git-Dch: Ignore
* select kernels to protect from autoremove based on Debian versionDavid Kalnischkies2015-09-143-90/+120
| | | | | | | | | | | | | | | | | | This is basically a rewrite of the script with the general idea of finding the Debian version of the installed kernels – as multiple flavours will have the same Debian version – select the two newest of them and translate them back to versions found in package names. This way we avoid e.g. kernel and kernel-rt to use up the protected slots even through they are basically the same kernel (just a different flavour) so it is likely that if kernel doesn't work for some reason, kernel-rt will not either. This also deals with foreign kernel packages, kernels on hold and partly installed kernels (in case multiple kernels are installed in the same apt run) in a hopefully sensible way. Closes: 787827
* copy ReadWrite-error to the bottom to make clang happyDavid Kalnischkies2015-09-141-1/+4
| | | | | | | | clang detects that fd isn't set in the ReadWrite case – just that this is supposed to be catched earlier in this method already, but it doesn't hurt to make it explicit here as well and clang is happy, too. Git-Dch: Ignore
* fix insecure use of /tmp in EDSP solver 'dump'David Kalnischkies2015-09-142-21/+41
| | | | | | | | | | | | 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
* implement CopyFile without using FileFd::Size()David Kalnischkies2015-09-141-13/+7
| | | | | | | | Pipes and such have no good Size value, but we still want to copy from it maybe and we don't really need size as we can just as well read as long as we get data out of a file to copy it. Git-Dch: Ignore
* add Source-Version field for EDSPDavid Kalnischkies2015-09-143-0/+8
| | | | | | 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-1417-78/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests: allow to run (selfbuilt) dpkg under gdbDavid Kalnischkies2015-09-141-4/+22
| | | | Git-Dch: Ignore
* M-A: allowed pkgs of unconfigured archs do not statisfy :anyDavid Kalnischkies2015-09-143-8/+96
| | | | | | We parse all architectures we encounter recently, which means we also parse packages from architectures which are neither native nor foreign, but still came onto the system somehow (usually via heavy force).
* store ':any' pseudo-packages with 'any' as architectureDavid Kalnischkies2015-09-143-5/+9
| | | | | | | | | | Previously we had python:any:amd64, python:any:i386, … in the cache and the dependencies of an amd64 package would be on python:any:amd64, of an i386 on python:any:i386 and so on. That seems like a relatively pointless endeavor given that they will all be provided by the same packages and therefore also a waste of space. Git-Dch: Ignore
* tests: refactor printing of the quiet failure headerDavid Kalnischkies2015-09-141-44/+29
| | | | Git-Dch: Ignore
* tests: store msgmsg message for display in fail as wellDavid Kalnischkies2015-09-141-1/+12
| | | | Git-Dch: Ignore
* tests: -y is the default on travis, but not on other ci'sDavid Kalnischkies2015-09-141-2/+2
| | | | Git-Dch: Ignore
* po: Sort domainsJulian Andres Klode2015-09-141-1/+1
| | | | | | This should make things even more predictable. Gbp-Dch: ignore
* Sort pot input filesMichael Vogt2015-09-122-3/+2
| | | | Git-Dch: ignore
* Use xgettext --no-location in make update-potMichael Vogt2015-09-121-0/+2
| | | | | This avoid the large diff we have that is mostly caused by the line numbers changing in the po/pot files.
* releasing package apt version 1.1~exp12Michael Vogt2015-09-1156-26125/+26962
|
* apt-pkg/tagfile.h: Include stdint.h, fixes rdep build failuresJulian Andres Klode2015-09-111-0/+1
|
* Set APT::FTPArchive::DoByHash to false by defaultMichael Vogt2015-09-072-3/+6
| | | | | | | | "apt-ftparchive release" will create the by-hash files if this mode is enabled. This maybe unexpected by existing users so make it a opt-in. Git-Dch: ignore
* Ensure that no by-hash file for "Release/InRelease is written"Michael Vogt2015-09-072-1/+18
| | | | | | Git-Dch: ignore Brown-paperbag: yes Thanks: Donkult
* Add support for writing by-hash dirs in apt-ftparchiveMichael Vogt2015-09-045-2/+219
| | | | | | | | | This option is enabled via the APT::FTPArchive::DoByHash switch. It will also honor the option APT::FTPArchive::By-Hash-Keep that controls how many previous generation of by-hash files should be kept (defaults to 3). Merged from https://github.com/mvo5/apt/tree/feature/apt-ftparchive-by-hash
* avoid triggering the c++11 erase api change on travisDavid Kalnischkies2015-09-021-2/+2
| | | | Git-Dch: Ignore
* tests: collect more details about failed checkdiffsDavid Kalnischkies2015-09-022-51/+30
| | | | Git-Dch: Ignore
* use clock() as source for SRV randomnessDavid Kalnischkies2015-09-014-46/+50
| | | | | | | | | | | | | | | Initializing a random number generator with the time since epoch could be good enough, but reaches its limits in test code as the 100 iterations might very well happen in the same second and hence the seed number is always the same… clock() has a way lower resolution so it changes more often and not unimportant: If many users start the update at the same time it isn't to unlikely the SRV record will be ordered in the same second choosing the same for them all, but it seems less likely that the exact same clock() time has passed for them. And if I have to touch this, lets change a few other things as well to make me and/or compilers a bit happier (clang complained about the usage of a GNU extension in the testcase for example).
* use unusable-for-security hashes for integrity checksDavid Kalnischkies2015-09-015-26/+85
| | | | | | | We want to declare some hashes as not enough for security, so that a user will need --allow-unauthenticated or similar to get data secured only by those hashes, but we can still us these hashes for integrity checks if we got them.
* Consider md5sum no longer a usable hashMichael Vogt2015-09-0111-39/+52
| | | | | The md5sum hash is broken since some time and we should no longer consider it a usable hash. Also update the tests to reflect this.
* improve CheckDropPrivsMustBeDisabled furtherDavid Kalnischkies2015-09-013-16/+40
| | | | | | | Various smaller improvements so that the check deals better with already downloaded files, relative paths and other things. Git-Dch: Ignore