From: marc Date: Tue, 2 Jun 1998 19:53:21 +0000 (+0000) Subject: handle %files -f with no %setup (no build directory) X-Git-Tag: tznext/4.11.0.1.tizen20130304~9842 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5373b67cf1d99d7746fc630a5fd9d5b2f7a87b89;p=tools%2Flibrpm-tizen.git handle %files -f with no %setup (no build directory) CVS patchset: 2141 CVS date: 1998/06/02 19:53:21 --- diff --git a/CHANGES b/CHANGES index 653f9eb..aad1250 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/build/files.c b/build/files.c index 02deafe..2fd831e 100644 --- a/build/files.c +++ b/build/files.c @@ -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);