Back out overly strict file type check on %ghost files
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Dec 2009 11:22:11 +0000 (13:22 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Dec 2009 11:35:53 +0000 (13:35 +0200)
- we currently only support creating regular files for %ghosts which
  dont exist in the buildroot, but for files that do exist in the buildroot
  there's no reason to place such limits (eg its perfectly ok to have
  symlinks marked as %ghosts)

build/files.c

index 061494d..7db729a 100644 (file)
@@ -1414,12 +1414,6 @@ static rpmRC addFile(FileList fl, const char * diskPath,
                    fl->processingFailed = 1;
                    return RPMRC_FAIL;
                }
-           } else {
-               if (is_ghost && !S_ISREG(statp->st_mode)) {
-                   rpmlog(RPMLOG_ERR, _("Only regular file can be %%ghost: %s\n"), diskPath);
-                   fl->processingFailed = 1;
-                   return RPMRC_FAIL;
-               }
            }
        }
     }