added logic for empty %files section vs NO %files section
authormarc <devnull@localhost>
Tue, 19 Dec 1995 17:56:45 +0000 (17:56 +0000)
committermarc <devnull@localhost>
Tue, 19 Dec 1995 17:56:45 +0000 (17:56 +0000)
,.

CVS patchset: 63
CVS date: 1995/12/19 17:56:45

build/spec.c

index abf6f1e..ac29645 100644 (file)
@@ -61,7 +61,7 @@ static struct PackageRec *new_packagerec(void)
     p->newname = NULL;
     p->header = newHeader();
     p->filelist = newStringBuf();
-    p->files = 0;
+    p->files = -1;  /* -1 means no %files, thus no package */
     p->next = NULL;
 
     return p;
@@ -416,6 +416,11 @@ Spec parseSpec(FILE *f)
            }
 
            printf("Switched to package: %s\n", s);
+
+           if (cur_part == FILES_PART) {
+               cur_package->files = 0;
+           }
+           
            continue;
         }