Revert the severely broken FA_SKIP on %ghost "fix"
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Jan 2013 12:01:59 +0000 (14:01 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 30 Jan 2013 12:33:15 +0000 (14:33 +0200)
- Reverts the bad half of commit a712252392eca75443ca45c10a72873cabec7963:
  treating files that wont be installed as skipped seems logical enough,
  but rpm disagrees... making %ghosts FA_SKIP on install causes
  upgrades on %ghost %config files to miss the necessary FA_SKIP getting
  set on the erase half via handleInstInstalledFile() and
  rpmfiDecideFate(), causing %ghost %config files to be nuked. Which isn't
  very nice when your /var/lib/rpm/ contents are packaged as
  %ghost %config...
- This fixes the %ghost %config testcase but breaks the shared %ghost
  case in turn.
(cherry picked from commit 471b74bf6e218abb06bb3131a259cdfaec3f08cf)

lib/transaction.c

index 1ed1f220bf06306cac7ec659a743a5ba887d9172..82d570c62e26f08e8db9d7ea4ba5ca0c8abd8978 100644 (file)
@@ -759,17 +759,6 @@ static void skipInstallFiles(const rpmts ts, rpmte p)
        ix = rpmfiDX(fi);
        drc[ix]++;
 
-       /*
-        * Always skip %ghosts on install.
-        * XXX: Should we skip directory creation if there are only
-        * %ghosts in it? Traditionally we create the (empty) directory, so
-        * preserving that behavior for now at least: leave the refcount alone.
-        */
-       if (rpmfiFFlags(fi) & RPMFILE_GHOST) {
-           rpmfsSetAction(fs, i, FA_SKIP);
-           continue;
-       }
-
        /* Don't bother with skipped files */
        if (XFA_SKIPPING(rpmfsGetAction(fs, i))) {
            drc[ix]--; dff[ix] = 1;