summaryrefslogtreecommitdiff
path: root/apt-pkg/algorithms.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix progress output for (dist-)upgrade calculationDavid Kalnischkies2014-09-271-10/+6
| | | | | | | | | | | | | | | | | Previously, we had a start and a done of the calculation printed by higher-level code, but this got intermixed by progress reporting from an external solver or the output of autoremove code… The higherlevel code is now only responsible for instantiating a progress object of its choosing (if it wants progress after all) and the rest will be handled by the upgrade code. Either it is used to show the progress of the external solver or the internal solver will give some hints about its overall progress. The later isn't really a proper progress as it will jump forward after each substep, but that is at least a bit better than before without any progress indication. Fixes also the 'strange' non-display of this progress line in -q=1, while all others are shown, which is reflected by all testcase changes.
* consider priorities only for downloadable pkgs in resolverDavid Kalnischkies2014-04-111-8/+11
| | | | | | | | | | 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.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-7/+6
| | | | | | | | 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: useless cast to type A [-Wuseless-cast]David Kalnischkies2014-03-131-2/+2
| | | | | Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
* check version before adding scores in resolverDavid Kalnischkies2014-03-131-1/+12
| | | | | | 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.
* do not do the same looping twiceDavid Kalnischkies2014-03-131-7/+1
| | | | Git-Dch: Ignore
* propagate a negative score point along breaks/conflictsDavid Kalnischkies2014-03-131-14/+25
| | | | | | | | | | | | | | | | | 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.
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-6/+6
|
* Move ListUpdate/AquireUpdate into update.{cc,h}Michael Vogt2013-10-051-99/+0
| | | | | This moves the ListUpdate/AquireUpdate out of the "catch-all" algorithm.{cc,h} file into its own update.{cc,h}
* * move upgrade releated code into upgrade.{cc,h}Michael Vogt2013-10-051-238/+0
| | | | | | 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).
* cleanup upgrade API some more (thanks for the feedback from David)Michael Vogt2013-10-051-10/+15
|
* improve the API for Upgrade()Michael Vogt2013-09-181-8/+30
|
* squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-5/+46
| | | | experimental
* Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt2013-07-021-2/+4
|\ | | | | | | | | Conflicts: debian/changelog
| * deprecate InstallProtect as a cpu-eating no-opDavid Kalnischkies2013-06-091-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | make starting debug output of pkgProblemResolver proper englishMichael Vogt2013-06-281-2/+4
| |
* | use just one line for the debug output (thanks to donkult for the review)Michael Vogt2013-06-271-4/+2
| |
* | show broken count when starting the resolverMichael Vogt2013-06-271-2/+6
|/
* merged from the debian-wheezy branchMichael Vogt2013-05-081-1/+4
|\
| * * apt-pkg/algorithms.cc:Michael Vogt2013-05-081-1/+4
| | | | | | | | | | | | - 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)
* | fix pkgProblemResolver::Scores, thanks to Paul Wise. Michael Vogt2013-01-081-8/+11
|\ \ | |/ |/| Closes: #697577
| * fix pkgProblemResolver::Scores, thanks to Paul Wise. Michael Vogt2013-01-081-7/+7
|/ | | Closes: #697577
* * apt-pkg/algorithms.cc:Jonathan Thomas2012-11-101-3/+9
| | | | - fix package-pointer array memory leak in ResolveByKeepInternal()
* * apt-pkg/algorithms.cc:David Kalnischkies2012-11-091-8/+8
| | | | - ensure pkgProblemResolver calls MarkDelete without FromUser set so that it can't overrule holds and the protection flag
* handle packages without a mandatory architecture (debian-policy §5.3)David Kalnischkies2012-09-091-0/+5
| | | | | 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)
* * apt-pkg/deb/deblistparser.cc:David Kalnischkies2012-06-101-5/+30
| | | | | - set pkgCacheGen::Essential to "all" again (Closes: #675449) * apt-pkg/algorithms.cc: - force install only for one essential package out of a group
* * apt-pkg/algorithms.cc:Marius Vollmer2012-05-151-0/+6
| | | | - fix memory leak of Flags in pkgSimulate by a proper destructor
* * apt-pkg/algorithms.cc:David Kalnischkies2012-05-101-11/+26
| | | | - factor out of ListUpdate a AcquireUpdate to be able to provide your own pkgAcquire fetcher to the wrapper
* merge with apt/experimentalDavid Kalnischkies2012-03-061-2/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * * Treat the Important flag like the Essential flag with two differences:Julian Andres Klode2012-03-051-2/+11
| | | | | | | | - No Immediate configuration (see above) - Not automatically installed during dist-upgrade
* | fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies2012-03-041-1/+1
|/ | | | initialized in the constructor." messages (no functional change)
* * apt-pkg/algorithms.cc:Colin Watson2012-01-291-15/+15
| | | | | - use a signed int instead of short for score calculation as upgrades become so big now that it can overflow (Closes: #657732, LP: #917173)
* * apt-pkg/algorithms.cc:Colin Watson2012-01-291-2/+1
| | | | | - 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)
* merge with my debian-sid branchDavid Kalnischkies2011-10-301-2/+9
|\
| * * algorithms.cc:David Kalnischkies2011-10-171-2/+9
| | | | | | - show a debug why a package was kept by ResolveByKeep()
| * * apt-pkg/deb/dpkgpm.cc:David Kalnischkies2011-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | - 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
* | * apt-pkg/algorithms.cc:David Kalnischkies2011-09-201-1/+1
| | | | | | - if a package is garbage, don't try to save it with FixByInstall
* | fix foldmarker in algorithms.hDavid Kalnischkies2011-09-191-3/+2
| |
* | use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+3
| |
* | merge with debian/experimentalDavid Kalnischkies2011-09-131-31/+31
|\ \
| * | merged from the debian-sid branchMichael Vogt2011-08-151-31/+31
| |\|
| | * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-31/+31
| | | | | | | | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* | | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|/ /
* | merged from http://bzr.debian.org/bzr/apt/apt/debian-sidMichael Vogt2011-07-151-6/+34
|\|
| * make ResolveByKeep() more clever and hold back packages that would go into a ↵Michael Vogt2011-07-141-6/+34
| | | | | | | | broken policy state by the upgrade
* | rename option APT::Solver::Name to simply APT::SolverDavid Kalnischkies2011-05-171-4/+4
| |
* | * Implement EDSP in libapt-pkg so that all front-ends whichDavid Kalnischkies2011-05-171-6/+49
|\ \ | |/ |/| | | | | | | | | 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
| * implement proper progress report with OpProgressDavid Kalnischkies2011-05-091-8/+16
| |
| * implement external solver calling for upgrade and dist-upgrade, tooDavid Kalnischkies2011-05-031-18/+22
| |
| * doesn't execute autoremove marker setting if an external solver is calledDavid Kalnischkies2011-05-021-0/+2
| | | | | | | | | | | | | | and instead rely on the Autoremove tagging to show us what could be done. (apt-internal-solver doesn't support this currently as it doesn't load the auto-information into the cache)