be9911
--- rpm-4.11.3/doc/rpm.8.old	2018-05-25 09:24:59.329885663 +0200
be9911
+++ rpm-4.11.3/doc/rpm.8	2018-05-25 09:25:19.598901802 +0200
be9911
@@ -76,7 +76,7 @@
be9911
  [\fB--nodigest\fR] [\fB--nosignature\fR]
be9911
  [\fB--nolinkto\fR] [\fB--nofiledigest\fR] [\fB--nosize\fR] [\fB--nouser\fR]
be9911
  [\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
be9911
- [\fB--nocaps\fR] [\fB--noconfig\fR]
be9911
+ [\fB--nocaps\fR] [\fB--noconfig\fR] [\fB--noghost\fR]
be9911
 
be9911
 .SS "install-options"
be9911
 .PP
be9911
@@ -683,6 +683,9 @@
be9911
 \fB--noconfig\fR
be9911
 Don't verify config files.
be9911
 .TP
be9911
+\fB--noghost\fR
be9911
+Don't display ghost files.
be9911
+.TP
be9911
 \fB--noscripts\fR
be9911
 Don't execute the \fB%verifyscript\fR scriptlet (if any).
be9911
 .TP
be9911
--- rpm-4.11.3/lib/poptQV.c.old	2018-05-10 12:29:26.716304826 +0200
be9911
+++ rpm-4.11.3/lib/poptQV.c	2018-05-11 14:08:36.389255974 +0200
be9911
@@ -182,7 +182,7 @@
be9911
 	N_("list files in package"), NULL },
be9911
 
be9911
  /* Duplicate file attr flags from packages into command line options. */
be9911
- { "noghost", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN,
be9911
+ { "noghost", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
be9911
 	&rpmQVKArgs.qva_fflags, RPMFILE_GHOST,
be9911
         N_("skip %%ghost files"), NULL },
be9911
  { "noconfig", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
be9911
--- rpm-4.11.3/lib/verify.c.old	2018-05-10 12:29:26.715304826 +0200
be9911
+++ rpm-4.11.3/lib/verify.c	2018-05-11 14:17:16.474959233 +0200
be9911
@@ -453,6 +453,11 @@
be9911
 	    rpmlog(RPMLOG_NOTICE, "%s\n", buf);
be9911
 	    buf = _free(buf);
be9911
 	}
be9911
+	
be9911
+	/* Filter out missing %ghost/%missingok errors from final result */
be9911
+	if (fileAttrs & (RPMFILE_MISSINGOK|RPMFILE_GHOST))
be9911
+	    verifyResult &= ~RPMVERIFY_LSTATFAIL;
be9911
+
be9911
     }
be9911
     rpmfiFree(fi);
be9911