Hi!

As I start loosing track of my depsolver patches and to offer a an more convenient way for viewing, reviewing and testing (and a sane development environment) I put the patches into a git repository. It can be found at http://www.jur-linux.org/git/?p=yum-ffesti.git I attached a few notes about what was changed and why and what has to be figured out yet.

Reviews, comments, bug reports and success stories are welcome.

I am currently working on merging ._mytscheck() into .resolveDeps() and to change ._check*() methods to return package object instead of tuples. This allowed to reduce .processReq to just 17 lines (including empty lines and comments). This has also a surprisingly strong performance impact (see attachment, last column - the performance decrease for remove glibc will be fixed soon). Additionally it reduces the depsolver by 200 lines and I am quite confident that it can be simplified even a lot more.

I hope these changes can hit the repository tomorrow.

Have fun!

Florian


Depcheck patchset
-----------------

Goals:
 * Get rid of linear searches
  * gain speed
  * use sqlite/rpmdb instead
  * use inmemory indexes for local rpms
 * Remove search code from depsolver
  * make resolver independent from search implementation
  * allow changing the search implementation easily
  * improve maintainability
 * Generate a universal search interface
  * don't hide any information that's generated anyway
  * return package objects
  * simple semantic - no decisions about "best package"
  * no need for further data processing - only exact hits
  * hide implementation details (internal data structures, caching)
  * return a list like to avoid "not found" special case
  * simplify code using searches
 * Avoid looping over all files
  * avoid loading pkg file lists at all - when ever possible
 * Fix conflicts check
  * speed up
  * don't miss conflicts
  * match against provides

Changes:
 * new search API
  * Sack.getRequires()/.getProvides()
   * gets name flags, version as params
   * returns dict po -> list of matching provides/requires as
     tuple (name, flags, version)
   * implementations for all subclasses
  *  tsInfo.get(New|Old)?(Requires|Provides)
   * used from Depsolver.check*()
   * option to make tsInfo more Sack like in the future
   * tsInfo.localSack
    * in memory index for local rpms
  * replaced old search calls/code
 * Depsolver.checkConflicts()
  * avoids problems with old implementation
  * makes use of new - transaction wide - search API
 * checkFileRequires
  * avoids processing file lists at all
  * works globally - on all FileRequires, not only the new ones
 * Infrastructure
  * move PRCO compare code out of package
  * extend PackageSack to keep indexes up2date
 * remove code no longer needed

Todo:
 * verify PRCO compare code
  * check if Provides need to be compared differently than Requires
    (r:2.1 EQ p:2.1-5 ? vs r:2.1-1 EQ p:2.1 ?)
   * check all getProvides/Requires implementations
  * unit tests 
 * check if local rpms are detected correctly
 * Depsolve.whatProvides vs ts.getProvides?
 * Check setAsDep() call in checkInstall

Misc:
-----

Other patches that emerged during the depcheck refactoring, but are not 
(no longer) related to it. Each can be considered for inclusion 
separatly.

 * Adjust PackageSackBase.matchPackageNames to other matchPackageNames 
   implementations.
  * allows PackageSack as part of MetaSack 
 * Convert Transactioninfo.relatedto/depends_on to sets
  * avoids quadratic behavior for very big installations 
    (saves several 100s seconds in worst case)
 * Make desolver robust against removing of transaction members
  * fix rh#242368
  * allow SkipBroken within the depsolver
  * remove need to nuke caches/already_seen - resolve only once
  * Changes:
   * tsInfo.removedmembers / tsInfo.getRemovedMembers()
   * extended Depsolver.mytscheck 
   * DepCheck.already_seen_removed

Further development:
--------------------

Things that might be considered in the future:
 
 * check where the new search API can be used to 
   simplyfy code outside of mytscheck
 * Have a one to one relation between rpms and package objects
  * load only once
  * easier to compare/identify
 * merge _mytscheck and resolveDeps
  * reduce calls to checkConflicts and checkFilerequires
  * RPMDEP_SENSE_* no longer needed
 * return POs to resolveDeps
  * remove searches for the (name, version, release) of the PO 
 * make all Sacks return the same flags (rpmdb vs sqlite, 
   rpm.RPMSENSE_* vs "GT", "GE", "EQ", ...)
 * SkipBroken in depsolver
 * Autoerase mode in depsolver
 * increase arch awareness
Real time (s)

Operation                | 3.0.3  | 07/05/07| pyrpm  |07/07/17
--------------------------------------------------------------
Warmup: Full install     | 653.51 | 1064.35 | 147.23 | 119.63
Resolve normal install   |  40.59 |  134.11 |   8.04 |  21.68
Resolve full install     | 477.67 | 1093.57 |  51.01 |  71.75
Resolve install [a-k]*   | 313.56 |  887.40 |  33.52 |  61.17
Resolve empty update     |   6.91 |    6.57 |  13.36 |   6.08
Resolve update libgnome  |   3.34 |    2.57 |   7.51 |   5.79
Resolve big update       |  33.04 |   45.56 |  24.81 |  23.75
Resolve erase glibc      |  29.83 |   37.72 |  30.95 |  91.39
Warmup: Dist upgrade     |  81.42 |   40.67 | 108.50 |  20.36
Resolve dist upgrade     |  52.07 |   40.29 |  27.20 |  20.41

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to