summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.h
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | * merged the install-recommends branchMichael Vogt2006-08-151-1/+6
|\ \
| * | * cmdline/apt-get.cc:Michael Vogt2006-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added "--fix-policy" option to make it easy to fix any not-install recommends * apt-pkg/depcache.{cc,h} - MarkInstall() has a new "ForceImportantDeps" option (defaults to false) to fice the install of recommends even for already installed pkgs - a new PolicyBroken() function to see how much of the recommends are broken
| * | * depcache.cc:Michael Vogt2006-05-021-0/+1
| |/ | | | | | | | | | | | | | | - added APT::Install-{Recommends,Suggests} global option * depcache.h: - added DepCache::State::InstPolicyBroken() to check if the current install state violates the policy (compated with InstBroken() that only checks for the minimal requirements)
* | * merged daniel burrows fixes for the auto-mark codeMichael Vogt2005-11-091-5/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * dburrows@debian.org--2005/apt--auto-mark--0--base-0 tag of michael.vogt@ubuntu.com--2005/apt--auto-mark--0--patch-22 * dburrows@debian.org--2005/apt--auto-mark--0--patch-1 doxygenize the new automark stuff * dburrows@debian.org--2005/apt--auto-mark--0--patch-2 Automatically update package markings after every state-changing public operation, and allow users of the dep-cache to group actions into a single action. * dburrows@debian.org--2005/apt--auto-mark--0--patch-3 Automatically update package markings after every state-changing public operation, and allow users of the dep-cache to group actions into a single action. * dburrows@debian.org--2005/apt--auto-mark--0--patch-4 Make action groups noncopyable * dburrows@debian.org--2005/apt--auto-mark--0--patch-5 Typo fix * dburrows@debian.org--2005/apt--auto-mark--0--patch-6 Add a FromUser flag to MarkKeep. * dburrows@debian.org--2005/apt--auto-mark--0--patch-7 Somehow the ActionGroup definition got duplicated; kill the duplicate. * dburrows@debian.org--2005/apt--auto-mark--0--patch-8 Cancel the automatic flag on packages that are being kept only if they are garbage. * dburrows@debian.org--2005/apt--auto-mark--0--patch-9 Don't clear the 'automatically installed' flag in MarkDelete. * dburrows@debian.org--2005/apt--auto-mark--0--patch-10 Add a FromUser flag to MarkInstall, and fix its handling of the Auto flag. * dburrows@debian.org--2005/apt--auto-mark--0--patch-11 Only clear the Auto flag on manual changes in MarkKeep. * dburrows@debian.org--2005/apt--auto-mark--0--patch-12 Make changes from the internal algorithms automatic. * dburrows@debian.org--2005/apt--auto-mark--0--patch-13 Use ActionGroups in algorithms that make lots of changes, and fix a compile error. * dburrows@debian.org--2005/apt--auto-mark--0--patch-14 Split the sweep code into a separate routine from pkgMarkUsed * dburrows@debian.org--2005/apt--auto-mark--0--patch-15 Update another call of MarkKeep to indicate that it's automatic. * dburrows@debian.org--2005/apt--auto-mark--0--patch-16 Move the mark-and-sweep code into pkgDepCache; call Sweep and document what it and Garbage are for; add a hook that can be used to generate a custom root-set function; move the big blob of regexp stuff into the custom root-set; fix the memory leak in the regexp stuff. * dburrows@debian.org--2005/apt--auto-mark--0--patch-17 Make ActionGroup take a reference instead of a pointer to the cache. * dburrows@debian.org--2005/apt--auto-mark--0--patch-18 Don't mark already-to-be-deleted packages as garbage, to imitate aptitude's behavior. * dburrows@debian.org--2005/apt--auto-mark--0--patch-19 Update apt-get for the new auto-mark protocol. * dburrows@debian.org--2005/apt--auto-mark--0--patch-20 Add a setter method for the Auto flag. * dburrows@debian.org--2005/apt--auto-mark--0--patch-21 Fix the test in apt-get about what to delete. * dburrows@debian.org--2005/apt--auto-mark--0--patch-22 Add a zero-argument mark-and-sweep routine and use it to do a mark-and-sweep on startup (so the garbage flags are initialized properly). * dburrows@debian.org--2005/apt--auto-mark--0--patch-23 Right, Status is 2 for new installs, not 0. * dburrows@debian.org--2005/apt--auto-mark--0--patch-24 POT updates. * dburrows@debian.org--2005/apt--auto-mark--0--patch-25 Actually initialize group_level to 0. * dburrows@debian.org--2005/apt--auto-mark--0--patch-26 Don't make an ActionGroup in Sweep, since there's no point and it also is an infinite loop. * dburrows@debian.org--2005/apt--auto-mark--0--patch-27 Add virtual hooks to control whether the garbage collector considers recommends and/or suggests to be strong links. * dburrows@debian.org--2005/apt--auto-mark--0--patch-28 Call the progress methods in the right order so we don't generate nonsensical progress notifications. * dburrows@debian.org--2005/apt--auto-mark--0--patch-29 Typo fix. * dburrows@debian.org--2005/apt--auto-mark--0--patch-30 Make RecommendsImportant default to true in apt, too. * dburrows@debian.org--2005/apt--auto-mark--0--patch-31 Add a release() method to action groups. * dburrows@debian.org--2005/apt--auto-mark--0--patch-32 Add an 'autoremove' command that is synonymous to '--auto-remove remove'.
* | * merged with ubuntu, only use the pkgCache::Flag::Auto flag for ↵Michael Vogt2005-06-291-7/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | automatically installed packages Patches applied: * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) * apt@packages.debian.org/apt--main--0--patch-99 Finalize 0.6.39 * apt@packages.debian.org/apt--ubuntu--0--patch-7 Merge with mainline * apt@packages.debian.org/apt--ubuntu--0--patch-8 install only the ubuntu keyring * apt@packages.debian.org/apt--ubuntu--0--patch-9 Finalize 0.6.39 * apt@packages.debian.org/apt--ubuntu--0--patch-10 Merge with mainline * apt@packages.debian.org/apt--ubuntu--0--patch-11 Update configure.in
* | * use mark-and-sweep from aptitude now as GC algorithmMichael Vogt2005-06-291-5/+11
| |