summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* allow getaddrinfo flag AI_ADDRCONFIG to be disabledDavid Kalnischkies2015-11-042-1/+7
| | | | | | | | | This flags is generally handy to avoid having to deal with ipv6 results on an ipv4-only system, but it prevents e.g. the testcases from working if the testsystem has no configured address at the moment (expect loopback), so allow it to be sidestepped and let the testcases sidestep it. Git-Dch: Ignore
* wrap every unlink call to check for != /dev/nullDavid Kalnischkies2015-11-0420-59/+52
| | | | | | | | | | | | | | | | Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
* ensure FileFd doesn't try to open /dev/null as atomic and coDavid Kalnischkies2015-11-043-6/+44
| | | | | | | | | | The wrapping will fail in the best case and actually end up deleting /dev/null in the worst case. Given that there is no point in trying to write atomically to /dev/null as you can't read from it again just ignore these flags if higher level code ends up trying to use them on /dev/null. Git-Dch: Ignore
* ignore newlines in dpkg-deb control output for installing debsDavid Kalnischkies2015-11-042-4/+42
| | | | | | | | | | | Leading or trailing newlines can be confusing for our parser as it expects two newlines to start/stop a new stanza. To solve this the lines we wanna add are printed first, ignore any leading newlines and then add the stanza as provided by dpkg-deb with or without trailing newlines as the parser will look at the first stanza only anyway and removing trailing newlines is considerably harder to do. Closes: 802553
* support arch:all data e.g. in separate Packages fileDavid Kalnischkies2015-11-0441-180/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* reenable gcc warnings for deprecated functionsDavid Kalnischkies2015-11-043-5/+4
| | | | | | | | In the meantime the strange warnings disappeared, so we can get back to showing them – and fix the one occurance which creeped in in the meantime. Git-Dch: Ignore
* sanify API to get 'the' candidate versionDavid Kalnischkies2015-11-048-11/+56
| | | | | | | | | This was discussed a while ago on #debian-apt and now that I see myself making this mistake lets bite the bullet and fix it in the easy way out version: Using a new name which fits with a similar named setter and deprecate the old method instead of 'hostily' changing API. Closes: #803471
* centralize unlink checks in acquire-itemDavid Kalnischkies2015-11-041-16/+30
| | | | | | | | Removals in the acquire progress can be pretty important, so a failure should be silently ignored, so we wrap our unlink call in a slightly more forgiving wrapper checking things. Git-Dch: Ignore
* do not cleanup .diff/Index files on HitDavid Kalnischkies2015-11-041-0/+3
| | | | Git-Dch: Ignore
* revamp all tools help messagesDavid Kalnischkies2015-11-0468-18604/+18249
| | | | | | | | | | | | | | | | The general idea is: A small paragraph on the tool itself as a description, a list of the most used (!= all) commands available in the tool, a remark where to find more information on the tool and its commands (aka: in the manpage) and finally a common block referring to even more manpages. In exchange options are completely omitted from the output as well as deprecated or obscure commands. (Better) Information about them is available in the manpages anyway and the few options which were listed before were also the least interesting ones (-o -c -q and co are hardly of interest for someone totally new looking to find info by asking for help and anyone with a bit of experience doesn't need this short list. Those would need a list of options applying to the command they call, but they are too numerous and command specific to list them sanely in this context.
* show version and type in "apt (r)depends"David Kalnischkies2015-11-041-0/+2
| | | | | | We can't for compatibility reasons in apt-cache, but apt can. Closes: 218995
* hidden support more apt-get/apt-cache commands in aptDavid Kalnischkies2015-11-0411-1507/+1615
| | | | | | | | | | | | | | apt is supposed to be a user-friendly interface, so while these commands are usually poweruser material and therefore do not need to be shown in general introduction manpages/help messages its of no use to not allow users to use them. This includes clean, autoclean, build-dep, source, download, changelog, depends, rdepends and showsrc – it doesn't include more non-interactive commands like dump or xvcg as those are usually used by scripts if at all. Closes: 778234, 780700, 781237
* deal with --version more centrallyDavid Kalnischkies2015-11-0413-113/+44
| | | | Git-Dch: Ignore
* move apts cmdline helper type into -privateDavid Kalnischkies2015-11-0417-118/+57
| | | | | | | | Its not as simple as I initially thought to abstract this enough to make it globally usable, so lets not pollute global namespace with this for now. Git-Dch: Ignore
* generate commands array after config is loadedDavid Kalnischkies2015-11-0415-133/+187
| | | | | | | This ensures that location strings loaded from a location specified via configuration (Dir::Locale) effect the help messages for commands. Git-Dch: Ignore
* new quiet level -qq for apt to hide progress outputDavid Kalnischkies2015-11-0412-39/+51
| | | | | | | | | -q is for logging and -qqq (old -qq) basically kills every output expect errors, so there should be a way of declaring a middleground in which the output of e.g. 'update' isn't as verbose, but still shows some things. The test framework was actually making use of by accident as it ignored the quiet level in output setup for apt before. Eventually we should figure out some better quiet levels for all tools…
* deduplicate main methodsDavid Kalnischkies2015-11-0417-252/+159
| | | | | | | | All mains pretty much do the same thing, so lets try a little harder to move the common parts into -private to have the real differences more visible. Git-Dch: Ignore
* split up help messages for simpler reuseDavid Kalnischkies2015-11-0468-9104/+18729
| | | | | | | | | | | | | That is one huge commit with busy work only: Help messages used to be one big translateable string, which is a pain for translators and hard to reuse for us. This change there 'explodes' this single string into new string for each documented string trying hard to split up the translated messages as well. This actually restores many translations as previously adding a single command made all of the bug message fuzzy. The splitup also highlighted that its easy to forget a line, duplicate one and similar stuff. Git-Dch: Ignore
* disable updating insecure repositories in apt by defaultDavid Kalnischkies2015-11-045-20/+12
| | | | | | apt is an interactive command and the reasons we haven't this option set for everything is mostly in keeping compatibility for a little while longer to allow scripts to be changed if need be.
* revamp apt(8) to refer more instead of duplicatingDavid Kalnischkies2015-11-042-111/+114
| | | | | | As apt is targetted at users, lets try to make apt(8) for users as well by giving only a quick overview about what is available and some pointers for how to find a whole lot more details.
* move 'search' implementations as wellDavid Kalnischkies2015-11-046-220/+219
| | | | Git-Dch: Ignore
* centralize 'show' implementation of apt and apt-cacheDavid Kalnischkies2015-11-045-187/+177
| | | | | | | | | | The show commands have different styles in both binaries as the audience is potentially very different, but that doesn't mean we need to separate the implementation especially as they are slightly similar. This also allows us to switch between the different show versions at runtime via an option. Git-Dch: Ignore
* add binary-specific options via Binary scopeDavid Kalnischkies2015-11-046-2/+150
| | | | | | Especially with apt now, it can be useful to set an option only for apt and not for apt-get. Using a binary-specific subtree which is merged into the root seems like a simple enough trick to achieve this.
* suggest 'apt autoremove' to get right of unneeded packagesDavid Kalnischkies2015-11-0451-176/+200
| | | | | | | | | | The bugreport is more conservative in asking for a conditional, but given that this is a message intended to be read by users to be run by users we should suggest using a command intended to be used by users. And while we are at, add sudo to the message – conditional of course. Closes: 801571
* refer to apt-secure(8) in unsecure repositories warningDavid Kalnischkies2015-11-048-46/+160
| | | | | | The manpage is also slightly updated to work better as a central hub to push people from all angles into the right directions without writting a book disguised as an error message.
* rework errors and warnings around insecure repositoriesDavid Kalnischkies2015-11-046-32/+69
| | | | | | | | | | | | | | | | Insecure (aka unsigned) repositories are bad, period. We want to get right of them finally and as a first step we are printing scary warnings. This is already done, this commit just changes the messages to be more consistent and prevents them from being displayed if authenticity is guaranteed some other way (as indicated with trusted=yes). The idea is to first print the pure fact like "repository isn't signed" as a warning (and later as an error), while giving an explaination in a immediately following notice (which is displayed only in quiet level 0: so in interactive use, not in scripts and alike). Closes: 796549
* set failreasons similar to connect.cc based on curl errorsDavid Kalnischkies2015-11-041-3/+18
| | | | | | | | | | Detecting network errors has some benefits in the acquire system as if we can't connect to a host trying it for a million files is pointless. http and co which use connect.cc deal with this, but https which uses curl had connection failures as "normal" errors which could potentially be worked around (like trying Release instead of the failed InRelease). Git-Dch: Ignore
* revert accidental removal of documentation for trusted option in sources.listDavid Kalnischkies2015-11-041-0/+14
| | | | | | | | In b0d408547734100bf86781615f546487ecf390d9 I accidently removed the documentation for Trusted and replaced it with Signed-By instead of adding it. Git-Dch: Ignore
* add ConnectionTimedOut to transient failreasons listDavid Kalnischkies2015-11-041-6/+10
| | | | | | All other reasons from methods/connect.cc were already included. Git-Dch: Ignore
* support .deb files in upgrade operations as wellDavid Kalnischkies2015-11-047-44/+76
| | | | | | The main part is refactoring through to allow hiding the magic needed to support .deb files in deeper layers of libapt so that frontends have less exposure to Debian specific classes like debDebPkgFileIndex.
* show progress info while 'downloading' a local .deb fileDavid Kalnischkies2015-11-043-3/+17
| | | | | Showing just "Get: [1234 B]" looks very strange, so we now print the filename and as usual the package name, version and architecture.
* unbreak the copy-method claiming hashsum mismatch since ~exp9David Kalnischkies2015-11-046-44/+81
| | | | | | | | | | | | | | | | Commit 653ef26c70dc9c0e2cbfdd4e79117876bb63e87d broke the camels back in sofar that everything works in terms of our internal use of copy:/, but external use is completely destroyed. This is kinda the reverse of what happened in "parallel" in the sid branch, where external use was mostly fine, internal and external exploded on the GzipIndexes option. We fix this now by rewriting our internal use by letting copy:/ only do what the name suggests it does: Copy files and not uncompress them on-the-fly. Then we teach copy and the uncompressors how to deal with /dev/null and use it as destination file in case we don't want to store the uncompressed files on disk. Closes: 799158
* tests: ensure sponge-files are cleaned up properlyDavid Kalnischkies2015-11-041-0/+2
| | | | Git-Dch: Ignore
* tests: change test-skipping detection for arch-specific pkgsDavid Kalnischkies2015-11-041-8/+3
| | | | | | | | | | dpkg-checkbuilddeps changed its exitcodes in the recent past so the old check always fails now skipping the test. Lets try a slightly more stable (at least assume it to be) variant of detecting this. See also 4f6d26b4d41474aa390329b7e9cb167eb70b2821. Git-Dch: Ignore
* drop privileges in file:// method as we do for decompressorsDavid Kalnischkies2015-11-041-2/+12
| | | | | | | | | We drop it in decompressors, which are the natural next step, so if an archive is used which isn't worldreadable (= not accessible by _apt) it doesn't work anyway, so we just fail a bit earlier now and avoid all the bad things which can happen over file (which could very well still be a network resourc via NFS mounts or similar stuff, so hardly as safe as the name might suggest at first).
* allow all dpkg selections to be set via apt-mark and libaptDavid Kalnischkies2015-11-047-130/+297
| | | | | | As we have support for 'hold', we need support for undoing a hold which in effect means that we implemented most other states as well, just that they weren't exposed in the interface directly so far.
* provide public interface to hold/unhold packagesDavid Kalnischkies2015-11-047-153/+219
| | | | | | We had this code lying around in apt-mark for a while now, but other frontends need this (and similar) functionality as well, so its high time that we provide a public interface in libapt for this stuff.
* refactor dpkg execution in deb/debsystemDavid Kalnischkies2015-11-041-47/+61
| | | | | | We have a few places and there will be a few more still where we have to call dpkg to detect/set certain features or settings. Centralizing the calling infrastructure now seems like a good idea before we add another.
* switch 'apt-mark hold' from Pkg to Ver based operationDavid Kalnischkies2015-11-041-31/+18
| | | | | | | | | | | | | | Users hold a package foo (at version X) or try to prevent the installation of foo (usually based on the information they know about version X), even if we say that we "hold a package". Conceptionally we also need to know about which architecture we are talking and that is an information bound to a version (as a package can change architecture over time). We internally did this lookup from Pkg to Ver already, we just move this to a central place where the user has a change to influence it now. Git-Dch: Ignore
* add cacheset push_back wrapping for std::back_inserterDavid Kalnischkies2015-11-042-12/+34
| | | | | | | | | | | | As usual by now, not all containers wrapped by the cacheset containers support all methods, like push_back now, but they fail on use of these unusable methods only. Would be nice to not expose these methods for unsupporting containers at all, but that means either a lot of classes or a lot of std::enable_if magic, which seems like too big work for this small wrapper for now. Git-Dch: Ignore
* implement operator* for cacheset iteratorsDavid Kalnischkies2015-11-042-40/+58
| | | | | | | | | | | | | | | | Technically an abi-break as we change a template parameter to std::iterator for this, but this class is empty in all instances and just causes the right typedefs to be set – which were incorrect as detected by std::stable_partition as its implementation uses ::pointer and needs also a operator* implementation. In practice CacheSets have no external users (yet) and the difference is visible only at compile time (which was an error before and now works), not while linking. The changes to apt-mark are functionally identical to the code before, just that we use a std:: algorithm now instead of trying hard on our own.
* implement a public pkgSystem::ArchitecturesSupportedDavid Kalnischkies2015-11-045-83/+82
|
* implement a public pkgSystem::MultiArchSupportedDavid Kalnischkies2015-11-046-118/+131
| | | | | | Some codepaths need to check if the system (in our case usually dpkg) supports MultiArch or not. We had copy-pasted the check so far into these paths, but having it as a system check is better for reusability.
* travis: move 'make' into the install targetDavid Kalnischkies2015-11-041-1/+1
| | | | | | | This auto-collapses the output and doesn't run the tests if we compiling fails as a bonus. Git-Dch: Ignore
* Turkish program translation updateMert Dirik2015-11-041-84/+102
| | | | Closes: 802610
* configure.ac: Only require autoconf 2.68Julian Andres Klode2015-11-031-1/+1
| | | | | | This makes it compileable on the trusty travis-ci instance. Gbp-Dch: ignore
* configure.ac: Run autoupdateJulian Andres Klode2015-11-031-6/+9
| | | | Gbp-Dch: ignore
* thread-safety tests: Adjust path to listsJulian Andres Klode2015-10-301-3/+3
| | | | Gbp-Dch: ignore
* Provide tests for thread-safetyJulian Andres Klode2015-10-303-0/+101
| | | | | | | | | | | | | | | | | These scripts currently produce HTML output that is directly piped into an HTML file on alioth. There are three categories. The first two check external library calls to use the ones specified by POSIX to be thread-safe. The main profile excludes functions that are thread-safe on Linux or glibc in general, while the portable output strictly follows posix. The internal.html output lists internal function calls, such as configuration setting. This is supposed to be automated further at some point, so we can automatically check for regressions.
* orderlist: Replace qsort() by thread-safe std::sort()Julian Andres Klode2015-10-303-25/+20
| | | | Gbp-Dch: ignore