/* FIX: static zcmds heartburn */
if (ba->buildMode == 't') {
FILE *fp;
- const char * specDir;
+ char * specDir;
char * tmpSpecFile;
char * cmd, * s;
rpmCompressedMagic res = COMPRESSED_OTHER;
for (p = spec->sources; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
- const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
+ char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
rc = unlink(fn);
fn = _free(fn);
}
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
for (p = pkg->icon; p != NULL; p = p->next) {
if (! (p->flags & RPMBUILD_ISNO)) {
- const char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
+ char *fn = rpmGetPath("%{_sourcedir}/", p->source, NULL);
rc = unlink(fn);
fn = _free(fn);
}
{
static const char *_docdir_fmt = NULL;
static int oneshot = 0;
- const char *ddir, *fmt, *errstr;
+ char *ddir, *fmt;
+ errmsg_t errstr;
if (!oneshot) {
_docdir_fmt = rpmExpand("%{?_docdir_fmt}", NULL);
if (!_docdir_fmt || !*_docdir_fmt)
pkg->cpioList = NULL;
if (pkg->fileFile) {
- const char *ffn;
+ char *ffn;
FILE * f;
FD_t fd;
}
}
- { const char * sfn;
+ { char * sfn;
sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
"%{_sourcedir}/", srcPtr->source, NULL);
appendLineStringBuf(sourceFiles, sfn);
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
for (srcPtr = pkg->icon; srcPtr != NULL; srcPtr = srcPtr->next) {
- const char * sfn;
+ char * sfn;
sfn = rpmGetPath( ((srcPtr->flags & RPMBUILD_ISNO) ? "!" : ""),
"%{_sourcedir}/", srcPtr->source, NULL);
appendLineStringBuf(sourceFiles, sfn);
const char * file, StringBuf sb)
{
char buf[BUFSIZ];
- const char * fn = buf;
+ char * fn = buf;
FILE * f;
FD_t fd;
Package pkg;
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- const char *fn;
+ char *fn;
if (pkg->fileList == NULL)
continue;
spec->sourcePkgId, 16);
}
- { const char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
+ { char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
char *binRpm, *binDir;
binRpm = headerSprintf(pkg->header, binFormat, rpmTagTable,
rpmHeaderFormats, &errorString);
fn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
if ((binDir = strchr(binRpm, '/')) != NULL) {
struct stat st;
- const char *dn;
+ char *dn;
*binDir = '\0';
dn = rpmGetPath("%{_rpmdir}/", binRpm, NULL);
if (stat(dn, &st) < 0) {
spec->cookie = _free(spec->cookie);
/* XXX this should be %_srpmdir */
- { const char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
+ { char *fn = rpmGetPath("%{_srcrpmdir}/", spec->sourceRpmName,NULL);
memset(csa, 0, sizeof(*csa));
csa->cpioArchiveSize = 0;
*/
static rpmRC readIcon(Header h, const char * file)
{
- const char *fn = NULL;
+ char *fn = NULL;
char *icon;
FD_t fd;
rpmRC rc = RPMRC_OK;
}
if (compressed) {
- const char *zipper = rpmGetPath(
+ char *zipper = rpmGetPath(
(compressed == COMPRESSED_BZIP2 ? "%{_bzip2bin}" : "%{_gzipbin}"),
NULL);
}
if (compressed != COMPRESSED_NOT) {
- const char *zipper;
+ char *zipper;
int needtar = 1;
switch (compressed) {
spec->numSources++;
if (tag != RPMTAG_ICON) {
- const char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
+ char *body = rpmGetPath("%{_sourcedir}/", p->source, NULL);
sprintf(buf, "%s%d",
(flag & RPMBUILD_ISPATCH) ? "PATCH" : "SOURCE", num);
char * chptr;
int maxLen;
char * lastDir;
- const char * sourceDir;
+ char * sourceDir;
int lastfs = 0;
int lastDev = -1; /* I hope nobody uses -1 for a st_dev */
struct stat sb;
if ((a != NULL && a[0] == 'i' && a[1] != '\0' && a[2] == '8' && a[3] == '6')
&& strcmp(argv[0], "/sbin/ldconfig"))
{
- const char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL);
+ char * fmt = rpmGetPath("%{?_autorelocate_path}", NULL);
const char * errstr;
char * newPath;
char * t;
}
if (psm->goal == PSM_PKGSAVE) {
/* Open output package for writing. */
- { const char * bfmt = rpmGetPath("%{_repackage_name_fmt}", NULL);
+ { char * bfmt = rpmGetPath("%{_repackage_name_fmt}", NULL);
const char * pkgbn =
headerSprintf(fi->h, bfmt, rpmTagTable, rpmHeaderFormats, NULL);
sizeof(optionTable[0]), optionCompare);
if (option) { /* For configuration variables ... */
- const char *arch, *val, *fn;
+ const char *arch, *val;
+ char *fn;
arch = val = fn = NULL;
if (*se == '\0') {
if (rpmReadRC(file)) return -1;
if (macrofiles != NULL) {
- const char *mf = rpmGetPath(macrofiles, NULL);
+ char *mf = rpmGetPath(macrofiles, NULL);
rpmInitMacros(NULL, mf);
_free(mf);
}
ts->dbmode = dbmode;
rc = rpmdbOpen(ts->rootDir, &ts->rdb, ts->dbmode, 0644);
if (rc) {
- const char * dn;
- dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
+ char * dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
rpmlog(RPMLOG_ERR,
_("cannot open Packages database in %s\n"), dn);
dn = _free(dn);
rc = rpmdbOpen(ts->rootDir, &ts->sdb, ts->sdbmode, 0644);
if (rc) {
- const char * dn;
- dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
+ char * dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
rpmlog(RPMLOG_WARNING,
_("cannot open Solve database in %s\n"), dn);
dn = _free(dn);
/* have one %_pgpbin and one %_pgp_path. */
static pgpVersion saved_pgp_version = PGP_UNKNOWN;
- const char *pgpbin = rpmGetPath("%{?_pgpbin}", NULL);
+ char *pgpbin = rpmGetPath("%{?_pgpbin}", NULL);
if (saved_pgp_version == PGP_UNKNOWN) {
char *pgpvbin;
}
if (!rpmtsFlags(ts) & RPMTRANS_FLAG_NOCONTEXTS) {
- const char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
+ char *fn = rpmGetPath("%{?_install_file_context_path}", NULL);
if (matchpathcon_init(fn) == -1) {
rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_NOCONTEXTS));
}
rc = cvtdberr(dbi, "db_create", rc, _debug);
if (db != NULL) {
- const char * dbf = rpmGetPath(dbhome, "/", dbfile, NULL);
+ char * dbf = rpmGetPath(dbhome, "/", dbfile, NULL);
rc = db->verify(db, dbf, NULL, NULL, flags);
rc = cvtdberr(dbi, "db->verify", rc, _debug);
}
} else { /* dbhome is writable, check for persistent dbenv. */
- const char * dbf = rpmGetPath(dbhome, "/__db.001", NULL);
+ char * dbf = rpmGetPath(dbhome, "/__db.001", NULL);
if (access(dbf, F_OK) == -1) {
/* ... non-existent (or unwritable) DBENV, will create ... */
if ((oflags & DB_CREATE) && (oflags & DB_RDONLY)) {
/* dbhome is writable, and DB->open flags may conflict. */
const char * dbfn = (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag));
- const char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL);
+ char * dbf = rpmGetPath(dbhome, "/", dbfn, NULL);
if (access(dbf, F_OK) == -1) {
/* File does not exist, DB->open might create ... */
rpmRC (*hdrchk) (rpmts ts, const void *uh, size_t uc, const char ** msg))
{
rpmdb olddb;
- const char * dbpath = NULL;
- const char * rootdbpath = NULL;
+ char * dbpath = NULL;
+ char * rootdbpath = NULL;
rpmdb newdb;
- const char * newdbpath = NULL;
- const char * newrootdbpath = NULL;
- const char * tfn;
+ char * newdbpath = NULL;
+ char * newrootdbpath = NULL;
+ char * tfn;
int nocleanup = 1;
int failed = 0;
int removedir = 0;
const char * mdir = xmdir;
const char * xfile = rpmGetPath(urlfile, NULL);
const char * file = xfile;
- const char * result;
+ char * result;
const char * url = NULL;
int nurl = 0;
int ut;