summaryrefslogtreecommitdiff
path: root/apt-pkg
AgeCommit message (Collapse)Author
2014-03-21enable fvisibility=hidden for our private libraryDavid Kalnischkies
While it is a huge undertaking to enable it for our public libraries as basically everything we exported so far could be seen as public interface our private library is new and under our full control, so we can do whatever we like with it. The benefits are not that big in return of course, but it reduces the size a bit, so thats great nontheless. Git-Dch: ignore
2014-03-21continue reading in xz even if it outputs nothingDavid Kalnischkies
It can happen that content in our buffer is not enough to produce a meaningful output in which case no output is created by liblzma, but still reports that everything is okay and we should go on. The code assumes it has reached the end through if it encounters a null read, so this commit makes it so that it looks like this read was interrupted just like the lowlevel read() on uncompressed files could. It subsequently fixes the issue with that as well as until now our loop would still break even if we wanted it to continue on. (This bug triggers our usual "Hash sum mismatch" error) Reported-By: Stefan Lippers-Hollmann <s.L-H@gmx.de>
2014-03-15Fix handling of autoclosing for compressed files (Closes: #741685)Julian Andres Klode
AutoClose is both an argument in OpenDescriptor() and an enum. In commit 84baaae93badc2da7c1f4f356456762895cef278 code using the AutoClose parameter was moved to OpenDescriptorInternal(). In that function, AutoClose meant the enum value, so the check was always false.
2014-03-14fix test/integration/test-apt-helperMichael Vogt
2014-03-13use the pretty fullname of a pkg as download desciptionDavid Kalnischkies
Otherwise the "WARNING: The following packages cannot be authenticated!" messages does not include the architecture of the package, so it would be slightly misinformative.
2014-03-13refactor FileFd to hide some #ifdefsDavid Kalnischkies
They tend to be ugly to look at, so hide them. Git-Dch: Ignore
2014-03-13use liblzma-dev to provide xz/lzma supportDavid Kalnischkies
We have xz/lzma support for a while, but only via an external binary provided by xz-utils. Now that the Debian archive provides xz by default and dpkg pre-depends on the library provided by liblzma-dev we can switch now to use this library as well to avoid requiring an external binary. For now the binary is in a prio:required package, but this might change in the future. API wise it is quiet similar to bz2 code expect that it doesn't provide file I/O methods, so we piece this together on our own.
2014-03-13refactor setup of file opening via zlib/bz2 libDavid Kalnischkies
Git-Dch: Ignore
2014-03-13move fd duplication closer to the gz/bz2 open callsDavid Kalnischkies
Git-Dch: Ignore
2014-03-13abstract version hash comparison a bitDavid Kalnischkies
In #737085 we see that apt can be confused if informations about versions only differ slightly. This commit adds a way of at least adding a few more data points with the next abi break to help a bit with it. Git-Dch: Ignore
2014-03-13factor out parsing of MultiArch flagDavid Kalnischkies
Git-Dch: Ignore
2014-03-13msgstr with elipses need three dotsDavid Kalnischkies
fixes some messages and their translation so that all of them have three dots for messages with an elipse. Many translations already had this.
2014-03-13support very long mtab entries in mountpoint discoveryDavid Kalnischkies
Old code limited lines to 250 characters which is probably enough for everybody, but who knows… It also takes care of device nodes which start with the same prefix.
2014-03-13apt-cdrom ident shouldn't be interactiveDavid Kalnischkies
Commit 62dcbf84 changed the code of ident to look more like the code for add on my suggestion. This made ident interactive as it starts with a unmount, press enter, mount cycle. The first two are skipped now. This fixes d-i/apt-setup which is using it to get ID as well as label. Closes: 740673
2014-03-13no error for non-existing mountpoints in MountCdromDavid Kalnischkies
The mountpoint might be auto-generated by the mount command so pushing an error on the stack will confuse the following code and let it believe an unrecoverable error occured while potentially everything is okay. Same goes for umount as a non-existing mountpoint is by definition not mounted.
2014-03-13if mountpoint has a ".disk" directory it is mountedDavid Kalnischkies
Checking that parent-directory of mountpoint and mountpoint are on different devices is fine most of the time, but is too restrictive for our testcases and there shouldn't be anything wrong with 'normal' users copying disk-contents around either if they want to. We check for the existance of the ".disk/" directory now as this will not be present if the disk isn't 'mounted'. Disks doesn't need to have such a directory through, so for those we fall back to the old way of detecting mounted or not mounted.
2014-03-13do not configure already unpacked packages needlesslyDavid Kalnischkies
The unpack of a M-A:same package will force the unpack of all its siblings directly to prevent that they could be separated by later immediate actions. In commit 634985f8 a call to SmartConfigure was introduced to configure these packages at the time the installation order encounters them. Usually, the unpack order is already okay, so that this 'earlier' unpack was not needed and if it wouldn't have been done, the package would now only be unpacked, but by configuring the package now we impose new requirements which must be satisfied. The code is clever enough to handle this most of the time (it worked for 2 years!), but it isn't needed and in very coupled cases this can fail. Removing this call again removes this extra burden and so simplifies the ordering as can be seen in the modified tests. Famous last words, but I don't see a reason for this extra burden to exist hence the remove. Closes: 740843
2014-03-13follow method attribute suggestions by gccDavid Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
2014-03-13move defines for version to macros.hDavid Kalnischkies
also adds namespaced attributes for good usage Git-Dch: Ignore
2014-03-13warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2014-03-13warning: type qualifiers ignored on function return type [-Wignored-qualifiers]David Kalnischkies
Reported-By: gcc -Wignored-qualifiers Git-Dch: Ignore
2014-03-13warning: cannot optimize loop, the loop counter may overflow ↵David Kalnischkies
[-Wunsafe-loop-optimizations] Git-Dch: Ignore Reported-By: gcc -Wunsafe-loop-optimizations
2014-03-13warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
2014-03-13warning: useless cast to type A [-Wuseless-cast]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
2014-03-13warning: cast from type A to type B casts away qualifiers [-Wcast-qual]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wcast-qual
2014-03-13warning: extra ‘;’ [-Wpedantic]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wpedantic
2014-03-13fix -Wmissing-field-initializers warningsDavid Kalnischkies
Reported-By: gcc Git-Dch: Ignore
2014-03-13make doxygen more quiet, fix issues and disable latexDavid Kalnischkies
Git-Dch: Ignore
2014-03-13support DEB_BUILD_PROFILES and -P for build profilesDavid Kalnischkies
Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does.
2014-03-13implement BuildProfileSpec support as dpkg has in 1.17.2Johannes Schauer
Build-dependencies are now able to include a <profile.foo …> specification limiting usage similar to already supported [arch …]. More details: https://wiki.debian.org/BuildProfileSpec Closes: 661537
2014-03-13add default and override handling for Cnf::FindVectorDavid Kalnischkies
Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
2014-03-13check version before adding scores in resolverDavid Kalnischkies
Prevents that "old" dependencies have an influence in the scoring. With positive dependencies this is usually not a problem, but negative dependencies can linger around for a long time.
2014-03-13show debug output only if told so in packagemanagerDavid Kalnischkies
Git-Dch: Ignore
2014-03-13do not do the same looping twiceDavid Kalnischkies
Git-Dch: Ignore
2014-03-13propagate a negative score point along breaks/conflictsDavid Kalnischkies
versioned -dev packages like db and boost have the problem of no dependencies which would give them a competitive advantage against an older incarnation of the -dev package, so they tend to be kept back until the old version is removed from the archive, which, if the user has older releases in its sources can take a long time (or never happens). The newer version has a conflicts/breaks against the older one, but the older one hasn't against the newer, so by giving via the conflicts the older one a reduced score the newer one can win if there is no other reason to keep it. If both have a conflict against each other the scoring will cancel itself out, so no harm done. This gives "action" a slightly bigger edge in breaks/conflicts cases than before, but holding back isn't a really good solution anyway.
2014-03-12add hashsum support in apt-file download and add more testsMichael Vogt
2014-02-27initial version of apt-helperMichael Vogt
2014-02-27initial version of apt-helperMichael Vogt
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2014-02-20prepare re-enable fnmatch() once we have proper reportingMichael Vogt
2014-02-14disable fnmatch()Michael Vogt
The current PackageContainerInterface::FromString() will do a FromFnmatch() first and then FromRegEx(). This commit reverts that change to restore the old behavior to only look for RegEx and not glob-style pattern. The rational is that: a) currently a fnmatch() is misleadingly reported as a regex match to the user (Bug#738880) b) a fnmatch may match something different than a a RegEx so the change broke a published interface
2014-02-14add missing canNotFindFnmatch/showFnmatchSelection (for the next ABI break)Michael Vogt
2014-02-14simplify code some more to make reddit happyDavid Kalnischkies
Commit 6008b79adf1d7ea5607fab87a355d664c8725026 should have been guarded by "Git-Dch: Ignore", but it wasn't and I only noticed it with the Close message via deity thinking "hehe, I wonder if someone is gonna notice". Looks like someone did: hats off to reddit user itisOmegakai! Good to know that what I do isn't only monitored by goverments. :) As there is another instance of basically the same code we just factor out the code a bit and reuse, so its even cleaner and not only simpler. Reported-By: scan-build
2014-02-14allow http protocol to switch to httpsDavid Kalnischkies
switch protocols at random is a bad idea if e.g. http can switch to file, so we limit the possibilities to http to http and http to https. As very few people (less than 1% according to popcon) have https installed this likely changes nothing in terms of failure. The commit is adding a friendly hint which package needs to be installed though.
2014-02-12remove duplication in pkgCdrom::Add and ::IdentDavid Kalnischkies
Git-Dch: Ignore
2014-02-12apt-cdrom should succeed if any drive succeedsJohn Ogness
If there are multiple CD-ROM drives, `apt-cdrom add` will abort with an error if any of the drives do not contain a Debian CD which is against the documentation we have saying "a CD-ROM" and also scripts do not expect it this way. This patch modifies apt-cdrom to return success if any of the drives succeeded. If failures occur, apt-cdrom will still continue trying all the drives and report the last failure (if none of them succeeded). The 'ident' command was also changed to match the new 'add' behavior. Closes: 728153
2014-02-10always cleanup patchfiles at the end of rred callDavid Kalnischkies
With APT::Get::List-Cleanup disabled the ed-style patch files are lingering in the lists/ directory otherwise. That was kinda okay in the old none-client-merge as the filename was always the same so it was constantly overridden, but now with different names for client-merge quiet a few could pill up on the system and are used by the next call as it picks them up based on the filename.
2014-02-10do not use an empty APT_CONFIG environment variableDavid Kalnischkies
2014-02-10simplify code to make compilers happyDavid Kalnischkies
Does the same as before, but is a bit simpler on the logic for humans as well as compilers. scan-build complained about it at least with: "Result of operation is garbage or undefined" Reported-By: scan-build