From: marc Date: Tue, 23 Jul 1996 03:30:44 +0000 (+0000) Subject: implement -bl X-Git-Tag: tznext/4.11.0.1.tizen20130304~11041 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff49802b59137de912bdbd2fa551bf24c0732952;p=tools%2Flibrpm-tizen.git implement -bl CVS patchset: 919 CVS date: 1996/07/23 03:30:44 --- diff --git a/build/build.c b/build/build.c index ec4a2e8..7feb0a8 100644 --- a/build/build.c +++ b/build/build.c @@ -638,7 +638,7 @@ int execClean(Spec s) int verifyList(Spec s) { - return 0; + return packageBinaries(s, NULL, PACK_NOPACKAGE); } int doBuild(Spec s, int flags, char *passPhrase) @@ -646,11 +646,8 @@ int doBuild(Spec s, int flags, char *passPhrase) strcpy(build_subdir, "."); - if (flags & RPMBUILD_LIST) { - if (verifyList(s)) { - return 1; - } - } + if (flags & RPMBUILD_LIST) + return verifyList(s); /* We always need to parse the %prep section */ if (execPrep(s, (flags & RPMBUILD_PREP))) { @@ -672,7 +669,7 @@ int doBuild(Spec s, int flags, char *passPhrase) markBuildTime(); if (flags & RPMBUILD_BINARY) { - if (packageBinaries(s, passPhrase)) { + if (packageBinaries(s, passPhrase, PACK_PACKAGE)) { return 1; } if (execClean(s)) { diff --git a/build/pack.c b/build/pack.c index 0226214..5087904 100644 --- a/build/pack.c +++ b/build/pack.c @@ -351,7 +351,7 @@ static int cpio_gzip(int fd, char *tempdir, char *writePtr, } -int packageBinaries(Spec s, char *passPhrase) +int packageBinaries(Spec s, char *passPhrase, int doPackage) { char name[1024]; char *nametmp; @@ -439,7 +439,11 @@ int packageBinaries(Spec s, char *passPhrase) } sprintf(name, "%s-%s-%s", nametmp, packageVersion, packageRelease); - message(MESS_VERBOSE, "Binary Packaging: %s\n", name); + if (doPackage == PACK_PACKAGE) { + message(MESS_VERBOSE, "Binary Packaging: %s\n", name); + } else { + message(MESS_VERBOSE, "File List Check: %s\n", name); + } /**** Generate the Header ****/ @@ -561,13 +565,15 @@ int packageBinaries(Spec s, char *passPhrase) /**** Make the RPM ****/ /* Make the output RPM filename */ - sprintf(filename, "%s/%s/%s.%s.rpm", getVar(RPMVAR_RPMDIR), - getArchName(), name, getArchName()); - - if (generateRPM(name, filename, RPMLEAD_BINARY, outHeader, NULL, - getStringBuf(cpioFileList), passPhrase, prefix)) { - /* Build failed */ - return 1; + if (doPackage == PACK_PACKAGE) { + sprintf(filename, "%s/%s/%s.%s.rpm", getVar(RPMVAR_RPMDIR), + getArchName(), name, getArchName()); + + if (generateRPM(name, filename, RPMLEAD_BINARY, outHeader, NULL, + getStringBuf(cpioFileList), passPhrase, prefix)) { + /* Build failed */ + return 1; + } } freeStringBuf(cpioFileList); diff --git a/build/pack.h b/build/pack.h index 69ca504..d144484 100644 --- a/build/pack.h +++ b/build/pack.h @@ -5,7 +5,10 @@ #include "spec.h" -int packageBinaries(Spec s, char *passPhrase); +#define PACK_PACKAGE 1 +#define PACK_NOPACKAGE 0 + +int packageBinaries(Spec s, char *passPhrase, int doPackage); int packageSource(Spec s, char *passPhrase); #endif _PACK_H_