fixed bug in part recognition
authormarc <devnull@localhost>
Wed, 6 May 1998 21:07:04 +0000 (21:07 +0000)
committermarc <devnull@localhost>
Wed, 6 May 1998 21:07:04 +0000 (21:07 +0000)
CVS patchset: 2110
CVS date: 1998/05/06 21:07:04

CHANGES
build/part.c
build/read.c

diff --git a/CHANGES b/CHANGES
index 8c9ea97..cd1b8af 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,7 @@
        - save/restore existing arch when done with buildarch
        - copy the I18N table to the source header so i18n stuff works
        - fixed multiple memory leaks in install code
+       - fixed bug in part recognition
 
 2.4.108 -> 2.4.109:
         - remove icons with --rmsource
index 9ad94c6..a36f1f5 100644 (file)
@@ -39,13 +39,20 @@ static void initParts(void)
 
 int isPart(char *line)
 {
+    char c;
     struct PartRec *p = partList;
 
     if (p->len == 0) {
        initParts();
     }
     
-    while (p->token && strncmp(line, p->token, p->len)) {
+    while (p->token) {
+       if (! strncmp(line, p->token, p->len)) {
+           c = *(line + p->len);
+           if (c == '\0' || isspace(c)) {
+               break;
+           }
+       }
        p++;
     }
 
index 8c9c62e..0f2906c 100644 (file)
@@ -78,7 +78,7 @@ int readLine(Spec spec, int strip)
     if (spec->readStack->reading) {
        expandMacros(&spec->macros, spec->line);
     }
-    
+
     rpmGetArchInfo(&arch, NULL);
     rpmGetOsInfo(&os, NULL);
     s = spec->line;
@@ -121,7 +121,7 @@ int readLine(Spec spec, int strip)
        spec->readStack = rl;
        spec->line[0] = '\0';
     }
-    
+
     if (! spec->readStack->reading) {
        spec->line[0] = '\0';
     }