Handle transaction global pool allocation centrally in rpmtsPool()
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 19 Dec 2012 10:32:52 +0000 (12:32 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 19 Dec 2012 10:47:07 +0000 (12:47 +0200)
commitec19a4968274a7ed11f59ca207dca16ce1ebb1d8
treedd2eb9c0b55a7e16cd1a381b228740025654fec3
parent90e18d0edb587d26777983fb68168857631e559b
Handle transaction global pool allocation centrally in rpmtsPool()

- Previously the pool would only get allocated on successfull addition
  of install or erasure elements, causing assert() failures on
  operations on empty transaction set, which should be just a no-op,
  not an error.
- Make rpmtsPool() create the pool if it doesn't exist, update relevant
  users to call rpmtsPool() instead of directly accessing tsmem->pool,
  this avoids having to worry about pool existence in all the various cases.
- Also fix up the pool-related comment on rpmtsEmpty(): pools does not
  and can not support emptying as it could break references to its
  contents. Per-string refcount would be needed for emptying support.
(cherry picked from commit d73535e1a9dc5095e78475adc5b636d99f01efa9)
lib/depends.c
lib/rpmts.c
lib/rpmts_internal.h
lib/transaction.c