summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
* Rename FileFd::Open() Perms to AccessModeMichael Vogt2014-04-102-14/+14
| | | | | | | Bug lp:#1304657 was caused by confusion around the name Perms. The new name AccessMode should make it clear that its not the literal file permissions but instead the AccessMode passed to open() (i.e. the umask needs to be applied)
* Fix insecure file permissions when using FileFd with OpenMode::AtomicMichael Vogt2014-04-101-2/+6
| | | | | | | | | | Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug that caused FileFd to create insecure permissions when FileFd::Atomic is used. This commit fixes the permissions and adds a test. The bug is most likely caused by the confusing "Perm" parameter that is passed to Open() - its not the file permissions but intead the "mode" part of open/creat.
* Merge remote-tracking branch 'mvo/feature/more-fancy-progress' into debian/sidMichael Vogt2014-04-012-14/+68
|\
| * Merge branch 'debian/sid' into feature/more-fancy-progressMichael Vogt2014-03-2712-65/+124
| |\
| * | Add progressbar to "Dpkg::Progress-Fancy"Michael Vogt2014-03-272-12/+62
| | | | | | | | | | | | | | | | | | A text progressbar is now displayed in the Dpkg::Progress-Fancy mode. It can be turned off via the apt option Dpkg::Progress-Fancy::Progress-Bar=false
| * | make fancy-progress fg/bg color configurableMichael Vogt2014-03-271-2/+6
| | | | | | | | | | | | | | | Add two new options: Dpkg::Progress-Fancy::Progress-{fg,bg} that allows customizing the colors in the dpkg fancy progress output.
* | | do not crash on SIGPIPE in pkgDPkgPM::RunScriptsWithPkgs()Michael Vogt2014-04-011-7/+18
| | | | | | | | | | | | | | | If a external command closes the PIPE unexpectedly, do not crash in pkgDPkgPM::RunScriptsWithPkgs but ignore the SIGPIPE.
* | | Add new Debug::RunScripts optionMichael Vogt2014-04-012-1/+9
| |/ |/| | | | | | | This debug option will display all scripts that are run by apts RunScripts and RunScriptsWithPkgs helpers.
* | discard candidates via IsInstallOk to allow overrideDavid Kalnischkies2014-03-232-20/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 446551c8 I changed MarkInstall to discard the candidate if the candidate can't satisfy the dependency. This breaks interactive solvers like aptitude which can change the candidate on-the-fly later. In commit df77d8a5 I introduced this 'early' loop-breaking to begin with which can't be that helpful for interactive solvers as well, but makes perfect sense for non-interactives to stop them from exploring trees which can't be satisfied, but it isn't perfect as ideally we would check this before auto-installing the first dependency. This commit therefore moves the loop into its own IsInstallOk hook so that frontends can override this check if they want to and in exchange removes the loop-breaking from MarkInstall itself and does it before any dependency is installed. Closes: 740750
* | do IsInstallOk call in MarkInstall unconditionallyDavid Kalnischkies2014-03-231-4/+8
| | | | | | | | | | | | | | | | Hooked checks could be influenced by AutoInst as a lot can happen between a call without and one with this bit set. The real cache-hit check is above this call already. Individual hooked checks can then inspect the state if they want to cache. Calling them multiple times shouldn't be a problem either way.
* | ensure proper teardown in dpkg error casesDavid Kalnischkies2014-03-221-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | We have to properly close our pseudo terminals even in error cases before we call post-invoke scripts. This is done now by breaking from the dpkg calling loop instead of copying the handling, which did it in the wrong order before. This also ensures that our state file is written in error cases to record autobit and co as this was forgotten before. Closes: 738969
* | mark optional (private) symbols as hiddenDavid Kalnischkies2014-03-217-23/+31
| | | | | | | | | | | | | | | | This methods should not be used by anyone expect the library itself as they are helpers for the specific class and therefore perfect candidates for hidding. Git-Dch: Ignore
* | enable fvisibility=hidden for our private libraryDavid Kalnischkies2014-03-211-0/+4
| | | | | | | | | | | | | | | | | | | | 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
* | continue reading in xz even if it outputs nothingDavid Kalnischkies2014-03-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix handling of autoclosing for compressed files (Closes: #741685)Julian Andres Klode2014-03-151-1/+1
|/ | | | | | | 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.
* fix test/integration/test-apt-helperMichael Vogt2014-03-14122-1225/+2027
|\
| * use the pretty fullname of a pkg as download desciptionDavid Kalnischkies2014-03-131-6/+2
| | | | | | | | | | | | Otherwise the "WARNING: The following packages cannot be authenticated!" messages does not include the architecture of the package, so it would be slightly misinformative.
| * refactor FileFd to hide some #ifdefsDavid Kalnischkies2014-03-131-168/+131
| | | | | | | | | | | | They tend to be ugly to look at, so hide them. Git-Dch: Ignore
| * use liblzma-dev to provide xz/lzma supportDavid Kalnischkies2014-03-133-35/+256
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * refactor setup of file opening via zlib/bz2 libDavid Kalnischkies2014-03-131-37/+36
| | | | | | | | Git-Dch: Ignore
| * move fd duplication closer to the gz/bz2 open callsDavid Kalnischkies2014-03-131-21/+20
| | | | | | | | Git-Dch: Ignore
| * abstract version hash comparison a bitDavid Kalnischkies2014-03-135-4/+47
| | | | | | | | | | | | | | | | 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
| * factor out parsing of MultiArch flagDavid Kalnischkies2014-03-132-21/+29
| | | | | | | | Git-Dch: Ignore
| * msgstr with elipses need three dotsDavid Kalnischkies2014-03-131-3/+3
| | | | | | | | | | fixes some messages and their translation so that all of them have three dots for messages with an elipse. Many translations already had this.
| * support very long mtab entries in mountpoint discoveryDavid Kalnischkies2014-03-131-25/+23
| | | | | | | | | | | | 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.
| * apt-cdrom ident shouldn't be interactiveDavid Kalnischkies2014-03-132-13/+16
| | | | | | | | | | | | | | | | | | 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
| * no error for non-existing mountpoints in MountCdromDavid Kalnischkies2014-03-131-8/+20
| | | | | | | | | | | | | | | | | | 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.
| * if mountpoint has a ".disk" directory it is mountedDavid Kalnischkies2014-03-131-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * do not configure already unpacked packages needlesslyDavid Kalnischkies2014-03-131-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * follow method attribute suggestions by gccDavid Kalnischkies2014-03-1339-122/+132
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
| * cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-13112-310/+706
| | | | | | | | | | | | | | | | 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)
| * move defines for version to macros.hDavid Kalnischkies2014-03-132-27/+68
| | | | | | | | | | | | also adds namespaced attributes for good usage Git-Dch: Ignore
| * warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-1326-79/+75
| | | | | | | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
| * warning: type qualifiers ignored on function return type [-Wignored-qualifiers]David Kalnischkies2014-03-135-8/+8
| | | | | | | | | | Reported-By: gcc -Wignored-qualifiers Git-Dch: Ignore
| * warning: cannot optimize loop, the loop counter may overflow ↵David Kalnischkies2014-03-132-3/+3
| | | | | | | | | | | | | | [-Wunsafe-loop-optimizations] Git-Dch: Ignore Reported-By: gcc -Wunsafe-loop-optimizations
| * warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-1/+1
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
| * warning: useless cast to type A [-Wuseless-cast]David Kalnischkies2014-03-1310-26/+26
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
| * warning: cast from type A to type B casts away qualifiers [-Wcast-qual]David Kalnischkies2014-03-135-32/+32
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wcast-qual
| * warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-03-1317-289/+288
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wpedantic
| * fix -Wmissing-field-initializers warningsDavid Kalnischkies2014-03-132-8/+8
| | | | | | | | | | Reported-By: gcc Git-Dch: Ignore
| * make doxygen more quiet, fix issues and disable latexDavid Kalnischkies2014-03-138-23/+27
| | | | | | | | Git-Dch: Ignore
| * support DEB_BUILD_PROFILES and -P for build profilesDavid Kalnischkies2014-03-133-2/+31
| | | | | | | | | | | | | | | | | | | | 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.
| * implement BuildProfileSpec support as dpkg has in 1.17.2Johannes Schauer2014-03-133-9/+101
| | | | | | | | | | | | | | | | 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
| * add default and override handling for Cnf::FindVectorDavid Kalnischkies2014-03-134-65/+41
| | | | | | | | | | | | 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.
| * check version before adding scores in resolverDavid Kalnischkies2014-03-131-1/+12
| | | | | | | | | | | | 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.
| * show debug output only if told so in packagemanagerDavid Kalnischkies2014-03-131-1/+2
| | | | | | | | Git-Dch: Ignore
| * do not do the same looping twiceDavid Kalnischkies2014-03-131-7/+1
| | | | | | | | Git-Dch: Ignore
| * propagate a negative score point along breaks/conflictsDavid Kalnischkies2014-03-131-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * initial version of apt-helperMichael Vogt2014-02-271-1/+1
| |
* | add hashsum support in apt-file download and add more testsMichael Vogt2014-03-122-0/+12
| |