Restore legacy behavior on %ghost %config erasure, mostly upstream/4.11.0.1
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 31 Jan 2013 14:03:30 +0000 (16:03 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 31 Jan 2013 14:30:31 +0000 (16:30 +0200)
commit26389a69ac37f37dd35b12ef340316dc903b3955
treeb8c1060b2c609816501397b3161695fbdde4b664
parenta925476eb47d0716501192d06f6d9ef50e6c5bbb
Restore legacy behavior on %ghost %config erasure, mostly

- Make rpmfiConfigConflict() consider any existing %ghost %config
  as "modified". This causes them to be left alone on erasure to match
  long-standing rpm behavior (whether the behavior is intended or not...)
  Ghost config testcase passes again, talk about flip-flop. Sigh.
- Legacy behavior had an extra twist which we are intentionally NOT
  restoring: if a non-empty %ghost exists at build-time, its digest
  is stored in the header despite the file not being present in
  the payload. With previous versions of rpm, the contents of an
  existing  %ghost %config would be compared to the one in header and
  resulting in different behavior on erasure: if the contents matched
  that of build-time, the file would be removed, otherwise it would
  be preserved. Ghosts remembering their identity from previous life
  goes a little bit too far into the land of paranormal for me...
(cherry picked from commit 233e4573d1d21a36d06874fea6c594428033802e)
lib/rpmfi.c