PORTING_INFO 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. * add rule
  2. * p = direct literal; always < 0 for installed rpm rules
  3. * d, if < 0 direct literal, if > 0 offset into whatprovides, if == 0 rule is assertion (look at p only)
  4. *
  5. *
  6. * A requires b, b provided by B1,B2,B3 => (-A|B1|B2|B3)
  7. *
  8. * p < 0 : pkg id of A
  9. * d > 0 : Offset in whatprovidesdata (list of providers of b)
  10. *
  11. * A conflicts b, b provided by B1,B2,B3 => (-A|-B1), (-A|-B2), (-A|-B3)
  12. * p < 0 : pkg id of A
  13. * d < 0 : Id of solvable (e.g. B1)
  14. *
  15. * d == 0: unary rule, assertion => (A) or (-A)
  16. *
  17. * Install: p > 0, d = 0 (A) user requested install
  18. * Remove: p < 0, d = 0 (-A) user requested remove (also: uninstallable)
  19. * Requires: p < 0, d > 0 (-A|B1|B2|...) d: <list of providers for requirement of p>
  20. * Updates: p > 0, d > 0 (A|B1|B2|...) d: <list of updates for solvable p>
  21. * Conflicts: p < 0, d < 0 (-A|-B) either p (conflict issuer) or d (conflict provider) (binary rule)
  22. * also used for obsoletes
  23. * ?: p > 0, d < 0 (A|-B)
  24. * No-op ?: p = 0, d = 0 (null) (used as policy rule placeholder)
  25. *
  26. * resulting watches:
  27. * ------------------
  28. * Direct assertion (no watch needed)( if d <0 ) --> d = 0, w1 = p, w2 = 0
  29. * Binary rule: p = first literal, d = 0, w2 = second literal, w1 = p
  30. * every other : w1 = p, w2 = whatprovidesdata[d];
  31. * Disabled rule: w1 = 0
  32. *
  33. * always returns a rule for non-rpm rules
  34. p > 0, d = 0, (A), w1 = p, w2 = 0
  35. p < 0, d = 0, (-A), w1 = p, w2 = 0
  36. p !=0, d = 0, (p|q), w1 = p, w2 = q