Handle HEADERFLAG_SORTED bit correctly in headerUnsort()
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 24 May 2011 11:07:12 +0000 (14:07 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 24 May 2011 11:07:12 +0000 (14:07 +0300)
commitb5d54b35d4bc2745b73f4b75bdebed36abce7ed1
treea7ca7fa105166d8c7f374c19f1960a4d4e2557e8
parentf444e21be0bc644254c5f59310de3cbdbe924f1a
Handle HEADERFLAG_SORTED bit correctly in headerUnsort()
- Within rpm there's exactly one caller of headerUnsort() which has
  kinda taken care of re-sorting the header on exit, but only if it
  returns successfully, meaning the header sort status could've been
  left in inconsistent state with implications on consequent
  operations on that header. Also this is part of the public API
  yet callers have no chance of adjusting the flag when they call it
  (and why should they).
- Also dont bother sorting if the header is already in unsorted state.
lib/header.c