diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2013-01-30 14:07:33 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2013-01-30 14:33:20 +0200 |
commit | 480a7faedc74216a940ef75413141317f9a21c42 (patch) | |
tree | 75b39d663e708b1756d5fb156a8ce7c06acf7aff /lib | |
parent | c9b8e104f42dc683745e4f92d3926ccdf4b18559 (diff) | |
download | rpm-480a7faedc74216a940ef75413141317f9a21c42.tar.gz rpm-480a7faedc74216a940ef75413141317f9a21c42.tar.bz2 rpm-480a7faedc74216a940ef75413141317f9a21c42.zip |
Dont skip shared file/dir create if the other one is a ghost
- Explicitly test for shared file/dir being ghost when deciding whether
to skip create: we must never skip the creation of a real file/dir
because of a ghost as the ghosts do not get created.
- This fixes the shared ghost testcase, ie the thing that commit
a712252392eca75443ca45c10a72873cabec7963 was supposed to fix,
without side-effects that I can see.
(cherry picked from commit 147a26c5f672ee3421fe057725f6be357031bbb5)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transaction.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 82d570c62..9d8dbcf0a 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -571,8 +571,14 @@ assert(otherFi != NULL); } else { /* Skip create on all but the first instance of a shared file */ rpmFileAction oaction = rpmfsGetAction(otherFs, otherFileNum); - if (oaction != FA_UNKNOWN && !XFA_SKIPPING(oaction)) - rpmfsSetAction(fs, i, FA_SKIP); + if (oaction != FA_UNKNOWN && !XFA_SKIPPING(oaction)) { + rpmfileAttrs oflags; + /* ...but ghosts aren't really created so... */ + oflags = rpmfiFFlagsIndex(otherFi, otherFileNum); + if (!(oflags & RPMFILE_GHOST)) { + rpmfsSetAction(fs, i, FA_SKIP); + } + } } /* Skipped files dont need fixup size or backups, %config or not */ |