summaryrefslogtreecommitdiff
path: root/build/pack.c
diff options
context:
space:
mode:
authorroot <devnull@localhost>1996-07-01 21:37:18 +0000
committerroot <devnull@localhost>1996-07-01 21:37:18 +0000
commit0c947120d2d3ea6ce19adde8791998ea7c89cb39 (patch)
tree14d1ffd9079500e872eaa7f76d511c9a29db4b26 /build/pack.c
parent3fc67229c0e4b7613e15b743cae0eef1f3e9f5ae (diff)
downloadrpm-0c947120d2d3ea6ce19adde8791998ea7c89cb39.tar.gz
rpm-0c947120d2d3ea6ce19adde8791998ea7c89cb39.tar.bz2
rpm-0c947120d2d3ea6ce19adde8791998ea7c89cb39.zip
change OS and ARCH to strings
CVS patchset: 708 CVS date: 1996/07/01 21:37:18
Diffstat (limited to 'build/pack.c')
-rw-r--r--build/pack.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/build/pack.c b/build/pack.c
index 9de6a0339..a644e4e70 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -346,7 +346,6 @@ int packageBinaries(Spec s, char *passPhrase)
char filename[1024];
char sourcerpm[1024];
char *icon;
- char *archName;
int iconFD;
struct stat statbuf;
struct PackageRec *pr;
@@ -360,7 +359,6 @@ int packageBinaries(Spec s, char *passPhrase)
char *dist;
char *packageVersion, *packageRelease;
int size;
- int_8 os, arch;
StringBuf cpioFileList;
char **farray, *file;
int count;
@@ -387,7 +385,7 @@ int packageBinaries(Spec s, char *passPhrase)
if (!isEntry(s->packages->header, RPMTAG_DISTRIBUTION)) {
dist = getVar(RPMVAR_DISTRIBUTION);
}
-
+
/* Look through for each package */
pr = s->packages;
while (pr) {
@@ -441,10 +439,8 @@ int packageBinaries(Spec s, char *passPhrase)
freeIterator(headerIter);
/* Add some final entries to the header */
- os = getArchNum();
- arch = getArchNum();
- addEntry(outHeader, RPMTAG_OS, INT8_TYPE, &os, 1);
- addEntry(outHeader, RPMTAG_ARCH, INT8_TYPE, &arch, 1);
+ addEntry(outHeader, RPMTAG_OS, STRING_TYPE, getOsName(), 1);
+ addEntry(outHeader, RPMTAG_ARCH, STRING_TYPE, getArchName(), 1);
addEntry(outHeader, RPMTAG_BUILDTIME, INT32_TYPE, getBuildTime(), 1);
addEntry(outHeader, RPMTAG_BUILDHOST, STRING_TYPE, buildHost(), 1);
addEntry(outHeader, RPMTAG_SOURCERPM, STRING_TYPE, sourcerpm, 1);
@@ -507,10 +503,9 @@ int packageBinaries(Spec s, char *passPhrase)
/**** Make the RPM ****/
/* Make the output RPM filename */
- archName = getArchName();
sprintf(filename, "%s/%s/%s.%s.rpm", getVar(RPMVAR_RPMDIR),
- getBooleanVar(RPMVAR_ARCHSENSITIVE) ? archName : "",
- name, archName);
+ getBooleanVar(RPMVAR_ARCHSENSITIVE) ? getArchName() : "",
+ name, getArchName());
if (generateRPM(name, filename, RPMLEAD_BINARY, outHeader, NULL,
getStringBuf(cpioFileList), passPhrase)) {
@@ -543,7 +538,6 @@ int packageSource(Spec s, char *passPhrase)
StringBuf filelist;
StringBuf cpioFileList;
int size;
- int_8 os, arch;
char **sources;
char **patches;
int scount, pcount;
@@ -628,10 +622,8 @@ int packageSource(Spec s, char *passPhrase)
}
outHeader = copyHeader(s->packages->header);
- os = getArchNum();
- arch = getArchNum();
- addEntry(outHeader, RPMTAG_OS, INT8_TYPE, &os, 1);
- addEntry(outHeader, RPMTAG_ARCH, INT8_TYPE, &arch, 1);
+ addEntry(outHeader, RPMTAG_OS, STRING_TYPE, getOsName(), 1);
+ addEntry(outHeader, RPMTAG_ARCH, STRING_TYPE, getArchName(), 1);
addEntry(outHeader, RPMTAG_BUILDTIME, INT32_TYPE, getBuildTime(), 1);
addEntry(outHeader, RPMTAG_BUILDHOST, STRING_TYPE, buildHost(), 1);
if (scount)