summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
* re-add APT::Keep-Fds:: for the dpkg status-fd in dpkgpm.cc as we always need ↵Michael Vogt2013-10-143-15/+18
| | | | this
* rename APT::Progress::Packagemanager Started->Start, Finished->Stop to match ↵Michael Vogt2013-10-143-17/+14
| | | | pkgAcquireStatus
* refactor writing to WriteToStatusFd()Michael Vogt2013-10-142-14/+19
|
* add APT::Progress::PackageManager::Pulse()Michael Vogt2013-10-132-3/+9
|
* move the status-fd progress reporting out of the pkgDPkgPM class, at this ↵Michael Vogt2013-10-136-100/+189
| | | | point, breaks ABI/API, lets see what we can do about this
* move common code into PackageManager::StatusChanged()Michael Vogt2013-10-113-29/+38
|
* deal with nr_terminal_rows unavailableMichael Vogt2013-10-112-6/+13
|
* first iteration of install progress refactorMichael Vogt2013-10-116-93/+194
|
* Merge remote-tracking branch 'mvo/feature/limit-default-pdiffs' into debian/sidMichael Vogt2013-10-091-1/+1
|\
| * set Acquire::PDiffs::FileLimit to 20 to avoid needless huge fetchesMichael Vogt2013-08-261-1/+1
| |
* | apt-pkg/deb/dpkgpm.cc: fix off-by-one in SetupTerminalScrollArea resetMichael Vogt2013-10-081-1/+1
| |
* | Merge remote-tracking branch 'mvo/feature/dpkg-progress-fancy' into debian/sidMichael Vogt2013-10-082-9/+81
|\ \
| * | fix off-by-one error in pkgDPkgPM::SetupTerminalScrollArea()Michael Vogt2013-10-071-1/+1
| | |
| * | use Dpkg::Progress-Fancy to be consitent with Dpkg::ProgressMichael Vogt2013-10-071-1/+1
| | |
| * | add -o DpkgPM::Progress-Fancy for better dpkg progress output on vt100+ ↵Michael Vogt2013-10-072-9/+81
| | | | | | | | | | | | terminals
* | | fix libapt-inst for >2G debs (closes: #725483)Michael Vogt2013-10-071-8/+8
| | |
* | | Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2013-10-055-42/+68
|\ \ \
| * | | fix lzma-support detection via xz binaryDavid Kalnischkies2013-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Clear() only clears a config option, not removing it and an empty setting still exists. Hence we set the option instead to the xz path so that the later existance check can find a binary for the test
| * | | use pkgAcqArchive in 'download' for proper errorsDavid Kalnischkies2013-10-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With a bit of trickery we can reuse the usual infrastructure we have in place to acquire deb files for the 'download' operation as well, which gains us authentification check & display, error messages, correct filenames and "downloads" from the root-owned archives.
| * | | refactor onError relabeling of DestFile as '.FAILED'David Kalnischkies2013-10-032-34/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps ensure three things: - each error is reported via ReportMirrorFailure - if DestFile doesn't exist, do not attempt rename - renames happen for every error The last one wasn't the case for Size mismatches, which isn't nice, but not a exploitable problem per-se as the file isn't picked up and remains in partial/ where the following download-try will at most take it for a partial request which fails the hashsum verification later on Git-Dch: Ignore
| * | | don't consider holds for autoremovalDavid Kalnischkies2013-10-012-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't remove packages which are held back by the user with a hold, so marking them (or its dependencies) as garbage will lead our autoremover into madness – and given that the package is important enough that the user has held it back it can't be garbage (at least at the moment), so even if a front-end wants to use the info just for information display its a good idea to not consider it garbage for them. Closes: 724995
* | | | Merge remote-tracking branch 'mvo/bugfix/dpkg-progress-multiarch' into ↵Michael Vogt2013-10-053-28/+96
|\ \ \ \ | |/ / / |/| / / | |/ / debian/sid
| * | Merge remote-tracking branch 'origin/bugfix/dpkg-progress-multiarch' into ↵Michael Vogt2013-10-022-8/+21
| |\ \ | | | | | | | | | | | | bugfix/dpkg-progress-multiarch
| | * | change maxsplit default from "0" to maxintMichael Vogt2013-10-012-3/+3
| | | |
| | * | improve documentation for StringSplit()Michael Vogt2013-10-012-6/+19
| | | |
| * | | make dpkg progress slightly nicerMichael Vogt2013-10-021-3/+17
| |/ /
| * | doc updateMichael Vogt2013-09-072-8/+17
| | |
| * | fix multiarch status-fd progress calculationMichael Vogt2013-09-071-24/+24
| | |
| * | add maxsplit parameter to StringSplitMichael Vogt2013-09-072-6/+14
| | |
| * | implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2013-09-072-0/+24
| | |
* | | pkg from only trusted sources keeps being trustedDavid Kalnischkies2013-09-261-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --allow-unauthenticated switches the download to a pre-0.6 system in which a package can come from any source, rather than that trusted packages can only come from trusted sources. To allow this the flag used to set all packages as untrusted, which is a bit much, so we check now if the package can be acquired via an untrusted source and only if this is the case set it as untrusted. As APT nowadays supports setting sources as trusted via a flag in the sources.list this mode shouldn't be used that much anymore though. [Note that this is not the patch from the BTS] Closes: 617690
* | | don't strip :any from dependencies in single-archDavid Kalnischkies2013-09-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser goes a bit to far by stripping :any from dependencies in a single architecture environment. the flag "Multi-Arch: allowed" doesn't care any architecture restrictions in that case (as in single arch everything is native), but it still limits the possible versions statisfying the dependency so stripping :any over-simplifies in upgrade situations from "Multi-Arch: none" to "Multi-Arch: allowed". Closes: 723586
* | | do not trust FileFd::Eof() in pkgTagFile::Fill()David Kalnischkies2013-09-201-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Eof check was added (by me of course) in 0aae6d14390193e25ab6d0fd49295bd7b131954f as part of a fix up ~a month ago (at DebConf). The idea was not that bad, but doesn't make that much sense either as this bit is set by the FileFd based on Actual as well, so this is basically doing the same check again – with the difference that the HitEof bit can still linger from a previous Read we did at the end of the file, but have seek'd away from it now. Combined with the length of entries, entry order and other not that easily controllable conditions you can be 'lucky' enough to hit this problem in a way which even visible (truncating of other fields might not be visible easily, like 'Tags' and others). Closes: 723705 Thanks: Cyril Brulebois
* | fix typo (mkostemp->mkstemp)Michael Vogt2013-08-311-1/+1
| |
* | Merge remote-tracking branch 'mvo/feature/install-progress' into debian/sidMichael Vogt2013-08-282-1/+18
|\ \
| * | Add DPkgPM::Progress for terminal install progressMichael Vogt2013-07-112-1/+18
| | |
* | | use mkstemp instead of mkostemp in FileFd::Open()David Kalnischkies2013-08-271-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileFd currently supports no fileflags which would make sense to provide via mkostemp, so we can just use mkstemp here which is a standard function compared to glib extension mkostemp. O_CREAT (Create) and O_TRUNC (Empty) are implied by O_EXCL, which is the mode mkstemp uses by default. The file description is opened ReadWrite, but that used to be the default for FileFd in the old times and not a problem as the difference is needed by FileFd to decide in which way the compressor pipeline needs to be created (if any). Git-Dch: Ignore
* | | replace usage of potential dangerous mktemp with mkstempAngel Guzman Maeso2013-08-271-5/+19
| |/ |/| | | | | | | | | | | | | | | | | | | | | Avoid the warning "the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'". It is not strictly necessary to change the usage from a security point of view here, but mktemp is also removed from the standard since POSIX.1-2008. The mkostemp call returns a file descriptor the logic for TemporaryFileName has been changed accordingly to get the same results. The file permissions are corrected by using fchmod() as the default for FileFd is 666 while mkstemp creates files with 600 by default.
* | do chdir("/") after chroot()Michael Vogt2013-08-222-2/+2
| |
* | apt-pkg:contrib Avoid compiler warning about sign-compareÁngel Guzmán Maeso2013-08-221-1/+2
| | | | | | | | | | | | | | The fix avoid the warning "comparison between signed and unsigned integer expressions [-Wsign-compare]"· The index for the loop needs to be unsigned for compare with globbuf.gl_pathc structure member
* | Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-08-225-1/+16
|\ \ | | | | | | | | | | | | Conflicts: apt-pkg/tagfile.h
| * | some more coverity fixesMichael Vogt2013-08-123-0/+5
| | |
| * | memset() pkgTagSections data to make coverity happyMichael Vogt2013-08-062-1/+11
| | |
* | | Merge remote-tracking branch 'mvo/feature/apt-binary2' into debian/sidMichael Vogt2013-08-1710-6/+291
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: cmdline/apt-get.cc
| * | | add PACKAGE_MATCHER_ABI_COMPAT mode for now so that this branch can be ↵Michael Vogt2013-08-151-1/+62
| | | | | | | | | | | | | | | | merged without breaking ABI
| * | | make destructors virtualMichael Vogt2013-08-151-3/+3
| | | |
| * | | squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-1210-12/+236
| | | | | | | | | | | | | | | | experimental
* | | | allow Pre-Install-Pkgs hooks to get info over an FD != stdinDavid Kalnischkies2013-08-161-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds ::InfoFD option alongside the ::Version one to request sending the information to the specified FD, by default it is STDIN as it was the case before. The environment variable APT_HOOK_INFO_FD contains the FD the data is on as a confirmation that the APT version used understood the request. Allowing the hook to choose the FD is needed/helpful e.g. for shellscripts which have a hard time accessing FDs above 9 (as >= 10 are usually used internally by them) Closes: #671728
* | | | use malloc instead of new[] in pkgTagFileDavid Kalnischkies2013-08-151-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need initialized memory for pkgTagFile, but more to the point we can use realloc this way which hides the bloody details of increasing the size of the buffer used. Git-Dch: Ignore
* | | | ensure that pkgTagFile isn't writing past Buffer lengthDavid Kalnischkies2013-08-152-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 91c4cc14d3654636edf997d23852f05ad3de4853 I removed the +256 from the pkgTagFile call parsing Release files as I couldn't find a mentioning of a reason for why and it was marked as XXX which suggested that at least someone else was suspicious. It turns out that it is indeed "documented", it just didn't found it at first but the changelog of apt 0.6.6 (29. Dec 2003) mentions: * Restore the ugly hack I removed from indexRecords::Load which set the pkgTagFile buffer size to (file size)+256. This is concealing a bug, but I can't fix it right now. This should fix the segfaults that folks are seeing with 0.6.[45]. The bug it is "hiding" is that if pkgTagFile works with a file which doesn't end in a double newline it will be adding it without checking if the Buffer is big enough to store them. Its also not a good idea to let the End pointer be past the end of our space, even if we don't access the data. Closes: 719629