summaryrefslogtreecommitdiff
path: root/apt-pkg/clean.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* allow a method to request auxiliary filesDavid Kalnischkies2018-01-031-5/+6
| | | | | | | | | | | | | | | | | | | | If a method needs a file to operate like e.g. mirror needs to get a list of mirrors before it can redirect the the actual requests to them. That could easily be solved by moving the logic into libapt directly, but by allowing a method to request other methods to do something we can keep this logic contained in the method and allow e.g. also methods which perform binary patching or similar things. Previously they would need to implement their own acquire system inside the existing one which in all likelyhood will not support the same features and methods nor operate with similar security compared to what we have already running 'above' the requesting method. That said, to avoid methods producing conflicts with "proper" files we are downloading a new directory is introduced to keep the auxiliary files in. [The message magic number 351 is a tribute to the german Grundgesetz article 35 paragraph 1 which defines that all authorities of the state(s) help each other on request.]
* remove pointless APT_PURE from void functionsDavid Kalnischkies2017-12-141-1/+1
| | | | | | | | | | | Earlier gcc versions used to complain that you should add them althrough there isn't a lot of point to it if you think about it, but now gcc (>= 8) complains about the attribute being present. warning: ‘pure’ attribute on function returning ‘void’ [-Wattributes] Reported-By: gcc -Wattributes Gbp-Dch: Ignore
* Replace APT_CONST with APT_PURE everywhereJulian Andres Klode2017-08-241-1/+1
| | | | | As a follow up to the last commit, let's replace APT_CONST with APT_PURE everywhere to clean stuff up.
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-7/+7
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Drop cacheiterators.h includeJulian Andres Klode2017-07-121-1/+0
| | | | | Including cacheiterators.h before pkgcache.h fails because pkgcache.h depends on cacheiterators.h.
* clean archives without changing directoryDavid Kalnischkies2017-06-261-23/+33
| | | | | Adopting this change in other frontends will require source changes as well similar to our own changes in apt-private/.
* non-existing directories don't need to be cleanedDavid Kalnischkies2015-12-141-0/+5
| | | | | | | | | | Trying to clean up directories which do not exist seems rather silly if you think about it, so let apt think about it and stop it. Depends a bit on the caller if this is fixing anything for them as they might try to acquire a lock or doing other clever things as apt does. Closes: 807477
* ignore lost+found in private directory cleanupDavid Kalnischkies2015-11-191-0/+1
| | | | | | | | | | In ce1f3a2c we started warning about failing unlinking, which we consistently do for directories. That isn't a problem as directories usually aren't in the places we do want to clean up – with the potential exeception of "lost+found", so lets ignore it like we ignore our own partial/ subdirectory. Closes: 805424
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-161-0/+1
| | | | | | | | To have a chance to keep the ABI for a while we need all three to team up. One of them missing and we might loose, so ensuring that they are available is a very tedious but needed task once in a while. Git-Dch: Ignore
* store Release files data in the CacheDavid Kalnischkies2015-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to read the Release file for each Packages file and store the data in the PackageFile struct even through potentially many Packages (and Translation-*) files could use the same data. The point of the exercise isn't the duplicated data through. Having the Release files as first-class citizens in the Cache allows us to properly track their state as well as allows us to use the information also for files which aren't in the cache, but where we know to which Release file they belong (Sources are an example for this). This modifies the pkgCache structs, especially the PackagesFile struct which depending on how libapt users access the data in these structs can mean huge breakage or no visible change. As a single data point: aptitude seems to be fine with this. Even if there is breakage it is trivial to fix in a backportable way while avoiding breakage for everyone would be a huge pain for us. Note that not all PackageFile structs have a corresponding ReleaseFile. In particular the dpkg/status file as well as *.deb files have not. As these have only a Archive property need, the Component property takes over this duty and the ReleaseFile remains zero. This is also the reason why it isn't needed nor particularily recommended to change from PackagesFile to ReleaseFile blindly. Sticking with the earlier is usually the better option.
* fix compile and tests errorDavid Kalnischkies2014-10-131-1/+1
| | | | | | I am pretty sure I did that before committing broken stuff… Git-Dch: Ignore
* do not inline virtual destructors with d-pointersDavid Kalnischkies2014-10-131-0/+2
| | | | | | | | | | | | | | 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
* Do not clean "/" in pkgAcquire::Clean/pkgArchiveCleanerMichael Vogt2014-07-081-1/+4
| | | | | | | Having "/" here is most likely a user configuration error and may cause removal of import symlinks like /vmlinuz Closes: #753531
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+4
| | | | | | | | 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)
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* * apt-pkg/clean.cc:David Kalnischkies2012-07-051-2/+3
| | | | - run autoclean against pkg:arch and not always against pkg:native as this removes valid cache entries (Closes: #679371)
* * apt-pkg/acquire-worker.cc:David Kalnischkies2012-03-201-4/+7
| | | | | | | | | | | - 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
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-5/+5
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-2/+2
|\
| * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-2/+2
| | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|/
* merge Goswin Brederlow "support download of index files for different archs"David Kalnischkies2009-12-231-3/+3
| | | | | | | | | | | | | | patch which includes the following big changes: - Declare the unused [vendor] field in sources.list as option field, e.g. deb [arch=amd64,i386 lang=en_GB have=fun] http://example.org - When fetching index files download them for all APT::Architectures (overrideable with the options field above) - Allow all architectures of APT::Architectures to be in the Cache - Add the architecture to status and progress informations - Add b= (Binary architecture) to policy This commit doesn't incude the "pin-hack" as the Group structure will take care of this (and does it already to some extend).
* add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies2009-06-301-1/+0
|
* * remove all the remaining #pragma implementationMichael Vogt2007-06-081-4/+0
|
* Join with aliencodeArch Librarian2004-09-201-9/+19
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* Added clean install codeArch Librarian2004-09-201-2/+6
| | | | | | Author: jgg Date: 1999-10-03 21:09:27 GMT Added clean install code
* Various minor bug fixesArch Librarian2004-09-201-2/+1
| | | | | | Author: jgg Date: 1999-06-24 04:06:30 GMT Various minor bug fixes
* Clean supportArch Librarian2004-09-201-0/+111
Author: jgg Date: 1999-02-01 08:11:57 GMT Clean support