diff options
author | ewt <devnull@localhost> | 1996-08-20 16:28:40 +0000 |
---|---|---|
committer | ewt <devnull@localhost> | 1996-08-20 16:28:40 +0000 |
commit | 4ed78096b767334b11d28f85de8beb4b32bc271d (patch) | |
tree | 699ac91face1429bea18409cc6a3341eee58a770 /build | |
parent | 226c40250a8095f152db5145a05f029b69b5c195 (diff) | |
download | rpm-4ed78096b767334b11d28f85de8beb4b32bc271d.tar.gz rpm-4ed78096b767334b11d28f85de8beb4b32bc271d.tar.bz2 rpm-4ed78096b767334b11d28f85de8beb4b32bc271d.zip |
uses RPMVAR_TMPPATH
CVS patchset: 976
CVS date: 1996/08/20 16:28:40
Diffstat (limited to 'build')
-rw-r--r-- | build/build.c | 2 | ||||
-rw-r--r-- | build/pack.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/build/build.c b/build/build.c index bc0ec0805..03d6e7a84 100644 --- a/build/build.c +++ b/build/build.c @@ -57,7 +57,7 @@ struct Script *openScript(Spec spec, int builddir, char *name) exit(RPMERR_INTERNAL); } - script->name = tempnam("/var/tmp", "rpmbuild"); + script->name = tempnam(getVar(RPMVAR_TMPPATH), "rpmbuild"); script->file = fopen(script->name, "w"); /* Prepare the script */ diff --git a/build/pack.c b/build/pack.c index 508790472..33e64c15c 100644 --- a/build/pack.c +++ b/build/pack.c @@ -54,7 +54,7 @@ static int generateRPM(char *name, /* name-version-release */ Header sig; /* Write the archive to a temp file so we can get the size */ - archiveTemp = tempnam("/var/tmp", "rpmbuild"); + archiveTemp = tempnam(getVar(RPMVAR_TMPPATH), "rpmbuild"); if ((fd = open(archiveTemp, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) { fprintf(stderr, "Could not open %s\n", archiveTemp); return 1; @@ -70,7 +70,7 @@ static int generateRPM(char *name, /* name-version-release */ addEntry(header, RPMTAG_ARCHIVESIZE, INT32_TYPE, &archiveSize, 1); /* Now write the header and append the archive */ - sigtarget = tempnam("/var/tmp", "rpmbuild"); + sigtarget = tempnam(getVar(RPMVAR_TMPPATH), "rpmbuild"); if ((fd = open(sigtarget, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1) { fprintf(stderr, "Could not open %s\n", sigtarget); unlink(archiveTemp); @@ -618,7 +618,7 @@ int packageSource(Spec s, char *passPhrase) /**** Create links for all the sources ****/ - tempdir = tempnam("/var/tmp", "rpmbuild"); + tempdir = tempnam(getVar(RPMVAR_TMPPATH), "rpmbuild"); mkdir(tempdir, 0700); filelist = newStringBuf(); /* List in the header */ |