summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
Commit message (Collapse)AuthorAgeFilesLines
* Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERSJulian Andres Klode2019-06-121-8/+0
|
* Make APT::StringView publicJulian Andres Klode2019-06-111-3/+3
|
* depcache: Remove deprecated functionsJulian Andres Klode2019-02-261-4/+0
|
* Increase debug verbosity in `apt-get autoremove`Filipe Brandenburger2018-05-211-1/+5
| | | | | | | | | | | When running with Debug::pkgAutoRemove=yes, explain why certain packages are being marked, either because they're marked essential/important or because they match the blacklist from APT::NeverAutoRemove. This should help troubleshoot cases where autoremove is not proposing removal of packages expected to be up for removal. Tested manually with `apt-get autoremove -o Debug::pkgAutoRemove=yes`.
* Fix various typos reported by spellcheckersDavid Kalnischkies2018-05-051-2/+2
| | | | | Reported-By: codespell & spellintian Gbp-Dch: Ignore
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-3/+3
| | | | | | | | | | | | | 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.
* fix various typos reported by spellintianDavid Kalnischkies2017-01-191-1/+1
| | | | | | | | Most of them in (old) code comments. The two instances of user visible string changes the po files of the manpages are fixed up as well. Gbp-Dch: Ignore Reported-By: spellintian
* factor out Pkg/DepIterator prettyprinters into own headerDavid Kalnischkies2016-04-281-0/+1
| | | | | | | | | The old prettyprinters have only access to the struct they pretty print, which isn't enough usually as we want to know for a package also a bit of state information like which version is the candidate. We therefore need to pull the DepCache into context and hence use a temporary struct which is printed instead of the iterator itself.
* do not strip epochs from state version stringsDavid Kalnischkies2016-03-161-2/+2
| | | | | | | | | | | The epoch stripping in this code is done since day one, but in other places we show a version epochs are not stripped. If epochs are present in packages they tend to be an important information which we can't just drop and especially can't drop "sometimes" as that confuses users and tools alike – so even if removing code in use for (close to) 18 years feels wrong, it is probably the right choice for consistency. Closes: 818162
* tests: fix typos, correct helpmsgs and test testsDavid Kalnischkies2015-11-291-1/+1
| | | | Git-Dch: Ignore
* add messages to our deprecation warnings in libaptDavid Kalnischkies2015-11-271-1/+1
| | | | Git-Dch: Ignore
* fix a few typos in code-comments/apt manpageDavid Kalnischkies2015-11-201-1/+1
| | | | | Reported-By: codespell Git-Dch: Ignore
* sanify API to get 'the' candidate versionDavid Kalnischkies2015-11-041-2/+13
| | | | | | | | | This was discussed a while ago on #debian-apt and now that I see myself making this mistake lets bite the bullet and fix it in the easy way out version: Using a new name which fits with a similar named setter and deprecate the old method instead of 'hostily' changing API. Closes: #803471
* Add GetPriority(VerIterator) to pkgDepCache::PolicyJulian Andres Klode2015-08-151-0/+1
| | | | | | | Also unify the case of considerFiles and ConsiderFiles to be ConsiderFiles in all cases. Gbp-Dch: ignore
* Only make Upgradable() return true for packages with a candidateJulian Andres Klode2015-08-121-1/+1
| | | | | | | If there is no candidate, the package should not be considered upgradeable. LP: #896689
* bunch of micro-optimizations for depcacheDavid Kalnischkies2015-08-101-14/+14
| | | | | | | | DepCache functions are called a lot, so if we can squeeze some drops out of them for free we should do so. Takes also the opportunity to remove some whitespace errors from these functions. Git-Dch: Ignore
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-2/+2
| | | | | | | | | | | | | | 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
* apply various style suggestions by cppcheckDavid Kalnischkies2015-08-101-1/+1
| | | | | | | Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-161-2/+4
| | | | | | | | 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
* explicit overload methods instead of adding parametersDavid Kalnischkies2014-11-081-2/+2
| | | | | | | | Adding a new parameter (with a default) is an ABI break, but you can overload a method, which is "just" an API break for everyone doing references to this method (aka: nobody). Git-Dch: Ignore
* implement MarkAndSweep in cc instead of headerDavid Kalnischkies2014-10-031-13/+2
| | | | | | | | Having it in the header exposes some implementation details, namely private methods and will cause problems for us if we ever want to change the actions. Git-Dch: Ignore
* mark private methods as hiddenDavid Kalnischkies2014-09-301-5/+5
| | | | | | | | | | We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore
* discard candidates via IsInstallOk to allow overrideDavid Kalnischkies2014-03-231-0/+2
| | | | | | | | | | | | | | | | | | | 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
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-131-1/+2
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+10
| | | | | | | | 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)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* make doxygen more quiet, fix issues and disable latexDavid Kalnischkies2014-03-131-3/+3
| | | | Git-Dch: Ignore
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* don't consider holds for autoremovalDavid Kalnischkies2013-10-011-1/+1
| | | | | | | | | | | 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
* prevent MarkInstall of unsynced Multi-Arch:same siblingsDavid Kalnischkies2013-07-111-13/+17
| | | | | | | | | | | | | | | | | | | Multi-Arch: same packages can be co-installed, but need to have the same version for all installed packages (aka "siblings"). Otherwise the unsynced versions will fight against each other and the auto-install as wel as the problem resolver will later have to decide between holding the packages or to remove one of the siblings (usually a foreign) taking a bunch of packages (like the entire foreign setup) with them. The idea here is now to be more pro-active: MarkInstall will fail for a package if the siblings aren't synced, so we don't allow a situation in which a resolver has to decide if to hold or to remove-upgrade under the assumption that the remove-upgrade decision is always wrong and doesn't deserve to be explored (expect valid out-of-syncs of course). Thats a pretty bold move to take for a library which is used by different solvers so this check is done in IsInstallOk and can be overridden if front-ends want to.
* revert 2184.1.3: forward declaration instead of headersDavid Kalnischkies2011-12-131-0/+5
| | | | | The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-2/+3
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-3/+3
|
* merged from the debian-sid branchMichael Vogt2011-08-151-2/+2
|\
| * rename the parameter name of MarkDelete from Purge to MarkPurge toDavid Kalnischkies2011-08-111-2/+2
| | | | | | | | | | | | fix a cosmetic warning from cppcheck: [apt-pkg/depcache.h:462] -> [apt-pkg/depcache.h:122]: (style) Variable 'Purge' hides enumerator with same name
* | [ABI break] merge patch from Jonathan Thomas to speed up theMichael Vogt2011-07-281-1/+9
| | | | | | | | depcache by caching the install-recommends and install-suggests values
* | merge lp:~mvo/apt/abi-breakMichael Vogt2011-06-291-17/+11
|\ \ | |/ |/|
| * let the Mark methods return if their marking was successfulDavid Kalnischkies2011-05-171-3/+3
| |
| * * apt-pkg/depcache.cc:David Kalnischkies2011-05-171-3/+3
| | | | | | | | - use a boolean instead of an int for Add/Remove in AddStates similar to how it works with AddSizes
| * remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies2011-05-171-10/+1
| | | | | | | | pseudo-package related and/or private
| * tell the resolver a package is set on hold if it was set by the userDavid Kalnischkies2011-05-031-0/+1
| | | | | | | | | | to Keep which happens for example if a user decides to "remove" a not installed package to forbid that it's part of the solution
| * add a first round of stuff needed for talking between APT and solversDavid Kalnischkies2011-03-301-1/+3
| | | | | | | | | | | | based on a very early draft for EDSP by Stefano APT can now write a scenario as well as load most stuff from it.
* | log reinstall commands in history.logDavid Kalnischkies2011-05-231-0/+2
|/
* do not change protected packages in autoinstall (Closes: #618848)David Kalnischkies2011-03-261-1/+2
|
* reorganize the marker methods a bit by moving the common part to aDavid Kalnischkies2011-03-201-0/+4
| | | | seperate IsModeChangeOk which checks sanity and dpkg holds
* Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies2011-03-081-3/+5
| | | | | | | | | Multi-Arch; instead, Arch: all packages only satisfy dependencies for the native arch, except where the Arch: all package is declared Multi-Arch: foreign. (Closes: #613584) This has the sideeffect that arch:all packages internally show up as coming from the native arch - so packages with the architecture "all" doesn't exist any longer in the pkgcache
* * apt-pkg/depcache.cc:David Kalnischkies2010-12-031-0/+19
| | | | | | | - add SetCandidateRelease() to set a candidate version and the candidates of dependencies if needed to a specified release (Closes: #572709) - change pkg/release behavior to use the new SetCandidateRelease so installing packages from experimental or backports is easier
* * apt-pkg/depcache.cc:David Kalnischkies2010-09-291-1/+1
| | | | - do not check endpointer packages instead of only those which prevented NeverAutoRemove settings from having an effect (Closes: #598452)