Implement transaction ordering hinting
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 13 Dec 2010 10:03:18 +0000 (12:03 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 13 Dec 2010 10:26:06 +0000 (12:26 +0200)
commit5c43095e1d78b3befe93c746fd182746c3b96c92
treec57347a08501be44320ce49c36a774ff6c647b8b
parent185de185262b2772fa692efc69633f41afc5832a
Implement transaction ordering hinting
- Add support for new "OrderWithRequires: foo" spec syntax
  which has "if and only if foo is present in transaction, order
  the transaction as if this package required foo" semantics.
  While it looks, and in some ways is, a soft dependency, this
  is not the same as recommends/suggests etc: those have unknown
  depsolver policy dependent semantics attached to them, whereas
  ordering hints have a clear definition and is only relevant for rpm
  itself, depsolvers should not even look at the data.
- This allows packages to express correct ordering for optional
  functionality, such as

      %post
      if [ -x %{_bindir}/register-component ]; then
          %{_bindir}/register-component %{name}
      fi

  If the package containing %{_bindir}/register-component is included
  in the same transaction, it makes sense to have it installed before the
  package(s) that use it. But as it is fully optional, Requires would
  not be appropriate. Using OrderWithRequires allows this to be expressed
  without dragging in extraneous dependencies for optional functionality.
build/parsePreamble.c
build/parseReqs.c
build/reqprov.c
lib/order.c
lib/rpmds.c
lib/rpmtag.h
lib/rpmte.c
tests/rpmgeneral.at