const char * passPhrase = ba->passPhrase;
const char * cookie = ba->cookie;
int buildAmount = ba->buildAmount;
- const char * buildRootURL = NULL;
+ char * buildRootURL = NULL;
const char * specFile;
const char * specURL;
int specut;
const char * rootURL = spec->rootURL;
const char * rootDir;
const char *scriptName = NULL;
- const char * buildDirURL = rpmGenPath(rootURL, "%{_builddir}", "");
+ char * buildDirURL = rpmGenPath(rootURL, "%{_builddir}", "");
const char * buildScript;
const char * buildCmd = NULL;
const char * buildTemplate = NULL;
rpm_tag_t tag)
{
const char * buildURL = "%{_builddir}/%{?buildsubdir}/";
- const char * fn = NULL;
+ const char * urlfn = NULL;
+ char * fn = NULL;
const char * apkt = NULL;
uint8_t * pkt = NULL;
ssize_t pktlen = 0;
int rc = RPMRC_FAIL;
int xx;
- (void) urlPath(fileURL, &fn);
- if (*fn == '/') {
- fn = rpmGenPath(fl->buildRootURL, NULL, fn);
+ (void) urlPath(fileURL, &urlfn);
+ if (*urlfn == '/') {
+ fn = rpmGenPath(fl->buildRootURL, NULL, urlfn);
absolute = 1;
} else
- fn = rpmGenPath(buildURL, NULL, fn);
+ fn = rpmGenPath(buildURL, NULL, urlfn);
switch (tag) {
default:
{
int quote = 1; /* XXX permit quoted glob characters. */
int doGlob;
- const char *diskURL = NULL;
+ char *diskURL = NULL;
int rc = RPMRC_OK;
doGlob = glob_pattern_p(fileURL, quote);
case RPMTAG_BUILDROOT:
SINGLE_TOKEN_ONLY;
{ const char * buildRoot = NULL;
- const char * buildRootURL = spec->buildRootURL;
+ char * buildRootURL;
/*
* Note: rpmGenPath should guarantee a "canonical" path. That means
* //usr//bin/
* /.././../usr/../bin//./sh
*/
- if (buildRootURL == NULL) {
+ if (spec->buildRootURL == NULL) {
buildRootURL = rpmGenPath(NULL, "%{?buildroot:%{buildroot}}", NULL);
if (strcmp(buildRootURL, "/")) {
spec->buildRootURL = buildRootURL;
argv = _free(argv);
/* cd to the build dir */
- { const char * buildDirURL = rpmGenPath(spec->rootURL, "%{_builddir}", "");
+ { char * buildDirURL = rpmGenPath(spec->rootURL, "%{_builddir}", "");
const char *buildDir;
(void) urlPath(buildDirURL, &buildDir);
{
int scareMem = 1;
rpmfi fi = NULL;
- const char * _sourcedir = NULL;
- const char * _specdir = NULL;
+ char * _sourcedir = NULL;
+ char * _specdir = NULL;
const char * specFile = NULL;
HGE_t hge;
HFD_t hfd;
case URL_IS_HTTPS:
case URL_IS_HTTP:
case URL_IS_FTP:
- { const char *tfn;
+ { char *tfn;
if (rpmIsVerbose())
fprintf(stdout, _("Retrieving %s\n"), fileURL);
/* XXX oneshot to determine path for fcntl lock. */
if (rpmlock_path == NULL) {
- const char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
+ char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
if (t == NULL || *t == '\0' || *t == '%')
t = strdup(RPMLOCK_PATH);
rpmlock_path = xstrdup(t);
}
if (dbi->dbi_tmpdir) {
const char * root;
- const char * tmpdir;
+ char * tmpdir;
root = (dbi->dbi_root ? dbi->dbi_root : rpmdb->db_root);
if ((root[0] == '/' && root[1] == '\0') || rpmdb->db_chrootDone)
static int db3close(dbiIndex dbi, unsigned int flags)
{
rpmdb rpmdb = dbi->dbi_rpmdb;
- const char * urlfn = NULL;
+ char * urlfn = NULL;
const char * root;
const char * home;
const char * dbhome;
(dbi->dbi_verbose & DB_VERB_WAITSFOR));
if (dbi->dbi_tmpdir) {
- const char * tmpdir = rpmGenPath(root, dbi->dbi_tmpdir, NULL);
+ char * tmpdir = rpmGenPath(root, dbi->dbi_tmpdir, NULL);
rc = dbenv->set_tmp_dir(dbenv, tmpdir);
rc = cvtdberr(dbi, "dbenv->set_tmp_dir", rc, _debug);
tmpdir = _free(tmpdir);
static int db3open(rpmdb rpmdb, rpm_tag_t rpmtag, dbiIndex * dbip)
{
extern struct _dbiVec db3vec;
- const char * urlfn = NULL;
+ char * urlfn = NULL;
const char * root;
const char * home;
const char * dbhome;
{
extern struct _dbiVec sqlitevec;
- const char * urlfn = NULL;
+ char * urlfn = NULL;
const char * root;
const char * home;
const char * dbhome;
const char * dbfile;
- const char * dbfname;
+ char * dbfname;
const char * sql_errcode;
dbiIndex dbi;
SQL_DB * sqldb;
int rpmMkTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
{
const char * tpmacro = "%{?_tmppath:%{_tmppath}}%{!?_tmppath:" LOCALSTATEDIR "/tmp}";
- const char * tempfn = NULL;
+ char * tempfn = NULL;
const char * tfn = NULL;
static int _initialized = 0;
int temput;
urlhelper = rpmExpand("%{?_urlhelper}", NULL);
- dest = (char *) rpmGenPath(NULL, "%{_tmppath}/", "rpm-transfer.XXXXXX");
+ dest = rpmGenPath(NULL, "%{_tmppath}/", "rpm-transfer.XXXXXX");
close(mkstemp(dest));
sprintf(cmd, "%s %s %s\n", urlhelper, dest, url);
urlhelper = _free(urlhelper);