allow # comments in the %files section
authorroot <devnull@localhost>
Mon, 24 Jun 1996 22:04:49 +0000 (22:04 +0000)
committerroot <devnull@localhost>
Mon, 24 Jun 1996 22:04:49 +0000 (22:04 +0000)
CVS patchset: 668
CVS date: 1996/06/24 22:04:49

build/spec.c

index a83b35f..b9a0577 100644 (file)
@@ -1012,9 +1012,14 @@ Spec parseSpec(FILE *f, char *specfile)
            appendLineStringBuf(sb, line);
            break;
          case FILES_PART:
-           cur_package->files++;
-           appendLineStringBuf(cur_package->filelist, line);
-           parseForDocFiles(cur_package, line);
+             s1 = line;
+             while (*s1 && (*s1 == ' ' || *s1 == '\t')) s1++;
+             /* Handle blanks lines and comments */
+             if (*s1 && (*s1 != '#')) {
+                 cur_package->files++;
+                 appendLineStringBuf(cur_package->filelist, line);
+                 parseForDocFiles(cur_package, line);
+             }
            break;
          default:
            error(RPMERR_INTERNAL, "Bad part");