From: root Date: Wed, 21 Feb 1996 17:19:17 +0000 (+0000) Subject: just get the name from the header X-Git-Tag: rpm-4.4-release~5357 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c50bf4d20ae591aca5750b12f1a9dd2a095afffc;p=platform%2Fupstream%2Frpm.git just get the name from the header CVS patchset: 378 CVS date: 1996/02/21 17:19:17 --- 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);