summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-04move apts cmdline helper type into -privateDavid Kalnischkies
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
2015-11-04generate commands array after config is loadedDavid Kalnischkies
This ensures that location strings loaded from a location specified via configuration (Dir::Locale) effect the help messages for commands. Git-Dch: Ignore
2015-11-04new quiet level -qq for apt to hide progress outputDavid Kalnischkies
-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…
2015-11-04deduplicate main methodsDavid Kalnischkies
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
2015-11-04split up help messages for simpler reuseDavid Kalnischkies
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
2015-11-04disable updating insecure repositories in apt by defaultDavid Kalnischkies
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.
2015-11-04revamp apt(8) to refer more instead of duplicatingDavid Kalnischkies
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.
2015-11-04move 'search' implementations as wellDavid Kalnischkies
Git-Dch: Ignore
2015-11-04centralize 'show' implementation of apt and apt-cacheDavid Kalnischkies
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
2015-11-04add binary-specific options via Binary scopeDavid Kalnischkies
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.
2015-11-04suggest 'apt autoremove' to get right of unneeded packagesDavid Kalnischkies
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
2015-11-04refer to apt-secure(8) in unsecure repositories warningDavid Kalnischkies
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.
2015-11-04rework errors and warnings around insecure repositoriesDavid Kalnischkies
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
2015-11-04set failreasons similar to connect.cc based on curl errorsDavid Kalnischkies
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
2015-11-04revert accidental removal of documentation for trusted option in sources.listDavid Kalnischkies
In b0d408547734100bf86781615f546487ecf390d9 I accidently removed the documentation for Trusted and replaced it with Signed-By instead of adding it. Git-Dch: Ignore
2015-11-04add ConnectionTimedOut to transient failreasons listDavid Kalnischkies
All other reasons from methods/connect.cc were already included. Git-Dch: Ignore
2015-11-04support .deb files in upgrade operations as wellDavid Kalnischkies
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.
2015-11-04show progress info while 'downloading' a local .deb fileDavid Kalnischkies
Showing just "Get: [1234 B]" looks very strange, so we now print the filename and as usual the package name, version and architecture.
2015-11-04unbreak the copy-method claiming hashsum mismatch since ~exp9David Kalnischkies
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
2015-11-04tests: ensure sponge-files are cleaned up properlyDavid Kalnischkies
Git-Dch: Ignore
2015-11-04tests: change test-skipping detection for arch-specific pkgsDavid Kalnischkies
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
2015-11-04drop privileges in file:// method as we do for decompressorsDavid Kalnischkies
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).
2015-11-04allow all dpkg selections to be set via apt-mark and libaptDavid Kalnischkies
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.
2015-11-04provide public interface to hold/unhold packagesDavid Kalnischkies
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.
2015-11-04refactor dpkg execution in deb/debsystemDavid Kalnischkies
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.
2015-11-04switch 'apt-mark hold' from Pkg to Ver based operationDavid Kalnischkies
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
2015-11-04add cacheset push_back wrapping for std::back_inserterDavid Kalnischkies
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
2015-11-04implement operator* for cacheset iteratorsDavid Kalnischkies
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.
2015-11-04implement a public pkgSystem::ArchitecturesSupportedDavid Kalnischkies
2015-11-04implement a public pkgSystem::MultiArchSupportedDavid Kalnischkies
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.
2015-11-04travis: move 'make' into the install targetDavid Kalnischkies
This auto-collapses the output and doesn't run the tests if we compiling fails as a bonus. Git-Dch: Ignore
2015-11-04Turkish program translation updateMert Dirik
Closes: 802610
2015-11-03configure.ac: Only require autoconf 2.68Julian Andres Klode
This makes it compileable on the trusty travis-ci instance. Gbp-Dch: ignore
2015-11-03configure.ac: Run autoupdateJulian Andres Klode
Gbp-Dch: ignore
2015-10-30thread-safety tests: Adjust path to listsJulian Andres Klode
Gbp-Dch: ignore
2015-10-30Provide tests for thread-safetyJulian Andres Klode
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.
2015-10-30orderlist: Replace qsort() by thread-safe std::sort()Julian Andres Klode
Gbp-Dch: ignore
2015-10-30algorithms: Replace qsort() by thread-safe std::sort()Julian Andres Klode
Gbp-Dch: ignore
2015-10-30dpkgpm: Convert users of localtime() to localtime_r()Julian Andres Klode
The former is not thread-safe, whereas the latter is. Gbp-Dch: ignore
2015-10-30cacheset: Fix compilation on new GCC in C++98 modeJulian Andres Klode
Since gcc 4.9, the API for erase slightly changed. In commit 3dddcdf2432e78f37c74d8c76c2c519a8d935ab2 the existing checks for __cplusplus where changed to check the gcc version, as the __cplusplus check did nothing, because gcc 4.8 already provided the standard value in there. Fix the code to check for the gcc version in two more places, and change the existing checks to use a convenience macro.
2015-10-30srvrec: Do not expose C++11 tuple use in headerJulian Andres Klode
This makes non-C++11 reverse deps wishing to use it FTBFS.
2015-10-30dpkgpm: Use ptsname_r() instead of ptsname() to be thread-safeJulian Andres Klode
This function only exists on a limited number of platforms, so we add a configure check to make sure it exists. Gbp-Dch: ignore
2015-10-30dpkgpm: Convert ctime() call to ctime_r()Julian Andres Klode
ctime() is not thread-safe, ctime_r() is. Gbp-Dch: ignore
2015-10-30aptconfiguration: Convert strtok() to strtok_r()Julian Andres Klode
strtok() is not thread-safe, whereas strtok_r() is. Gbp-Dch: ignore
2015-10-30GetSrvRecords: Make thread-safeJulian Andres Klode
Gbp-Dch: ignore
2015-10-23deblistparser: Make PrioList constJulian Andres Klode
More safety, less writeable memory.
2015-10-20releasing 1.1~exp141.1_exp14Michael Vogt
2015-10-20Allow -i and -u as aliases for installed and upgradable in listJulian Andres Klode
This makes things much easier to use
2015-10-11.travis.yml: Add pinned vivid for gettext and clean up a bitJulian Andres Klode
This adds a vivid pinned to -1, cleans up the file a bit by removing duplicate commands, and finally installs gettext with a new apt-get run that is passed -t vivid. The syntax for the pinning is some weird YAML stuff I don't want to think about...
2015-10-11Revert "Fix select timeout to be 50msec instead of 0.5msec" for acquireJulian Andres Klode
The acquire system actually uses usec pulse intervals, so the previous value was correct (500ms) whereas the new value is now 5s. It's a bit unfortunate that the two systems use different units for pulse intervals, but probably not much we can do about it. This partially reverts commit eaf21c2144fa8dc4be8581dc69cf88cb38e30ce2.