diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2016-11-17 10:01:09 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2016-11-17 10:14:01 +0200 |
commit | bb27f9fffa8e557b931314523473ed782b86cc97 (patch) | |
tree | ee8aeeeac391f74bb69e38247618ef8a830a7921 /lib/verify.c | |
parent | e1f847db589b7ee279f6ef36b51f9ee1f2de5968 (diff) | |
download | rpm-bb27f9fffa8e557b931314523473ed782b86cc97.tar.gz |
Fix %ghost verification and --noghost behavior (RhBug:1395818)
Verify has "always" accepted --noghost as an option but it's always
been broken too, the --noghost option used to *clear* the bit on
qva_fflags, bit which nothing set in the first place. When you
test that bit for enabling verify on ghosts, chances are the ghosts
remain ethereal...
That was until commit efd696d32d343b82832dd9e4aee992bff8e64ad0 fixed
the bit clear to set to make --noghost work on queries, but hardwired
the verify code to no ghosts. Wtf?
So... after 15 years of existence (commit
60977b6c27aca83d1c15deef2e4f759268308075) and somewhat colorful
history, lets make it work and document it too. qva_fflags is supposed
to be a "filter out if matching attribute in file" bitfield but its been
kinda hard to tell when there was one example left which had it the wrong
way around. The original commit has two more examples where the bit setting
is right but disabled with "ifdef NEVER" ... since removed.
Diffstat (limited to 'lib/verify.c')
-rw-r--r-- | lib/verify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/verify.c b/lib/verify.c index ca23ea858..9978a7209 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -505,7 +505,7 @@ static int verifyDependencies(rpmts ts, Header h) int showVerifyPackage(QVA_t qva, rpmts ts, Header h) { rpmVerifyAttrs omitMask = ((qva->qva_flags & VERIFY_ATTRS) ^ VERIFY_ATTRS); - int ghosts = 0; + int ghosts = !(qva->qva_fflags & RPMFILE_GHOST); int ec = 0; int rc; |