summaryrefslogtreecommitdiff
path: root/apt-pkg/cachefile.cc
AgeCommit message (Collapse)Author
2015-11-04wrap every unlink call to check for != /dev/nullDavid Kalnischkies
Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
2015-09-14avoid using global PendingError to avoid failing too often too soonDavid Kalnischkies
Our error reporting is historically grown into some kind of mess. A while ago I implemented stacking for the global error which is used in this commit now to wrap calls to functions which do not report (all) errors via return, so that only failures in those calls cause a failure to propergate down the chain rather than failing if anything (potentially totally unrelated) has failed at some point in the past. This way we can avoid stopping the entire acquire process just because a single source produced an error for example. It also means that after the acquire process the cache is generated – even if the acquire process had failures – as we still have the old good data around we can and should generate a cache for (again). There are probably more instances of this hiding, but all these looked like the easiest to work with and fix with reasonable (aka net-positive) effects.
2015-08-27ignore AllowMem parameter in cache generationDavid Kalnischkies
The parameter name suggests that it should forbid the building of the entire cache in memory, but this isn't how it was previously and as AllowMem is false by default it actually prevents previous usecases from working like being root and configuring apt to build no caches at all. This should be fixed at some point to actually work, but that is hard to pull off as it means switching the default and some callers (including apt itself) actually did call it explicitly with false in certain cases for no apparent reason (at least now where it is common to have enough memory to throw at every problem and even if not is a slow apt usally better than an apt erroring out). Closes: 796459
2015-08-15cachefile.cc: Do not ignore return value of pkgDepCache::Init()Julian Andres Klode
Currently, this always returns true, but it might start returning false at some point in the future... Gbp-Dch: ignore
2015-08-10show or-groups in not-installed recommends and suggests listsDavid Kalnischkies
Further abstracting our new ShowList allows to use it for containers of strings as well giving us the option to implement an or-groups display for the recommends and suggests lists which is a nice trick given that it also helps with migrating the last remaining other cases of old ShowList.
2015-08-10fix memory leaks reported by -fsanitizeDavid Kalnischkies
Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
2014-09-05Ensure we have a Policy in CacheFile.BuildDepCache()Michael Vogt
This partly reverts d059cc2 and fixes bug #753297 in a more general way by ensuring that CacheFile.BuildDepCache() builds a pkgPolicy if there isn't one already.
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: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2012-03-04fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies
initialized in the constructor." messages (no functional change)
2012-02-18ensure that the cache-directories are really directories beforeDavid Kalnischkies
trying to get a list of included files from them
2012-02-11* apt-pkg/cachefile.cc:David Kalnischkies
- clean up lost atomic cachefiles with 'clean' (Closes: #650513)
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-13merge with debian/sidDavid Kalnischkies
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies
2011-08-22remove the caches in 'apt-get update', too, as they will beDavid Kalnischkies
invalid in most cases anyway
2010-06-19fix the gcc warning about the initialisation order of variables causedDavid Kalnischkies
by moving Policy to public again (and therefore after SrcList)
2010-06-04store also the SourceList we use internally for exportDavid Kalnischkies
2010-06-04* apt-pkg/cachefile.{cc,h}:David Kalnischkies
- split Open() into submethods to be able to build only parts - make the OpProgress optional in the Cache buildprocess
2009-07-15display warnings instead of errors if the parts dirs doesn't existDavid Kalnischkies
Parts dirs are /etc/apt/{sources.list,apt.conf,preferences}.d (in the default setup)
2009-07-15merge with lp:~mvo/apt/debian-sidDavid Kalnischkies
2009-07-06Support /etc/apt/preferences.d (Closes: #535512)Julian Andres Klode
2009-06-30add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies
2008-01-07* move the ListUpdate() code from cachefile.h into algorithms.{cc,h}Michael Vogt
as it does not require a cachefile at all
2008-01-04support optional PulseInterval in ListUpdateMichael Vogt
2008-01-04* merged the apt--DoListUpdate branch, this provides a common interfaceMichael Vogt
for apt-get update like operations for the frontends and also provides hooks to run stuff in APT::Update::{Pre,Post}-Invoke
2007-06-08* remove all the remaining #pragma implementationMichael Vogt
2006-06-07* apt-pkg/deb/dpkgpm.cc, apt-pkg/contrib/fileutl.{cc,h}:Michael Vogt
- move the RunScripts() code into fileutl.{cc,h} * apt-pkg/cachefile.cc: - add support for "APT::Update::{Pre,Post}-Invoke" scripts
2006-06-07* apt-pkg/cachefile, cmdline/apt-get.cc:Michael Vogt
- move the code that does the work from apt-get.cc to pkgCacheFile::ListUpdate()
2004-09-20'apt-get update' no longer does 'Building Dependency Tree'.Arch Librarian
Author: jgg Date: 2002-04-27 04:28:04 GMT 'apt-get update' no longer does 'Building Dependency Tree'.
2004-09-20Various bug fixesArch Librarian
Author: jgg Date: 2001-07-01 20:49:08 GMT Various bug fixes
2004-09-20Alfredo's vendor stuffArch Librarian
Author: jgg Date: 2001-03-13 06:51:46 GMT Alfredo's vendor stuff
2004-09-20Join with aliencodeArch Librarian
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
2004-09-20Various minor bug fixesArch Librarian
Author: jgg Date: 1999-06-24 04:06:30 GMT Various minor bug fixes
2004-09-20Fixed a typoArch Librarian
Author: jgg Date: 1999-05-04 20:09:48 GMT Fixed a typo
2004-09-20Made apt-cache regenerate its cache in memoryArch Librarian
Author: jgg Date: 1999-04-19 02:35:38 GMT Made apt-cache regenerate its cache in memory
2004-09-20Support for memory-only cachingArch Librarian
Author: jgg Date: 1999-04-18 06:36:36 GMT Support for memory-only caching