diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2017-12-15 16:06:13 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2018-03-28 14:09:16 +0300 |
commit | aedc90edd22ecf63ae675ae9e78a776eb8fa686e (patch) | |
tree | 29940c17b91b1190588bee5d98a38483b751bf1b | |
parent | f5a58300e1f9267f95f4ecdc2cad0430faf90903 (diff) | |
download | rpm-aedc90edd22ecf63ae675ae9e78a776eb8fa686e.tar.gz |
Explicitly skip non-installed files on erasure
Up to now, actions of non-installed files (due to eg --nodocs) were left
uninitialized making us look kinda confused:
D: unknown 000000 0 ( 0, 0) 0 /usr/share/man/man1/telnet.1.gz
D: unknown 000000 0 ( 0, 0) 0 /usr/share/doc/telnet/README
D: unknown 000000 0 ( 0, 0) 0 /usr/share/doc/telnet
D: erase 100755 1 ( 0, 0)101848 /usr/bin/telnet
We know perfectly well what to do with them - they should be skipped. So
lets explicitly mark them that way, which makes the debug output more
sensible and the logic a wee bit mmore robust. However this is not supposed
to change any actual behavior. Supposed.
(cherry picked from commit 2d52726bd55f008ea23262c2a3a31ae689cd2af4)
-rw-r--r-- | lib/transaction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index b64f466ab..3e11190ed 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -629,8 +629,10 @@ assert(otherFi != NULL); } if (XFA_SKIPPING(rpmfsGetAction(fs, i))) break; - if (rpmfilesFState(fi, i) != RPMFILE_STATE_NORMAL) + if (rpmfilesFState(fi, i) != RPMFILE_STATE_NORMAL) { + rpmfsSetAction(fs, i, FA_SKIP); break; + } /* Pre-existing modified config files need to be saved. */ if (rpmfilesConfigConflict(fi, i)) { |