summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
AgeCommit message (Collapse)Author
2019-02-26depcache: Remove deprecated functionsJulian Andres Klode
2018-05-21Increase debug verbosity in `apt-get autoremove`Filipe Brandenburger
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`.
2018-05-05Fix various typos reported by spellcheckersDavid Kalnischkies
Reported-By: codespell & spellintian Gbp-Dch: Ignore
2017-07-12Reformat and sort all includes with clang-formatJulian Andres Klode
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.
2017-07-12Drop cacheiterators.h includeJulian Andres Klode
Including cacheiterators.h before pkgcache.h fails because pkgcache.h depends on cacheiterators.h.
2017-01-19fix various typos reported by spellintianDavid Kalnischkies
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
2016-04-28factor out Pkg/DepIterator prettyprinters into own headerDavid Kalnischkies
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.
2016-03-16do not strip epochs from state version stringsDavid Kalnischkies
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
2015-11-29tests: fix typos, correct helpmsgs and test testsDavid Kalnischkies
Git-Dch: Ignore
2015-11-27add messages to our deprecation warnings in libaptDavid Kalnischkies
Git-Dch: Ignore
2015-11-20fix a few typos in code-comments/apt manpageDavid Kalnischkies
Reported-By: codespell Git-Dch: Ignore
2015-11-04sanify API to get 'the' candidate versionDavid Kalnischkies
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
2015-08-15Add GetPriority(VerIterator) to pkgDepCache::PolicyJulian Andres Klode
Also unify the case of considerFiles and ConsiderFiles to be ConsiderFiles in all cases. Gbp-Dch: ignore
2015-08-12Only make Upgradable() return true for packages with a candidateJulian Andres Klode
If there is no candidate, the package should not be considered upgradeable. LP: #896689
2015-08-10bunch of micro-optimizations for depcacheDavid Kalnischkies
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
2015-08-10add c++11 override marker to overridden methodsDavid Kalnischkies
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
2015-08-10make all d-pointer * const pointersDavid Kalnischkies
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
2015-08-10apply various style suggestions by cppcheckDavid Kalnischkies
Some of them modify the ABI, but given that we prepare a big one already, these few hardly count for much. Git-Dch: Ignore
2015-06-16add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies
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
2014-11-08explicit overload methods instead of adding parametersDavid Kalnischkies
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
2014-10-03implement MarkAndSweep in cc instead of headerDavid Kalnischkies
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
2014-09-30mark private methods as hiddenDavid Kalnischkies
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
2014-03-23discard candidates via IsInstallOk to allow overrideDavid Kalnischkies
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
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: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2014-03-13make doxygen more quiet, fix issues and disable latexDavid Kalnischkies
Git-Dch: Ignore
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2013-10-01don't consider holds for autoremovalDavid Kalnischkies
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
2013-07-11prevent MarkInstall of unsynced Multi-Arch:same siblingsDavid Kalnischkies
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.
2011-12-13revert 2184.1.3: forward declaration instead of headersDavid Kalnischkies
The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-19do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies
2011-08-15merged from the debian-sid branchMichael Vogt
2011-08-11rename the parameter name of MarkDelete from Purge to MarkPurge toDavid Kalnischkies
fix a cosmetic warning from cppcheck: [apt-pkg/depcache.h:462] -> [apt-pkg/depcache.h:122]: (style) Variable 'Purge' hides enumerator with same name
2011-07-28[ABI break] merge patch from Jonathan Thomas to speed up theMichael Vogt
depcache by caching the install-recommends and install-suggests values
2011-06-29merge lp:~mvo/apt/abi-breakMichael Vogt
2011-05-23log reinstall commands in history.logDavid Kalnischkies
2011-05-17let the Mark methods return if their marking was successfulDavid Kalnischkies
2011-05-17* apt-pkg/depcache.cc:David Kalnischkies
- use a boolean instead of an int for Add/Remove in AddStates similar to how it works with AddSizes
2011-05-17remove deprecated methods which nobody should have used anyway likeDavid Kalnischkies
pseudo-package related and/or private
2011-05-03tell the resolver a package is set on hold if it was set by the userDavid Kalnischkies
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
2011-03-30add a first round of stuff needed for talking between APT and solversDavid Kalnischkies
based on a very early draft for EDSP by Stefano APT can now write a scenario as well as load most stuff from it.
2011-03-26do not change protected packages in autoinstall (Closes: #618848)David Kalnischkies
2011-03-20reorganize the marker methods a bit by moving the common part to aDavid Kalnischkies
seperate IsModeChangeOk which checks sanity and dpkg holds
2011-03-08Remove the "pseudopackage" handling of Architecture: all packages forDavid Kalnischkies
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
2010-12-03* apt-pkg/depcache.cc:David Kalnischkies
- 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
2010-09-29* apt-pkg/depcache.cc:David Kalnischkies
- do not check endpointer packages instead of only those which prevented NeverAutoRemove settings from having an effect (Closes: #598452)
2010-08-28* apt-pkg/contrib/configuration.cc:David Kalnischkies
- fix autoremove by using correct config-option name and don't make faulty assumptions in error handling (Closes: #594689)
2010-07-04* apt-pkg/policy.h:David Kalnischkies
- add another round of const& madness as the previous round accidently NOT override the virtual GetCandidateVer() method (Closes: #587725)