Eliminate redundant noGlob member from filelist
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Jun 2011 11:53:05 +0000 (14:53 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 21 Jun 2011 11:53:05 +0000 (14:53 +0300)
- Since the only thing where globs are not permitted are %dev entires,
  check for device explicitcly in the glob part. Doh.

build/files.c

index 44c2230..ec70bf8 100644 (file)
@@ -103,7 +103,6 @@ typedef struct FileList_s {
 
     int processingFailed;
 
-    int noGlob;
     unsigned devtype;
     unsigned devmajor;
     int devminor;
@@ -429,8 +428,6 @@ static rpmRC parseForDev(char * buf, FileList fl)
        goto exit;
     }
 
-    fl->noGlob = 1;
-
     rc = RPMRC_OK;
 
 exit:
@@ -1670,9 +1667,8 @@ static rpmRC processBinaryFile(Package pkg, FileList fl, const char * fileName)
        int argc = 0;
        int i;
 
-       /* XXX for %dev marker in file manifest only */
-       if (fl->noGlob) {
-           rpmlog(RPMLOG_ERR, _("Glob not permitted: %s\n"), diskPath);
+       if (fl->devtype) {
+           rpmlog(RPMLOG_ERR, _("%%dev glob not permitted: %s\n"), diskPath);
            rc = RPMRC_FAIL;
            goto exit;
        }
@@ -1767,7 +1763,6 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
     fl.currentFlags = 0;
     fl.currentVerifyFlags = 0;
     
-    fl.noGlob = 0;
     fl.devtype = 0;
     fl.devmajor = 0;
     fl.devminor = 0;
@@ -1814,7 +1809,6 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
        fl.currentSpecdFlags = ((unsigned)fl.defSpecdFlags) >> 8;
        fl.currentVerifyFlags = fl.defVerifyFlags;
 
-       fl.noGlob = 0;
        fl.devtype = 0;
        fl.devmajor = 0;
        fl.devminor = 0;
@@ -1877,7 +1871,6 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags,
        fl.currentFlags = 0;
        fl.currentVerifyFlags = fl.defVerifyFlags;
 
-       fl.noGlob = 0;
        fl.devtype = 0;
        fl.devmajor = 0;
        fl.devminor = 0;