summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* * apt-pkg/contrib/configuration.cc:David Kalnischkies2010-08-281-1/+1
| | | | - fix autoremove by using correct config-option name and don't make faulty assumptions in error handling (Closes: #594689)
* * apt-pkg/policy.h:David Kalnischkies2010-07-041-3/+3
| | | | - add another round of const& madness as the previous round accidently NOT override the virtual GetCandidateVer() method (Closes: #587725)
* - use the new MatchAgainstConfig for the DefaultRootSetFuncDavid Kalnischkies2010-06-261-16/+6
| | | | * apt-pkg/contrib/configuration.{cc,h}: - add a wrapper to match strings against configurable regex patterns
* * apt-pkg/depcache.cc:David Kalnischkies2010-06-161-1/+1
| | | | - SetCandidateVer for all pseudo packages - SetReInstall for the "all" package of a pseudo package
* * apt-pkg/depcache.cc:David Kalnischkies2010-06-031-5/+7
| | | | | | | | | | | | - 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.
* deprecate AddSize with Multiplier as it is unused and switch toDavid Kalnischkies2010-06-031-2/+3
| | | boolean instead to handle the sizes more gracefully.
* rewrite the pseudo package reinstaller to be more intelligentDavid Kalnischkies2010-04-281-0/+2
| | | | | | | | | | in his package choices The previous implementation tried to install the package for arch A and if this fails B, C and so on. This results in wrong architecture choices for packages which depend on other pseudo packages, so he will now try to install the dependencies first before trying the package itself and only if this fails he tries the next architecture.
* regex for package names executed on Grp- not PkgIteratorDavid Kalnischkies2010-04-131-0/+1
|
* merge MultiArch-ABI. We don't support MultiArch yet (as most other tools),David Kalnischkies2010-03-181-6/+12
|\ | | | | | | | | but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029)
| * We need to kill also pseudo packages which have no dependency, noDavid Kalnischkies2010-03-011-0/+1
| | | | | | | | | | | | | | | | | | installed reverse dependency and which also doesn't provide something. They cause problems if this pseudo packages get new dependencies. As a consequence we also need to recheck the dependencies of a killed pseudo package (and especially the providers of these dependencies) to really kill all non required packages.
| * Enable the AutoRemover to talk "Multi-Arch" by marking all pseudoDavid Kalnischkies2010-02-271-2/+2
| | | | | | | | | | | | | | | | | | packages in a group if one is marked. The auto-installed flag is from now on Architecture bound: A section without an architecture tag will be treated as applying to all architectures - the next write operation will take care of this by creating separate sections for the architectures.
| * Add yet another pseudo package which isn't as pseudo as the others:David Kalnischkies2010-02-121-0/+1
| | | | | | | | | | | | | | | | | | | | Arch all packages are now represented by arch depending packages which all depend on a package with the same name and the special arch "all". This packages has NO dependencies, but beside this the same information. It is the only package which has a size, the arch depending ones all have a zero size. While the arch depending pseudo packages are used for dependency resolution the arch "all" package is used for downloading and ordering of the package.
| * Pre-MultiArch a package which depends on a package with architecture "all"David Kalnischkies2010-02-101-4/+8
| | | | | | | | | | | | | | | | | | | | can be sure that a package comeing in as a dependency of this package will be of the same architecture as itself (or all). We don't want to break this, so internal an arch all package is represented as many arch depending packages. The only problem we have now is that we only know that a arch all package is installed or not - we don't know for which architecture it was installed: So we will look at all these broken arch all pseudo packages and "remove" them.
* | * apt-pkg/depcache.cc:David Kalnischkies2010-03-141-1/+1
|/ | | | | - remove Auto-Installed information from extended_states together with the package itself (Closes: #572364)
* * remove the MarkKeep calls if Is{Delete,Install}Ok false, becauseDavid Kalnischkies2009-07-071-0/+16
| | | | | | they have no effect anyway (thanks Daniel Burrows for noticing) * improve documentation of the Is{Delete,Install}Ok methods a bit * add the FromUser boolean to the debug output of the markers
* * add hook for MarkInstall and MarkDelete (closes: #470035)David Kalnischkies2009-06-301-16/+24
| | | | | | | | * honor the dpkg hold state in new Marker hooks (closes: #64141) Combine the proposed AutoInstOk and IsAutoInstallOk to more general hooks for MarkInstall (and another one for MarkDelete) with the same parameters as the call these hooks should check.
* merge the AutoInstOk patch from debian-experimentalMichael Vogt2009-06-301-12/+14
|
* add hook for auto-install (closes: #470035)Michael Vogt2009-06-291-0/+13
|
* * add depth information to the debug output and show what dependsMichael Vogt2009-06-291-3/+7
| | | | | type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520)
* typo fixesMichael Vogt2008-03-111-2/+2
|
* * fixed compile errors with g++ 7.3 (thanks to Michael Vogt2007-06-191-0/+1
| | | | | Daniel Burrows, closes: #429378) * fix FTFBFS by changing build-depends to libcurl4-gnutls-dev (closes: #428363)
* * merged another missing bit from the ubuntu branchMichael Vogt2007-06-091-1/+1
|
* * merged the no-pragma branchMichael Vogt2006-12-141-3/+0
|\
| * * removed the pragma messMichael Vogt2006-10-021-3/+0
| |