diff options
author | jbj <devnull@localhost> | 2000-12-12 20:03:45 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-12-12 20:03:45 +0000 |
commit | db32ab6bea1b635129820d6b628e6156c61b5385 (patch) | |
tree | 055f7ee7d5e06ba0b3e858b82f639310b892503d /build.c | |
parent | 2e9d2616969433851a1c883c900d6ea5acde67b7 (diff) | |
download | librpm-tizen-db32ab6bea1b635129820d6b628e6156c61b5385.tar.gz librpm-tizen-db32ab6bea1b635129820d6b628e6156c61b5385.tar.bz2 librpm-tizen-db32ab6bea1b635129820d6b628e6156c61b5385.zip |
Sync with rpm-4_0 branch.
CVS patchset: 4338
CVS date: 2000/12/12 20:03:45
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -5,6 +5,7 @@ #include "build.h" #include "install.h" +#include "debug.h" static int checkSpec(Header h) { @@ -23,7 +24,7 @@ static int checkSpec(Header h) const char *dn; dn = rpmGetPath( (rootdir ? rootdir : ""), "%{_dbpath}", NULL); rpmError(RPMERR_OPEN, _("cannot open rpm database in %s\n"), dn); - xfree(dn); + free((void *)dn); exit(EXIT_FAILURE); } ts = rpmtransCreateSet(db, rootdir); @@ -128,8 +129,8 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, zcmds[res & 0x3], arg, tmpSpecFile); if (!(fp = popen(cmd, "r"))) { rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m")); - xfree(specDir); - xfree(tmpSpecFile); + free((void *)specDir); + free((void *)tmpSpecFile); return 1; } if ((!fgets(buf, sizeof(buf) - 1, fp)) || !strchr(buf, '/')) { @@ -140,16 +141,16 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, zcmds[res & 0x3], arg, tmpSpecFile); if (!(fp = popen(cmd, "r"))) { rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m")); - xfree(specDir); - xfree(tmpSpecFile); + free((void *)specDir); + free((void *)tmpSpecFile); return 1; } if (!fgets(buf, sizeof(buf) - 1, fp)) { /* Give up */ rpmError(RPMERR_READ, _("Failed to read spec file from %s"), arg); unlink(tmpSpecFile); - xfree(specDir); - xfree(tmpSpecFile); + free((void *)specDir); + free((void *)tmpSpecFile); return 1; } } @@ -170,16 +171,16 @@ static int buildForTarget(const char *arg, struct rpmBuildArguments *ba, specURL = s = alloca(strlen(specDir) + strlen(cmd) + 5); sprintf(s, "%s/%s", specDir, cmd); res = rename(tmpSpecFile, s); - xfree(specDir); + free((void *)specDir); if (res) { rpmError(RPMERR_RENAME, _("Failed to rename %s to %s: %m"), tmpSpecFile, s); unlink(tmpSpecFile); - xfree(tmpSpecFile); + free((void *)tmpSpecFile); return 1; } - xfree(tmpSpecFile); + free((void *)tmpSpecFile); /* Make the directory which contains the tarball the source directory for this run */ @@ -263,11 +264,10 @@ exit: if (spec) freeSpec(spec); if (buildRootURL) - xfree(buildRootURL); + free((void *)buildRootURL); return rc; } -/** */ int build(const char * arg, struct rpmBuildArguments * ba, const char * passPhrase, int fromTarball, char * cookie, const char * rcfile, int force, int nodeps) |