summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
AgeCommit message (Collapse)Author
2015-01-10award points for positive dependencies againDavid Kalnischkies
Commit 9ec748ff103840c4c65471ca00d3b72984131ce4 from Feb 23 last year adds a version check after 8daf68e366fa9fa2794ae667f51562663856237c added 8 days earlier negative points for breaks/conflicts with the intended that only dependencies which are satisfied propagate points (aka: old conflicts do not). The implementation was needlessly complex and flawed through preventing positive dependencies from gaining points like they did before these commits making library transitions harder instead of simpler. It worked out anyhow most of the time out of pure 'luck' (and other ways of gaining points) or got miss attributed to being a temporary hick-up. Closes: 774924
2014-04-11consider priorities only for downloadable pkgs in resolverDavid Kalnischkies
A package which can't be downloaded anymore is very likely dropped from a release and can therefore no longer be 'standard' (or similar). We therefore do not grant points for them anymore and demote them to prio:extra instead which helps other packages breaking them away even if they have a lower priority. The testcase was initially created by Michael Vogt and just amended.
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: useless cast to type A [-Wuseless-cast]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
2014-03-13check version before adding scores in resolverDavid Kalnischkies
Prevents that "old" dependencies have an influence in the scoring. With positive dependencies this is usually not a problem, but negative dependencies can linger around for a long time.
2014-03-13do not do the same looping twiceDavid Kalnischkies
Git-Dch: Ignore
2014-03-13propagate a negative score point along breaks/conflictsDavid Kalnischkies
versioned -dev packages like db and boost have the problem of no dependencies which would give them a competitive advantage against an older incarnation of the -dev package, so they tend to be kept back until the old version is removed from the archive, which, if the user has older releases in its sources can take a long time (or never happens). The newer version has a conflicts/breaks against the older one, but the older one hasn't against the newer, so by giving via the conflicts the older one a reduced score the newer one can win if there is no other reason to keep it. If both have a conflict against each other the scoring will cancel itself out, so no harm done. This gives "action" a slightly bigger edge in breaks/conflicts cases than before, but holding back isn't a really good solution anyway.
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2013-10-05Move ListUpdate/AquireUpdate into update.{cc,h}Michael Vogt
This moves the ListUpdate/AquireUpdate out of the "catch-all" algorithm.{cc,h} file into its own update.{cc,h}
2013-10-05* move upgrade releated code into upgrade.{cc,h}Michael Vogt
The upgrade releated code is moved into upgrade.{cc,h} and all pkg*Upgrade* prototypes are included in algorihms.h to avoid breaking API (unless build with APT_9_CLEANER_HEADERS).
2013-10-05cleanup upgrade API some more (thanks for the feedback from David)Michael Vogt
2013-09-18improve the API for Upgrade()Michael Vogt
2013-08-12squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt
experimental
2013-07-02Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt
Conflicts: debian/changelog
2013-06-28make starting debug output of pkgProblemResolver proper englishMichael Vogt
2013-06-27use just one line for the debug output (thanks to donkult for the review)Michael Vogt
2013-06-27show broken count when starting the resolverMichael Vogt
2013-06-09deprecate InstallProtect as a cpu-eating no-opDavid Kalnischkies
In the past packages were flagged "Protected" so that install/ remove markings where issued before the ProblemResolver. Nowadays, the marking methods check if they are allowed to modify the marking of a package instead, so that markings set by FromUser calls are not overwritten anymore by automatic calls which elimates the need for InstallProtect which just eats CPU now. The method itself is left untouched for now in case frontend needs it still for some wierd usecase, but they should be eliminated.
2013-05-08merged from the debian-wheezy branchMichael Vogt
2013-05-08* apt-pkg/algorithms.cc:Michael Vogt
- Do not propagate negative scores from rdepends. Propagating the absolute value of a negative score may boost obsolete packages and keep them installed instead of installing their successors. (Closes: #699759)
2013-01-08fix pkgProblemResolver::Scores, thanks to Paul Wise. Michael Vogt
Closes: #697577
2013-01-08fix pkgProblemResolver::Scores, thanks to Paul Wise. Michael Vogt
Closes: #697577
2012-11-10* apt-pkg/algorithms.cc:Jonathan Thomas
- fix package-pointer array memory leak in ResolveByKeepInternal()
2012-11-09* apt-pkg/algorithms.cc:David Kalnischkies
- ensure pkgProblemResolver calls MarkDelete without FromUser set so that it can't overrule holds and the protection flag
2012-09-09handle packages without a mandatory architecture (debian-policy §5.3)David Kalnischkies
by introducing a pseudo-architecture 'none' so that the small group of users with these packages can get right of them without introducing too much hassle for other users (Closes: #686346)
2012-06-10* apt-pkg/deb/deblistparser.cc:David Kalnischkies
- set pkgCacheGen::Essential to "all" again (Closes: #675449) * apt-pkg/algorithms.cc: - force install only for one essential package out of a group
2012-05-15* apt-pkg/algorithms.cc:Marius Vollmer
- fix memory leak of Flags in pkgSimulate by a proper destructor
2012-05-10* apt-pkg/algorithms.cc:David Kalnischkies
- factor out of ListUpdate a AcquireUpdate to be able to provide your own pkgAcquire fetcher to the wrapper
2012-03-06merge with apt/experimentalDavid Kalnischkies
* apt-pkg/packagemanager.cc: - fix bug in predepends handling - ensure that packages that needs unpackaging are unpacked before they are configured (LP: #927993) [ Julian Andres Klode ] * apt-pkg/deb/deblistparser.cc: - Set the Essential flag on APT instead of only Important * apt-pkg/packagemanager.cc: - Do not use immediate configuration for packages with the Important flag * Treat the Important flag like the Essential flag with those differences: - No Immediate configuration (see above) - Not automatically installed during dist-upgrade - No higher score for installation ordering
2012-03-05* Treat the Important flag like the Essential flag with two differences:Julian Andres Klode
- No Immediate configuration (see above) - Not automatically installed during dist-upgrade
2012-03-04fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies
initialized in the constructor." messages (no functional change)
2012-01-29* apt-pkg/algorithms.cc:Colin Watson
- use a signed int instead of short for score calculation as upgrades become so big now that it can overflow (Closes: #657732, LP: #917173)
2012-01-29* apt-pkg/algorithms.cc:Colin Watson
- don't break out of the main-resolver loop for Breaks to deal with all of them in a single iteration (Closes: #657695, LP: #922485)
2011-10-30merge with my debian-sid branchDavid Kalnischkies
2011-10-17* algorithms.cc:David Kalnischkies
- show a debug why a package was kept by ResolveByKeep()
2011-09-20* apt-pkg/deb/dpkgpm.cc:David Kalnischkies
- use std::vector instead of fixed size arrays to store args and multiarch-packagename strings - load the dpkg base arguments only one time and reuse them later * cmdline/apt-get.cc: - follow Provides in the evaluation of saving candidates, too, for statisfying garbage package dependencies (Closes: #640590) * apt-pkg/algorithms.cc: - if a package is garbage, don't try to save it with FixByInstall
2011-09-20* apt-pkg/algorithms.cc:David Kalnischkies
- if a package is garbage, don't try to save it with FixByInstall
2011-09-19fix foldmarker in algorithms.hDavid Kalnischkies
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-13merge with debian/experimentalDavid Kalnischkies
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies
2011-08-15merged from the debian-sid branchMichael Vogt
2011-08-11cppcheck complains about some possible speed improvements which could beDavid Kalnischkies
done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
2011-07-15merged from http://bzr.debian.org/bzr/apt/apt/debian-sidMichael Vogt
2011-07-14make ResolveByKeep() more clever and hold back packages that would go into a ↵Michael Vogt
broken policy state by the upgrade
2011-05-17rename option APT::Solver::Name to simply APT::SolverDavid Kalnischkies
2011-05-17* Implement EDSP in libapt-pkg so that all front-ends whichDavid Kalnischkies
use the internal resolver can now be used also with external ones as the usage is hidden in between the old API * provide two edsp solvers in apt-utils: - 'dump' to quickly output a complete scenario and - 'apt' to use the internal as an external resolver
2011-05-11convert a lot of places to use IsNegative instead of checking by handDavid Kalnischkies
for the three different dependencies
2011-05-09implement proper progress report with OpProgressDavid Kalnischkies
2011-05-03implement external solver calling for upgrade and dist-upgrade, tooDavid Kalnischkies