Revert to former spec query behavior + comment
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Mar 2012 12:31:42 +0000 (14:31 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 7 Mar 2012 12:34:34 +0000 (14:34 +0200)
- Various tools expect to get the full package list, not just those
  that would actually be built. There are of just as valid reasons
  for only wanting the packages that would be built, but we need
  to make this caller specifiable, just changing the behavior breaks
  existing tools unnecessarily. Add reminder comment why the thing
  is the way it is...

build/spec.c

index d0bf9ff..85af03c 100644 (file)
@@ -407,7 +407,14 @@ int rpmspecQuery(rpmts ts, QVA_t qva, const char * arg)
     if (qva->qva_source == RPMQV_SPECRPMS) {
        res = 0;
        for (Package pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+#if 0
+           /*
+            * XXX FIXME: whether to show all or just the packages that
+            * would be built needs to be made caller specifiable, for now
+            * revert to "traditional" behavior as existing tools rely on this.
+            */
            if (pkg->fileList == NULL) continue;
+#endif
            res += qva->qva_showPackage(qva, ts, pkg->header);
        }
     } else {