Use the right variable for absolute path (ticket #137)
authorAron Griffis <agriffis@gentoo.org>
Wed, 6 Oct 2010 07:55:09 +0000 (10:55 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 6 Oct 2010 07:55:09 +0000 (10:55 +0300)
- Fix the problem where rpm attempts to use the tarball as the specfile

rpmbuild.c

index ad62a13..856798a 100644 (file)
@@ -406,7 +406,7 @@ static int buildForTarget(rpmts ts, const char * arg, BTA_t ba)
     if (*specFile != '/') {
        char *cwd = rpmGetCwd();
        char *s = NULL;
-       rasprintf(&s, "%s/%s", cwd, arg);
+       rasprintf(&s, "%s/%s", cwd, specFile);
        free(cwd);
        free(specFile);
        specFile = s;