|
|
5523e9 |
diff --git a/lib/query.c b/lib/query.c
|
|
|
5523e9 |
index 6f2d593a7..8a2623241 100644
|
|
|
5523e9 |
--- a/lib/query.c
|
|
|
5523e9 |
+++ b/lib/query.c
|
|
|
5523e9 |
@@ -150,8 +150,8 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
|
|
|
5523e9 |
if ((qva->qva_flags & QUERY_FOR_LICENSE) && !(fflags & RPMFILE_LICENSE))
|
|
|
5523e9 |
continue;
|
|
|
5523e9 |
|
|
|
5523e9 |
- /* If not querying %ghost, skip ghost files. */
|
|
|
5523e9 |
- if ((qva->qva_fflags & RPMFILE_GHOST) && (fflags & RPMFILE_GHOST))
|
|
|
5523e9 |
+ /* Skip on attributes (eg from --noghost) */
|
|
|
5523e9 |
+ if (fflags & qva->qva_fflags)
|
|
|
5523e9 |
continue;
|
|
|
5523e9 |
|
|
|
5523e9 |
if (qva->qva_flags & QUERY_FOR_STATE) {
|
|
|
5523e9 |
diff --git a/lib/verify.c b/lib/verify.c
|
|
|
5523e9 |
index eb6f2e15e..df17a7b01 100644
|
|
|
5523e9 |
--- a/lib/verify.c
|
|
|
5523e9 |
+++ b/lib/verify.c
|
|
|
5523e9 |
@@ -378,10 +378,11 @@ static const char * stateStr(rpmfileState fstate)
|
|
|
5523e9 |
* @param ts transaction set
|
|
|
5523e9 |
* @param h header to verify
|
|
|
5523e9 |
* @param omitMask bits to disable verify checks
|
|
|
5523e9 |
- * @param ghosts should ghosts be verified?
|
|
|
5523e9 |
+ * @param skipAttr skip files with these attrs (eg %ghost)
|
|
|
5523e9 |
* @return 0 no problems, 1 problems found
|
|
|
5523e9 |
*/
|
|
|
5523e9 |
-static int verifyHeader(rpmts ts, Header h, rpmVerifyAttrs omitMask, int ghosts)
|
|
|
5523e9 |
+static int verifyHeader(rpmts ts, Header h, rpmVerifyAttrs omitMask,
|
|
|
5523e9 |
+ rpmfileAttrs skipAttrs)
|
|
|
5523e9 |
{
|
|
|
5523e9 |
rpmVerifyAttrs verifyResult = 0;
|
|
|
5523e9 |
int ec = 0; /* assume no problems */
|
|
|
5523e9 |
@@ -398,8 +399,8 @@ static int verifyHeader(rpmts ts, Header h, rpmVerifyAttrs omitMask, int ghosts)
|
|
|
5523e9 |
char ac;
|
|
|
5523e9 |
int rc;
|
|
|
5523e9 |
|
|
|
5523e9 |
- /* If not verifying %ghost, skip ghost files. */
|
|
|
5523e9 |
- if ((fileAttrs & RPMFILE_GHOST) && !ghosts)
|
|
|
5523e9 |
+ /* Skip on attributes (eg from --noghost) */
|
|
|
5523e9 |
+ if (skipAttrs & fileAttrs)
|
|
|
5523e9 |
continue;
|
|
|
5523e9 |
|
|
|
5523e9 |
rc = rpmVerifyFile(ts, fi, &verifyResult, omitMask);
|
|
|
5523e9 |
@@ -494,7 +495,6 @@ static int verifyDependencies(rpmts ts, Header h)
|
|
|
5523e9 |
int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
|
|
|
5523e9 |
{
|
|
|
5523e9 |
rpmVerifyAttrs omitMask = ((qva->qva_flags & VERIFY_ATTRS) ^ VERIFY_ATTRS);
|
|
|
5523e9 |
- int ghosts = (qva->qva_fflags & RPMFILE_GHOST);
|
|
|
5523e9 |
int ec = 0;
|
|
|
5523e9 |
int rc;
|
|
|
5523e9 |
|
|
|
5523e9 |
@@ -503,7 +503,7 @@ int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
|
|
|
5523e9 |
ec = rc;
|
|
|
5523e9 |
}
|
|
|
5523e9 |
if (qva->qva_flags & VERIFY_FILES) {
|
|
|
5523e9 |
- if ((rc = verifyHeader(ts, h, omitMask, ghosts)) != 0)
|
|
|
5523e9 |
+ if ((rc = verifyHeader(ts, h, omitMask, qva->qva_fflags)) != 0)
|
|
|
5523e9 |
ec = rc;
|
|
|
5523e9 |
}
|
|
|
5523e9 |
if (qva->qva_flags & VERIFY_SCRIPT) {
|