rpm/rpm-4.9.0-specquery-pkgs.patch
Panu Matilainen 5a40a02fce - verify some properties of replaced and wrong-colored files (#528383)
- only list packages that would be generated on spec query (#693338)
- preferred color packages should be erased last (#680261)
- fix leaks when freeing a populated transaction set
- take file state into account for file dependencies
2011-04-05 18:24:15 +03:00

24 lines
839 B
Diff

commit 94fb6eed6a7a8957152035c3156974fc00bc4b42
Author: Jindrich Novy <jnovy@redhat.com>
Date: Mon Apr 4 16:03:11 2011 +0200
Don't list packages which will not be created in spec query (RhBug:693338)
- particularly, while doing "rpm -q --specfile <a spec file>"
diff --git a/build/spec.c b/build/spec.c
index 6861753..353ae47 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -412,8 +412,10 @@ int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
res = 0;
if (qva->qva_source == RPMQV_SPECRPMS) {
- for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next)
+ for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+ if (pkg->fileList == NULL) continue;
xx = qva->qva_showPackage(qva, ts, pkg->header);
+ }
} else {
xx = qva->qva_showPackage(qva, ts, spec->sourceHeader);
}