handle %files -f with no %setup (no build directory)

CVS patchset: 2141
CVS date: 1998/06/02 19:53:21
This commit is contained in:
marc 1998-06-02 19:53:21 +00:00
parent 0c09312815
commit 5373b67cf1
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@
- included irix.req and irix.prov (Tim Mooney)
- copy CHANGELOG* and URL tags to all subpackages
- follow symlinks when packaging sources
- handle %files -f with no %setup (no build directory)
2.5 -> 2.5.1:
- fail if sources are not regular files

View File

@ -316,8 +316,12 @@ static int processPackageFiles(Spec spec, Package pkg,
pkg->cpioCount = 0;
if (pkg->fileFile) {
sprintf(buf, "%s/%s/%s", rpmGetVar(RPMVAR_BUILDDIR),
spec->buildSubdir, pkg->fileFile);
if (spec->buildSubdir) {
sprintf(buf, "%s/%s/%s", rpmGetVar(RPMVAR_BUILDDIR),
spec->buildSubdir, pkg->fileFile);
} else {
sprintf(buf, "%s/%s", rpmGetVar(RPMVAR_BUILDDIR), pkg->fileFile);
}
if ((f = fopen(buf, "r")) == NULL) {
rpmError(RPMERR_BADFILENAME,
"Could not open %%files file: %s", pkg->fileFile);