summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | fix file ownership tests to work on kfreebsdDavid Kalnischkies2014-11-185-9/+16
| | | | | | | | | | | | While on linux files are created in /tmp with $USER:$USER, on my kfreebsd testmachine they are created with $USER:root, so we pull some strings here to make it work on both.
* | create our cache and lib directory always with mode 755David Kalnischkies2014-11-185-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | We autocreate for a while now the last two directories in /var/lib/apt/lists (similar for /var/cache/apt/archives) which is very nice for systems having any of those on tmpfs or other non-persistent storage. This also means though that this creation is effected by the default umask, so for people with aggressive umasks like 027 the directories will be created with 750, which means all non-root users are left out, which is usually exactly what we want then this umask is set, but the cache and lib directories contain public knowledge. There isn't any need to protect them from viewers and they render apt completely useless if not readable.
* | create directory for extended_states if neededDavid Kalnischkies2014-11-181-1/+3
| | | | | | | | | | Unlikely perhaps, but there is no guarantee that the directory we want to drop the file into actually exists, so create it if we must.
* | various small additional tests and testcasesDavid Kalnischkies2014-11-1812-19/+263
| | | | | | | | | | | | | | | | | | Usually they don't provide a lot in terms of what they test, but they help in covering many lines from strictly anecdotal commands (stats, moo) and error messages, so that stuff which really needs to be tested, but isn't is better visible in coverage reports. Git-Dch: Ignore
* | disable the lock disabling in the testsDavid Kalnischkies2014-11-094-5/+7
| | | | | | | | | | | | | | We create our own directories here and work without root in them, so we can also test the locking with them as it is how we usually operate. Git-Dch: Ignore
* | use pkgAcquire::GetLock instead of own codeDavid Kalnischkies2014-11-092-20/+4
| | | | | | | | | | | | | | | | | | Do the same with less code in apt-get. This especially ensures that the lock file (and the parent directories) exist before we are trying to lock. It also means that clean now creates the directories if they are missing so we returned to a proper clean state now. Git-Dch: Ignore
* | use getline() instead of rolling our ownDavid Kalnischkies2014-11-091-26/+5
| | | | | | | | | | | | | | | | We use it in other places already as well even though it is farly new addition to the POSIX family with 2008, but rolling our own here is really something which should be avoided in such a important method. Git-Dch: Ignore
* | allow uninstalled packages to be put on holdDavid Kalnischkies2014-11-092-6/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | dpkg wants to know about a package before it can be put on hold, so we have to at least hint about its existance in the available file it "maintaince" to know about such stuff. The simple thing would probably be to just feed all Packages files into dpkg as well, but what would be the point really? Exactly, so we take a shortcut here and just create dummies in the available file if we need to which isn't going to be that common as usually you are holding packages back and not off. Who would have thought that a simple feature like setting a package on hold requires more than 200 lines of code… at least with the testcase it is now explicitly tested code.
* | fix test to not spoil output with warningsDavid Kalnischkies2014-11-091-18/+39
| | | | | | | | Git-Dch: Ignore
* | enhance apt-extracttemplates testDavid Kalnischkies2014-11-092-22/+48
| | | | | | | | | | | | | | | | | | The tool checks for debconf version before printing the info it extracts, so that it doesn't extract data which can't be interpreted before debconf is upgraded. It is only fair to check for this behaviour in the tests. Git-Dch: Ignore
* | use the same code to detect quiet setting in all toolsDavid Kalnischkies2014-11-098-86/+63
| | | | | | | | Git-Dch: Ignore
* | streamline display of --help in all toolsDavid Kalnischkies2014-11-0921-190/+149
| | | | | | | | | | | | | | By convention, if I run a tool with --help or --version I expect it to exit successfully with the usage, while if I do call it wrong (like without any parameters) I expect the usage message shown with a non-zero exit.
* | fix variable naming typo used in debug outputDavid Kalnischkies2014-11-082-6/+6
| | | | | | | | Git-Dch: Ignore
* | restore ABI of pkgTagSectionDavid Kalnischkies2014-11-083-43/+87
| | | | | | | | | | | | | | | | We have a d-pointer available here, so go ahead and use it which also helps in hidding some dirty details here. The "hard" part is keeping the abi for the inlined methods so that they don't break – at least not more than before as much of the point beside a speedup is support for more than 256 fields in a single section.
* | revert useless abibreak in sourceslist.hDavid Kalnischkies2014-11-081-14/+10
| | | | | | | | | | | | | | | | No idea what the intension was here, but it seems like a leftover from a workover which happened to be done differently later. As it doesn't provide anything at the moment we just revert to the previous abi here. Git-Dch: Ignore
* | guard pkg/grp hashtable creation changesDavid Kalnischkies2014-11-084-45/+118
| | | | | | | | | | | | | | | | | | The change itself is no problem ABI wise, but the remove of the old undynamic hashtables is, so we bring it back for older abis and happily use the now available free space to backport more recent additions like the dynamic hashtable itself. Git-Dch: Ignore
* | explicit overload methods instead of adding parametersDavid Kalnischkies2014-11-0812-11/+97
| | | | | | | | | | | | | | | | Adding a new parameter (with a default) is an ABI break, but you can overload a method, which is "just" an API break for everyone doing references to this method (aka: nobody). Git-Dch: Ignore
* | guard const-ification API changesDavid Kalnischkies2014-11-086-1/+85
| | | | | | | | Git-Dch: Ignore
* | guard ABI changes for SourcePkg/Ver in pkgCacheDavid Kalnischkies2014-11-087-5/+73
| | | | | | | | Git-Dch: Ignore
* | mark internal interfaces as hiddenDavid Kalnischkies2014-11-0817-497/+72
| | | | | | | | | | | | | | We have a bunch of classes which are of no use for the outside world, but were still exported and so needed to preserve ABI/API. Marking them as hidden to not export them any longer is a big API break in theory, but in practice nobody is using them – as if they would its a bug.
* | better non-virtual metaIndex.LocalFileName() implementationDavid Kalnischkies2014-11-086-50/+51
| | | | | | | | | | | | | | | | We can't add a new virtual method without breaking the ABI, but we can freely add new methods, so for older ABIs we just implement this method with a dynamic_cast, so that clients can be more ignorant about the API here and especially don't need to pull a very dirty trick by assuming internal knowledge (like apt-get did here).
* | guard ABI changes for LFS in apt-instDavid Kalnischkies2014-11-086-4/+49
| | | | | | | | Git-Dch: Ignore
* | use a abi version check similar to the gcc checkDavid Kalnischkies2014-11-0810-19/+20
| | | | | | | | Git-Dch: Ignore
* | replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies2014-11-0813-236/+76
| | | | | | | | | | | | | | | | | | For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore
* | (style) Variable 'res' is assigned a value that is never usedDavid Kalnischkies2014-11-081-13/+16
| | | | | | | | | | | | | | | | Checking the return value of this (and many other calls) in this testcase is a good idea, so we do it now. Reported-By: cppcheck Git-Dch: Ignore
* | Division by result of sizeof(). memset() expects a size in bytesDavid Kalnischkies2014-11-081-2/+7
| | | | | | | | | | | | | | | | | | "did you intend to multiply instead?" is what cppcheck helpful says and it is absolutely right. Doesn't make a whole lot of a difference though as we are talking about 'char' in this testcase, but just to be sure. Reported-By: cppcheck Git-Dch: Ignore
* | Assert statement calls a function which may have desired side effects: ↵David Kalnischkies2014-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | 'pos_is_okay' It does not have any desired sideeffect, so we just mark it as const to properly advertise this fact to developer, compiler and linter alike. Reported-By: cppcheck Git-Dch: Ignore
* | (error) va_list 'args' was opened but not closed by va_end()David Kalnischkies2014-11-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The manpage of va_start and co additionally says: On some systems, va_end contains a closing '}' matching a '{' in va_start, so that both macros must occur in the same function, and in a way that allows this. So instead of return/breaking instantly, we save the return, make a proper turndown with va_end in all cases and only end after that. Reported-By: cppcheck Git-Dch: Ignore
* | tests: silence clang on uninitilized variablesDavid Kalnischkies2014-11-082-2/+3
| | | | | | | | | | | | | | | | The testcases have far worse problems if these ever end up being NULL and/or are not given a value by the method called, but clang is right to warn about it, just that we don't want to fix it in testcases… Git-Dch: Ignore
* | reenable patchsize limit option for pdiffsDavid Kalnischkies2014-11-082-1/+35
| | | | | | | | | | | | | | | | One word: "doh!" Commit f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d disabled the check to prevent apt from downloading bigger patches than the index it tries to patch. Happens rarly of course, but still. Detected by scan-build complaining about a dead assignment. To make up for the mistake a test is included as well.
* | releasing package apt version 1.1~exp8Michael Vogt2014-11-061-0/+21
| |
* | Run ./prepare-release pre-exportMichael Vogt2014-11-0655-50476/+53220
| | | | | | | | Git-dch: ignore
* | Update symbols fileMichael Vogt2014-11-061-10/+1
| | | | | | | | Git-Dch: ignore
* | Merge remote-tracking branch 'mvo/feature/no-more-acquire-guessing' into ↵Michael Vogt2014-11-068-204/+55
|\ \ | | | | | | | | | debian/experimental
| * \ Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2014-11-0641-341/+868
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | feature/no-more-acquire-guessing Conflicts: apt-pkg/acquire-item.cc
| * | | apt-pkg/deb/debindexfile.{cc,h}: kill GetIndexes()Michael Vogt2014-11-052-14/+0
| | | |
| * | | test/integration/test-bug-624218-Translation-file-handling: clarify when ↵Michael Vogt2014-11-051-1/+2
| | | | | | | | | | | | | | | | Translation-* is guessed
| * | | Only support Translation-* that are listed in the {In,}Release fileMichael Vogt2014-10-295-174/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle Translation-* files exactly like Packages files (with the expection that it is ok if a download of them fails). Remove all "guessing" on apts side. This will elimimnate a bunch of errors releated to captive portals and similar. Its also more correct and removes another potential attack vector.
* | | | Bump ABI to 4.15Michael Vogt2014-11-054-2/+2
| | | |
* | | | prepare ABI for feature/socketpairMichael Vogt2014-11-052-0/+6
| | | |
* | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-11-053-4/+39
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| Conflicts: debian/changelog
| * | Fix incorrect comparison between signed/unsignedMichael Vogt2014-10-231-1/+1
| | | | | | | | | | | | Git-Dch: ignore
| * | Use sysconf(_SC_ARG_MAX) to find the size of Dpkg::MaxArgBytesMichael Vogt2014-10-231-2/+21
| | | | | | | | | | | | | | | Instead of hardcoding Dpkg::MaxArgBytes find out about it using the sysconf(_SC_ARG_MAX) call.
| * | doc/examples/configure-index: make "Dpkg::Max{Arg,ArgBytes} match realityMichael Vogt2014-10-221-2/+2
| | | | | | | | | | | | Git-Dch: ignore
| * | releasing package apt version 1.0.9.3Michael Vogt2014-10-151-0/+16
| | |
* | | test/integration/test-apt-update-filesize-mismatch: use "basename file ↵Michael Vogt2014-11-041-1/+1
| | | | | | | | | | | | suffix" instead of -s for compatibility with older systems
* | | apt-pkg/acquire-item.h: make friend declaration compatible with older gccMichael Vogt2014-11-041-1/+1
| | |
* | | Call "Dequeue()" for items in AbortTransaction() to fix raceMichael Vogt2014-11-042-0/+5
| | | | | | | | | | | | | | | | | | The pkgAcquire::Run() code works uses a while(ToFetch > 0) loop over the items queued for fetching. This means that we need to Deqeueue the item if we call AbortTransaction() to avoid a hang.
* | | move permission changing from -item to -workerDavid Kalnischkies2014-10-262-45/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The worker is the part closest to the methods, which will call the item methods according to what it gets back from the methods, it is therefore a better place to change permissions as it is very central and can do it now at the point the item is assigned to a method rather than then it is queued for download (and as before while dequeued via Done/Failure). Git-Dch: Ignore
* | | tests: enhance output of grep and test failsDavid Kalnischkies2014-10-266-42/+64
| | | | | | | | | | | | Git-Dch: Ignore