*/
if (rpmdsEVR(obsoletes) == NULL
|| rpmdsAnyMatchesDep(oh, obsoletes, _rpmds_nopromote)) {
- const char * ohNEVRA = headerGetNEVRA(oh, NULL);
+ char * ohNEVRA = headerGetNEVRA(oh, NULL);
#ifdef DYING /* XXX see http://bugzilla.redhat.com #134497 */
if (rpmVersionCompare(h, oh))
#endif
(void) rpmdbPruneIterator(mi,
ts->removedPackages, ts->numRemovedPackages, 1);
while ((h = rpmdbNextIterator(mi)) != NULL) {
- const char * pkgNEVRA;
+ char * pkgNEVRA;
rpmds requires, conflicts;
int rc;
if (type != RPM_BIN_TYPE) {
val = xstrdup(_("(not a blob)"));
} else {
- const char * enc;
+ char * enc;
char * t;
/* XXX HACK ALERT: element field abused as no. bytes of binary data. */
size_t ns = element;
const char * xtag = NULL;
size_t nb;
char * val;
- const char * s = NULL;
+ char * s = NULL;
char * t, * te;
unsigned long anint = 0;
int xx;
if (payloadfmt && strncmp(payloadfmt, "cpio", strlen("cpio")) == 0) {
rc = RPMRC_OK;
} else {
- const char *nevra = headerGetNEVRA(h, NULL);
+ char *nevra = headerGetNEVRA(h, NULL);
if (payloadfmt && strncmp(payloadfmt, "drpm", strlen("drpm")) == 0) {
rpmlog(RPMLOG_ERR,
_("%s is a Delta RPM and cannot be directly installed\n"),
break;
case 'E':
rpmcliConfigured();
- { const char *val = rpmExpand(arg, NULL);
+ { char *val = rpmExpand(arg, NULL);
fprintf(stdout, "%s\n", val);
val = _free(val);
}
xx = Fclose (scriptFd);
}
- { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
+ { char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
const char *path = SCRIPT_PATH;
if (ipath && ipath[5] != '%')
else
fn = xstrdup(arg);
} else if (*arg != '/') {
- const char *curDir = currentDirectory();
+ char *curDir = currentDirectory();
fn = (char *) rpmGetPath(curDir, "/", arg, NULL);
curDir = _free(curDir);
} else
const char ** argv)
{
const char * fn;
- const unsigned char * pkt = NULL;
+ unsigned char * pkt = NULL;
size_t pktlen = 0;
char * t = NULL;
int res = 0;
int rpmdsCompare(const rpmds A, const rpmds B)
{
- const char *aDepend = (A->DNEVR != NULL ? xstrdup(A->DNEVR+2) : "");
- const char *bDepend = (B->DNEVR != NULL ? xstrdup(B->DNEVR+2) : "");
+ char *aDepend = (A->DNEVR != NULL ? xstrdup(A->DNEVR+2) : "");
+ char *bDepend = (B->DNEVR != NULL ? xstrdup(B->DNEVR+2) : "");
char *aEVR, *bEVR;
const char *aE, *aV, *aR, *bE, *bV, *bR;
int result;
*/
static FD_t rpmgiOpen(const char * path, const char * fmode)
{
- const char * fn = rpmExpand(path, NULL);
+ char * fn = rpmExpand(path, NULL);
FD_t fd = Fopen(fn, fmode);
if (fd == NULL || Ferror(fd)) {
if (gi->argv != NULL && gi->argv[gi->i] != NULL)
do {
- const char * fn; /* XXX gi->hdrPath? */
+ char * fn; /* XXX gi->hdrPath? */
fn = gi->argv[gi->i];
if (!(gi->flags & RPMGI_NOHEADER)) {
niids = 0;
}
- { const char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL);
+ { char * globstr = rpmExpand("%{_repackage_dir}/*.rpm", NULL);
if (globstr == NULL || *globstr == '%') {
globstr = _free(globstr);
rc = -1;
void rpmpsPrint(FILE *fp, rpmps ps)
{
- const char * msg;
+ char * msg = NULL;
rpmpsi psi = NULL;
int i;
while (!gotDefaults) {
if (!rpmPlatform(platform)) {
- const char * s;
+ char * s;
s = rpmExpand("%{_host_cpu}", NULL);
if (s) {
strncpy(un.machine, s, sizeof(un.machine));
rpmRebuildTargetVars(&target, NULL);
/* Finally set target platform */
- { const char *cpu = rpmExpand("%{_target_cpu}", NULL);
- const char *os = rpmExpand("%{_target_os}", NULL);
+ { char *cpu = rpmExpand("%{_target_cpu}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
rpmSetMachine(cpu, os);
cpu = _free(cpu);
os = _free(os);
pgpDigParams sigp = rpmtsSignature(ts);
pgpDigParams pubp = rpmtsPubkey(ts);
rpmRC res = RPMRC_NOKEY;
- const char * pubkeysource = NULL;
+ char * pubkeysource = NULL;
int xx;
if (sig == NULL || dig == NULL || sigp == NULL || pubp == NULL)
/* Try keyserver lookup. */
if (ts->pkpkt == NULL) {
- const char * fn = rpmExpand("%{_hkp_keyserver_query}",
+ char * fn = rpmExpand("%{_hkp_keyserver_query}",
pgpHexStr(sigp->signid, sizeof(sigp->signid)), NULL);
xx = 0;
int32_t zero = 0;
pgpDig dig = NULL;
pgpDigParams pubp = NULL;
- const char * d = NULL;
- const char * enc = NULL;
- const char * n = NULL;
- const char * u = NULL;
- const char * v = NULL;
- const char * r = NULL;
- const char * evr = NULL;
+ char * d = NULL;
+ char * enc = NULL;
+ char * n = NULL;
+ char * u = NULL;
+ char * v = NULL;
+ char * r = NULL;
+ char * evr = NULL;
Header h = NULL;
rpmRC rc = RPMRC_FAIL; /* assume failure */
char * t;
int rc = 0;
if (defmode == (rpmMireMode)-1) {
- const char *t = rpmExpand("%{?_query_selector_match}", NULL);
+ char *t = rpmExpand("%{?_query_selector_match}", NULL);
if (*t == '\0' || !strcmp(t, "default"))
defmode = RPMMIRE_DEFAULT;
break;
case RPM_BIN_TYPE:
{
- const char * str = bin2hex((const char*) u.ptr, c);
+ char * str = bin2hex((const char*) u.ptr, c);
rc = miregexec(mire, str);
if ((!rc && !mire->notmatch) || (rc && mire->notmatch))
anymatch++;