From c50bf4d20ae591aca5750b12f1a9dd2a095afffc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 21 Feb 1996 17:19:17 +0000 Subject: [PATCH] just get the name from the header CVS patchset: 378 CVS date: 1996/02/21 17:19:17 --- build/pack.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/build/pack.c b/build/pack.c index 3a67ccd..150f2ba 100644 --- a/build/pack.c +++ b/build/pack.c @@ -908,6 +908,7 @@ static char *buildHost(void) int packageBinaries(Spec s, char *passPhrase) { char name[1024]; + char *nametmp; char filename[1024]; char sourcerpm[1024]; char *icon; @@ -968,19 +969,11 @@ int packageBinaries(Spec s, char *passPhrase) } /* Figure out the name of this package */ - if (pr->subname) { - strcpy(name, s->name); - strcat(name, "-"); - strcat(name, pr->subname); - } else if (pr->newname) { - strcpy(name, pr->newname); - } else { - strcpy(name, s->name); + if (!getEntry(pr->header, RPMTAG_NAME, NULL, (void *)&nametmp, NULL)) { + error(RPMERR_INTERNAL, "Package has no name!"); + return RPMERR_INTERNAL; } - strcat(name, "-"); - strcat(name, packageVersion); - strcat(name, "-"); - strcat(name, packageRelease); + sprintf(name, "%s-%s-%s", nametmp, packageVersion, packageRelease); message(MESS_VERBOSE, "Binary Packaging: %s\n", name); -- 2.7.4