Make sure installed files have state (rhbz#492947)
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 3 Apr 2009 07:28:59 +0000 (10:28 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 3 Apr 2009 07:34:26 +0000 (10:34 +0300)
commitc40f6d5dcabfe0b68b830d96b01eaedac0b2d18d
tree6507e77336066d591767fceaa46e9c5540123b1b
parent4c23ebdb81d8e8a00ccf7e92d7e3788081b2f57d
Make sure installed files have state (rhbz#492947)
- rpmfsSetState() doesn't get called for skipped files like %ghost and
  %config(noreplace), causing incorrect file state ("no state") getting
  recorded in rpmdb, leading to inapproriate removal/rename on erase, ick
- For TR_ADDED, always default file states to RPMFILE_STATE_NORMAL, fsm
  changes it as necessary for skipped colors and such. Lazy alloc on
  rpmfsSetState() is not correct as rpmfsSetState() might not get called
  at all.
- originally broken by commit 8d6c4b8c95b59f5a71d90c582c2e98f5c7ed7b9d
lib/fsm.c
lib/rpmte.c
lib/rpmte_internal.h