summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
AgeCommit message (Collapse)Author
2014-10-13fix compile and tests errorDavid Kalnischkies
I am pretty sure I did that before committing broken stuff… Git-Dch: Ignore
2014-10-13Fix backward compatiblity of the new pkgAcquireMethod::DropPrivsOrDie()Michael Vogt
Do not drop privileges in the methods when using a older version of libapt that does not support the chown magic in partial/ yet. To do this DropPrivileges() now will ignore a empty Apt::Sandbox::User. Cleanup all hardcoded _apt along the way.
2014-10-13do not inline virtual destructors with d-pointersDavid Kalnischkies
Reimplementing an inline method is opening a can of worms we don't want to open if we ever want to us a d-pointer in those classes, so we do the only thing which can save us from hell: move the destructors into the cc sources and we are good. Technically not an ABI break as the methods inline or not do the same (nothing), so a program compiled against the old version still works with the new version (beside that this version is still in experimental, so nothing really has been build against this library anyway). Git-Dch: Ignore
2014-10-07ensure partial dirs are 0700 and owned by _apt:rootDavid Kalnischkies
Reworks the API involved in creating and setting up the fetcher to be a bit more pleasent to look at and work with as e.g. an empty string for no lock isn't very nice. With the lock we can also stop creating all our partial directories "just in case". This way we can also be a bit more aggressive with the partial directory itself as with a lock, we know we will gone need it.
2014-09-29Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt
feature/acq-trans Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h methods/gpgv.cc
2014-09-27allow fetcher setup without directory creationDavid Kalnischkies
apt-get download and changelog as well as apt-helper reuse the acquire system for their own proposes without requiring the directories the fetcher wants to create, which is a problem if you run them as non-root and the directories do not exist as it greets you with: E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (13: Permission denied) Closes: 762898
2014-09-27fix: Member variable 'X' is not initialized in the constructor.David Kalnischkies
Reported-By: cppcheck Git-Dch: Ignore
2014-09-17use pkgAcqMetaBase as the transactionManagerMichael Vogt
2014-08-01make errors more consistentMichael Vogt
2014-07-31fail early (again) on gpg sig failuresMichael Vogt
2014-07-31Rework TransactionID stuffMichael Vogt
2014-07-22WIP cleanup pkgAcqMetaSigMichael Vogt
2014-07-21add pkgAcquire::TransactionHasError()Michael Vogt
2014-07-18WIP transaction based updateMichael Vogt
2014-07-08Merge branch 'debian/sid' into debian/experimentalMichael Vogt
Conflicts: apt-pkg/deb/deblistparser.cc doc/po/apt-doc.pot doc/po/de.po doc/po/es.po doc/po/fr.po doc/po/it.po doc/po/ja.po doc/po/pl.po doc/po/pt.po doc/po/pt_BR.po po/da.po po/mr.po po/vi.po
2014-07-08Do not clean "/" in pkgAcquire::Clean/pkgArchiveCleanerMichael Vogt
Having "/" here is most likely a user configuration error and may cause removal of import symlinks like /vmlinuz Closes: #753531
2014-05-08check for UnfetchedReleaseFiles when calculating the update percent valueMichael Vogt
2014-04-16calculate Percent as part of pkgAcquireStatus to provide a weighted percent ↵Michael Vogt
for both items and bytes
2014-04-16add Debug::acquire::progress debug option and fixme for index file loading ↵Michael Vogt
with the correct extension
2014-04-16load the size from the metaindex into the fetcher to have even more accurate ↵Michael Vogt
progress information
2014-04-16make the TotalFiles more reliable in apt-get updateMichael Vogt
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-13warning: extra ‘;’ [-Wpedantic]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wpedantic
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2012-05-14* apt-pkg/acquire*.cc:Raphael Geissert
- handle redirections in the worker with the right method instead of in the method the redirection occured in (Closes: #668111) * methods/http.cc: - forbid redirects to change protocol
2012-04-11use a static FileFd::Write overload to reduce duplication of write()-retry codeDavid Kalnischkies
2012-03-20* apt-pkg/acquire-worker.cc:David Kalnischkies
- check return of write() as gcc recommends * apt-pkg/acquire.cc: - check return of write() as gcc recommends * apt-pkg/cdrom.cc: - check return of chdir() and link() as gcc recommends * apt-pkg/clean.cc: - check return of chdir() as gcc recommends * apt-pkg/contrib/netrc.cc: - check return of asprintf() as gcc recommends
2012-03-04fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies
initialized in the constructor." messages (no functional change)
2011-09-13merge with debian/sidDavid Kalnischkies
2011-09-13merge with debian/experimentalDavid Kalnischkies
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies
2011-08-22* apt-pkg/acquire.cc:David Kalnischkies
- non-existing directories are by definition clean
2011-08-15merged from lp:~mvo/apt/mvoMichael Vogt
2011-08-15merged from the debian-sid branchMichael Vogt
2011-08-11cppcheck complains about some possible speed improvements which could beDavid Kalnischkies
done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
2011-08-09* apt-pkg/acquire.cc:Michael Vogt
- fix potential divide-by-zero
2011-07-14replace the last standing double's with long longDavid Kalnischkies
2011-07-05* apt-pkg/acquire*.{cc,h}:David Kalnischkies
- try even harder to support really big files in the fetcher by converting (hopefully) everything to 'long long' (Closes: #632271)
2011-06-29fix compiler warning by reordering init-listDavid Kalnischkies
apt-pkg/acquire.h: In constructor ‘pkgAcquire::pkgAcquire()’: apt-pkg/acquire.h:175:9: warning: ‘pkgAcquire::Running’ will be initialized after [-Wreorder] apt-pkg/acquire.h:96:8: warning: ‘int pkgAcquire::LockFD’ [-Wreorder]
2010-09-06rename the newly public CheckDirectory method to CreateAPTDirectoryIfNeededDavid Kalnischkies
to give a better indication what this method will do if called.
2010-09-02* apt-pkg/deb/dpkgpm.cc:David Kalnischkies
- create Dir::Log if needed to support /var/log as tmpfs or similar, inspired by Thomas Bechtold, thanks! (Closes: #523919, LP: #220239) Easily done by moving a private method from pkgAcquire into the public area of fileutl.cc to be able to use it also in here
2010-06-03* apt-pkg/depcache.cc:David Kalnischkies
- switch i{Download,Usr}Size from double to (un)signed long long The biggest reason is that this saves a lot of float point operations we do in AddSizes() on integers. The only reason i see that this was a double is that it was 64bit long and can therefore store bigger values than int/long, but with the availablity of (un)signed long long we are now also at 64bit and can store sizes more than 8 Exabytes big - by the time this will be a limit the C/C++ Standard will have bigger types, hopefully.
2010-04-13create the partial dirs also automatic if only Dir::Cache::archives orDavid Kalnischkies
Dir::Cache::lists was set
2010-04-07* apt-pkg/contrib/fileutl.cc:David Kalnischkies
- add a parent-guarded "mkdir -p" as CreateDirectory() * apt-pkg/acquire.{cc,h}: - add a delayed constructor with Setup() for success reporting - check for and create directories in Setup if needed instead of error out unfriendly in the Constructor (Closes: #523920, #525783) - optional handle a lock file in Setup() * cmdline/apt-get.cc: - remove the lock file handling and let Acquire take care of it instead
2009-07-21The 'not dead yet' releaseMichael Vogt
* add hook for MarkInstall and MarkDelete (closes: #470035) * add the various foldmarkers in apt-pkg & cmdline (no code change) * versions with a pin of -1 shouldn't be a candidate (Closes: #355237) * prefer mmap as memory allocator in MMap instead of a static char array which can (at least in theory) grow dynamic * eliminate (hopefully all) segfaults in pkgcachegen.cc and mmap.cc which can arise if cache doesn't fit into the mmap (Closes: #535218) * display warnings instead of errors if the parts dirs doesn't exist * honor the dpkg hold state in new Marker hooks (closes: #64141)
2009-07-21* apt-pkg/acquire.cc:Michael Vogt
- make the max pipeline depth of the acquire queue configurable via Acquire::Max-Pipeline-Depth * apt-pkg/deb/dpkgpm.cc: - add Dpkg::UseIoNice boolean option to run dpkg with ionice -c3 (off by default) - send "dpkg-exec" message on the status fd when dpkg is run - provide DPkg::Chroot-Directory config option (useful for testing) - fix potential hang when in a backgroud process group * apt-pkg/algorithms.cc: - consider recommends when making the scores for the problem resolver * apt-pkg/acquire-worker.cc: - show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144) * apt-pkg/indexcopy.cc: - support having CDs with no Packages file (just a Packages.gz) by not forcing a verification on non-existing files (LP: #255545) - remove the gettext from a string that consists entirely of variables (LP: #56792) * apt-pkg/cacheiterators.h: - add missing checks for Owner == 0 in end() * apt-pkg/indexrecords.cc: - fix some i18n issues * apt-pkg/contrib/strutl.h: - add new strprintf() function to make i18n strings easier - fix compiler warning * apt-pkg/deb/debsystem.cc: - make strings i18n able * fix problematic use of tolower() when calculating the version hash by using locale independant tolower_ascii() function. Thanks to M. Vefa Bicakci (LP: #80248) * build fixes for g++-4.4 * cmdline/apt-mark: - add "showauto" option to show automatically installed packages * document --install-recommends and --no-install-recommends (thanks to Dereck Wonnacott, LP: #126180) * Updated cron script to support backups by hardlinks and verbose levels. All features turned off by default. * Added more error handlings. Closes: #438803, #462734, #454989, * Refactored condition structure to make download and upgrade performed if only previous steps succeeded. Closes: #341970 * Documented all cron script related configuration items in configure-index. * apt-ftparchive might write corrupt Release files (LP: #46439) * Apply --important option to apt-cache depends (LP: #16947)
2009-06-30add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies
2009-06-30fix typo in apt-pkg/acquire.cc which prevents Dl-Limit to workMichael Vogt
correctly when downloading from multiple sites (Closes: #534752)
2009-06-09* apt-pkg/acquire.cc:Michael Vogt
- make the max pipeline depth of the acquire queue configurable via Acquire::Max-Pipeline-Depth