ps = rpmtsProblems(ts);
if (rc == 0 && rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed build dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed build dependencies:\n"));
rpmpsPrint(NULL, ps);
rc = 1;
}
buildCmd = rpmExpand(mCmd, " ", buildScript, NULL);
(void) poptParseArgvString(buildCmd, &argc, &argv);
- rpmMessage(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd);
+ rpmlog(RPMMESS_NORMAL, _("Executing(%s): %s\n"), name, buildCmd);
if (!(child = fork())) {
errno = 0;
exit:
if (rc && rpmlogGetNrecs() > 0) {
- rpmMessage(RPMMESS_NORMAL, _("\n\nRPM build errors:\n"));
+ rpmlog(RPMMESS_NORMAL, _("\n\nRPM build errors:\n"));
rpmlogPrint(NULL);
}
for (x = 0; x < count; x++) {
if ((currentTime - mtime[x]) > tc)
- rpmMessage(RPMMESS_WARNING, _("TIMECHECK failure: %s\n"), files[x]);
+ rpmlog(RPMMESS_WARNING, _("TIMECHECK failure: %s\n"), files[x]);
}
files = hfd(files, fnt);
}
flp[1].flags |= flp->flags;
if (!(flp[1].flags & RPMFILE_EXCLUDE))
- rpmMessage(RPMMESS_WARNING, _("File listed twice: %s\n"),
+ rpmlog(RPMMESS_WARNING, _("File listed twice: %s\n"),
flp->fileURL);
/* file mode */
}
rc = 0;
- rpmMessage(RPMMESS_NORMAL, _("Checking for unpackaged file(s): %s\n"), s);
+ rpmlog(RPMMESS_NORMAL, _("Checking for unpackaged file(s): %s\n"), s);
rc = rpmfcExec(av_ckfile, fileList, &sb_stdout, 0);
if (rc < 0)
t = getStringBuf(sb_stdout);
if ((*t != '\0') && (*t != '\n')) {
rc = (_unpackaged_files_terminate_build) ? 1 : 0;
- rpmMessage((rc ? RPMMESS_ERROR : RPMMESS_WARNING),
+ rpmlog((rc ? RPMMESS_ERROR : RPMMESS_WARNING),
_("Installed (but unpackaged) file(s) found:\n%s"), t);
}
}
continue;
(void) headerNVR(pkg->header, &n, &v, &r);
- rpmMessage(RPMMESS_NORMAL, _("Processing files: %s-%s-%s\n"), n, v, r);
+ rpmlog(RPMMESS_NORMAL, _("Processing files: %s-%s-%s\n"), n, v, r);
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
res = rc;
if (hbn)
strcpy(hostname, hbn->h_name);
else
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("Could not canonicalize hostname: %s\n"), hostname);
oneshot = 1;
}
(void) rpmAddSignature(sig, sigtarget, RPMSIGTAG_MD5, passPhrase);
if ((sigtag = rpmLookupSignatureType(RPMLOOKUPSIG_QUERY)) > 0) {
- rpmMessage(RPMMESS_NORMAL, _("Generating signature: %d\n"), sigtag);
+ rpmlog(RPMMESS_NORMAL, _("Generating signature: %d\n"), sigtag);
(void) rpmAddSignature(sig, sigtarget, sigtag, passPhrase);
}
}
if (rc == 0)
- rpmMessage(RPMMESS_NORMAL, _("Wrote: %s\n"), fileName);
+ rpmlog(RPMMESS_NORMAL, _("Wrote: %s\n"), fileName);
else
(void) Unlink(fileName);
(void) chdir(dir);
}
- rpmMessage(RPMMESS_DEBUG, _("\texecv(%s) pid %d\n"),
+ rpmlog(RPMMESS_DEBUG, _("\texecv(%s) pid %d\n"),
argv[0], (unsigned)getpid());
unsetenv("MALLOC_CHECK_");
/* Collect status from prog */
reaped = waitpid(child, &status, 0);
- rpmMessage(RPMMESS_DEBUG, _("\twaitpid(%d) rc %d status %x\n"),
+ rpmlog(RPMMESS_DEBUG, _("\twaitpid(%d) rc %d status %x\n"),
(unsigned)child, (unsigned)reaped, status);
if (failNonZero && (!WIFEXITED(status) || WEXITSTATUS(status))) {
}
se = ftype;
- rpmMessage(RPMMESS_DEBUG, "%s: %s\n", s, se);
+ rpmlog(RPMMESS_DEBUG, "%s: %s\n", s, se);
/* Save the path. */
xx = argvAdd(&fc->fn, s);
if (!((Flags & dm->mask) ^ dm->xor))
continue;
if (bingo == 0) {
- rpmMessage(RPMMESS_NORMAL, "%s:", (dm->msg ? dm->msg : ""));
+ rpmlog(RPMMESS_NORMAL, "%s:", (dm->msg ? dm->msg : ""));
bingo = 1;
}
if ((DNEVR = rpmdsDNEVR(ds)) == NULL)
continue; /* XXX can't happen */
- rpmMessage(RPMMESS_NORMAL, " %s", DNEVR+2);
+ rpmlog(RPMMESS_NORMAL, " %s", DNEVR+2);
}
if (bingo)
- rpmMessage(RPMMESS_NORMAL, "\n");
+ rpmlog(RPMMESS_NORMAL, "\n");
}
ds = rpmdsFree(ds);
}
continue;
s = rpmExpand(dm->argv[0], NULL);
- rpmMessage(RPMMESS_NORMAL, _("Finding %s: %s\n"), dm->msg,
+ rpmlog(RPMMESS_NORMAL, _("Finding %s: %s\n"), dm->msg,
(s ? s : ""));
s = _free(s);
const char * pkgNEVR = rpmdsDNEVR(this);
const char * addNEVR = rpmdsDNEVR(oldChk);
if (rpmIsVerbose())
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("package %s was already added, skipping %s\n"),
(pkgNEVR ? pkgNEVR + 2 : "?pkgNEVR?"),
(addNEVR ? addNEVR + 2 : "?addNEVR?"));
const char * pkgNEVR = rpmdsDNEVR(this);
const char * addNEVR = rpmdsDNEVR(newChk);
if (rpmIsVerbose())
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("package %s was already added, replacing with %s\n"),
(pkgNEVR ? pkgNEVR + 2 : "?pkgNEVR?"),
(addNEVR ? addNEVR + 2 : "?addNEVR?"));
if (rpmVersionCompare(h, oh))
#endif
xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
- rpmMessage(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"),
+ rpmlog(RPMMESS_DEBUG, _(" Obsoletes: %s\t\terases %s\n"),
rpmdsDNEVR(obsoletes)+2, ohNEVRA);
ohNEVRA = _free(ohNEVRA);
}
*qname++ = '\0';
bdp->pname = pname;
bdp->qname = qname;
- rpmMessage(msglvl,
+ rpmlog(msglvl,
_("ignore package name relation(s) [%d]\t%s -> %s\n"),
i, bdp->pname, (bdp->qname ? bdp->qname : "???"));
}
* Attempt to unravel a dependency loop by eliminating Requires's.
*/
if (zap && !(Flags & RPMSENSE_PREREQ)) {
- rpmMessage(msglvl,
+ rpmlog(msglvl,
_("removing %s \"%s\" from tsort relations.\n"),
(rpmteNEVRA(p) ? rpmteNEVRA(p) : "???"), dp);
rpmteTSI(p)->tsi_count--;
pi = rpmtsiFree(pi);
/* Record all relations. */
- rpmMessage(RPMMESS_DEBUG, _("========== recording tsort relations\n"));
+ rpmlog(RPMMESS_DEBUG, _("========== recording tsort relations\n"));
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, oType)) != NULL) {
ts->ntrees = treex;
/* T4. Scan for zeroes. */
- rpmMessage(RPMMESS_DEBUG, _("========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)\n"));
+ rpmlog(RPMMESS_DEBUG, _("========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)\n"));
rescan:
if (pi != NULL) pi = rpmtsiFree(pi);
breadth = ((depth < npeer) ? peer[depth]++ : 0);
(void) rpmteSetBreadth(q, breadth);
- rpmMessage(RPMMESS_DEBUG, "%5d%5d%5d%5d%5d%5d %*s%c%s\n",
+ rpmlog(RPMMESS_DEBUG, "%5d%5d%5d%5d%5d%5d %*s%c%s\n",
orderingCount, rpmteNpreds(q),
rpmteTSI(q)->tsi_qcnt,
treex, depth, breadth,
if (!_printed && loopcheck == qlen && rpmteTSI(q)->tsi_suc != NULL) {
_printed++;
(void) rpmtsUnorderedSuccessors(ts, orderingCount);
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("========== successors only (%d bytes)\n"), (int)tsbytes);
/* Relink the queue in presentation order. */
rpmteTSI(p)->tsi_chain = NULL;
if (!printed) {
- rpmMessage(msglvl, _("LOOP:\n"));
+ rpmlog(msglvl, _("LOOP:\n"));
printed = 1;
}
buf[0] = '\0';
if (rpmteNEVRA(p) != NULL)
(void) stpcpy(buf, rpmteNEVRA(p));
- rpmMessage(msglvl, " %-40s %s\n", buf,
+ rpmlog(msglvl, " %-40s %s\n", buf,
(dp ? dp : "not found!?!"));
dp = _free(dp);
/* If a relation was eliminated, then continue sorting. */
/* XXX TODO: add control bit. */
if (nzaps && nrescans-- > 0) {
- rpmMessage(RPMMESS_DEBUG, _("========== continuing tsort ...\n"));
+ rpmlog(RPMMESS_DEBUG, _("========== continuing tsort ...\n"));
goto rescan;
}
/* Return no. of packages that could not be ordered. */
- rpmMessage(RPMMESS_ERROR, _("rpmtsOrder failed, %d elements remain\n"),
+ rpmlog(RPMMESS_ERROR, _("rpmtsOrder failed, %d elements remain\n"),
loopcheck);
return loopcheck;
}
rpmds provides;
/* FIX: rpmts{A,O} can return null. */
- rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s/%s 0x%x\n",
+ rpmlog(RPMMESS_DEBUG, "========== +++ %s %s/%s 0x%x\n",
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
rc = checkPackageDeps(ts, rpmteNEVRA(p),
rpmteDS(p, RPMTAG_REQUIRENAME),
rpmfi fi;
/* FIX: rpmts{A,O} can return null. */
- rpmMessage(RPMMESS_DEBUG, "========== --- %s %s/%s 0x%x\n",
+ rpmlog(RPMMESS_DEBUG, "========== --- %s %s/%s 0x%x\n",
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
rc = 0;
filesystems[numFilesystems].mntPoint = xstrdup(mntdir);
filesystems[numFilesystems].rdonly = rdonly;
#if 0
- rpmMessage(RPMMESS_DEBUG, _("%5d 0x%04x %s %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("%5d 0x%04x %s %s\n"),
numFilesystems,
(unsigned) filesystems[numFilesystems].dev,
(filesystems[numFilesystems].rdonly ? "ro" : "rw"),
if (!dnli->active[i]) continue;
if (j == 0) {
j = 1;
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("========== Directories not explicitly included in package:\n"));
}
- rpmMessage(RPMMESS_DEBUG, _("%10d %s\n"), i, fi->dnl[i]);
+ rpmlog(RPMMESS_DEBUG, _("%10d %s\n"), i, fi->dnl[i]);
}
if (j)
- rpmMessage(RPMMESS_DEBUG, "==========\n");
+ rpmlog(RPMMESS_DEBUG, "==========\n");
}
}
return dnli;
if (fi->fuser && unameToUid(fi->fuser[i], &uid)) {
if (fsm->goal == FSM_PKGINSTALL)
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("user %s does not exist - using root\n"), fi->fuser[i]);
uid = 0;
finalMode &= ~S_ISUID; /* turn off suid bit */
if (fi->fgroup && gnameToGid(fi->fgroup[i], &gid)) {
if (fsm->goal == FSM_PKGINSTALL)
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("group %s does not exist - using root\n"), fi->fgroup[i]);
gid = 0;
finalMode &= ~S_ISGID; /* turn off sgid bit */
}
if (fsm->fcontext == NULL)
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s directory created with perms %04o, no context.\n"),
fsm->path, (unsigned)(st->st_mode & 07777));
else
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s directory created with perms %04o, context %s.\n"),
fsm->path, (unsigned)(st->st_mode & 07777),
fsm->fcontext);
/* do nothing */
} else if (stage & FSM_INTERNAL) {
if (_fsm_debug && !(stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s %06o%3d (%4d,%4d)%10d %s %s\n",
+ rpmlog(RPMMESS_DEBUG, " %8s %06o%3d (%4d,%4d)%10d %s %s\n",
cur,
(unsigned)st->st_mode, (int)st->st_nlink,
(int)st->st_uid, (int)st->st_gid, (int)st->st_size,
} else {
fsm->stage = stage;
if (_fsm_debug || !(stage & FSM_VERBOSE))
- rpmMessage(RPMMESS_DEBUG, "%-8s %06o%3d (%4d,%4d)%10d %s %s\n",
+ rpmlog(RPMMESS_DEBUG, "%-8s %06o%3d (%4d,%4d)%10d %s %s\n",
cur,
(unsigned)st->st_mode, (int)st->st_nlink,
(int)st->st_uid, (int)st->st_gid, (int)st->st_size,
if (fsm->ix < 0) {
if (fsm->goal == FSM_PKGINSTALL) {
#if 0
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("archive file %s was not found in header file list\n"),
fsm->path);
#endif
fsm->path = fsmFsPath(fsm, st, NULL, fsm->osuffix);
rc = fsmNext(fsm, FSM_RENAME);
if (!rc)
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("%s saved as %s\n"),
(fsm->opath ? fsm->opath : ""),
(fsm->path ? fsm->path : ""));
fsm->path = fsmFsPath(fsm, st, NULL, fsm->osuffix);
rc = fsmNext(fsm, FSM_RENAME);
if (!rc) {
- rpmMessage(RPMMESS_WARNING, _("%s saved as %s\n"),
+ rpmlog(RPMMESS_WARNING, _("%s saved as %s\n"),
(fsm->opath ? fsm->opath : ""),
(fsm->path ? fsm->path : ""));
}
rc = fsmNext(fsm, FSM_RENAME);
if (!rc && fsm->nsuffix) {
const char * opath = fsmFsPath(fsm, st, NULL, NULL);
- rpmMessage(RPMMESS_WARNING, _("%s created as %s\n"),
+ rpmlog(RPMMESS_WARNING, _("%s created as %s\n"),
(opath ? opath : ""),
(fsm->path ? fsm->path : ""));
opath = _free(opath);
}
rc = Unlink(fsm->path);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s) %s\n", cur,
fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0)
rc = (errno == ENOENT ? CPIOERR_ENOENT : CPIOERR_UNLINK_FAILED);
}
#endif
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
fsm->opath, fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_RENAME_FAILED;
break;
case FSM_MKDIR:
rc = Mkdir(fsm->path, (st->st_mode & 07777));
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
fsm->path, (unsigned)(st->st_mode & 07777),
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_MKDIR_FAILED;
case FSM_RMDIR:
rc = Rmdir(fsm->path);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s) %s\n", cur,
fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0)
switch (errno) {
break;
rc = lsetfilecon(fsm->path, (security_context_t)fsm->fcontext);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
fsm->path, fsm->fcontext,
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = (errno == EOPNOTSUPP ? 0 : CPIOERR_LSETFCON_FAILED);
case FSM_CHOWN:
rc = chown(fsm->path, st->st_uid, st->st_gid);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
fsm->path, (int)st->st_uid, (int)st->st_gid,
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_CHOWN_FAILED;
#if ! CHOWN_FOLLOWS_SYMLINK
rc = lchown(fsm->path, st->st_uid, st->st_gid);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %d, %d) %s\n", cur,
fsm->path, (int)st->st_uid, (int)st->st_gid,
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_CHOWN_FAILED;
case FSM_CHMOD:
rc = chmod(fsm->path, (st->st_mode & 07777));
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
fsm->path, (unsigned)(st->st_mode & 07777),
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_CHMOD_FAILED;
stamp.modtime = st->st_mtime;
rc = utime(fsm->path, &stamp);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0x%x) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, 0x%x) %s\n", cur,
fsm->path, (unsigned)st->st_mtime,
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_UTIME_FAILED;
case FSM_SYMLINK:
rc = symlink(fsm->opath, fsm->path);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
fsm->opath, fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_SYMLINK_FAILED;
break;
case FSM_LINK:
rc = Link(fsm->opath, fsm->path);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %s) %s\n", cur,
fsm->opath, fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_LINK_FAILED;
break;
case FSM_MKFIFO:
rc = mkfifo(fsm->path, (st->st_mode & 07777));
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, 0%04o) %s\n", cur,
fsm->path, (unsigned)(st->st_mode & 07777),
(rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_MKFIFO_FAILED;
/* FIX: check S_IFIFO or dev != 0 */
rc = mknod(fsm->path, (st->st_mode & ~07777), st->st_rdev);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0%o, 0x%x) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, 0%o, 0x%x) %s\n", cur,
fsm->path, (unsigned)(st->st_mode & ~07777),
(unsigned)st->st_rdev,
(rc < 0 ? strerror(errno) : ""));
case FSM_LSTAT:
rc = Lstat(fsm->path, ost);
if (_fsm_debug && (stage & FSM_SYSCALL) && rc && errno != ENOENT)
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, ost) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, ost) %s\n", cur,
fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0) {
rc = (errno == ENOENT ? CPIOERR_ENOENT : CPIOERR_LSTAT_FAILED);
case FSM_STAT:
rc = Stat(fsm->path, ost);
if (_fsm_debug && (stage & FSM_SYSCALL) && rc && errno != ENOENT)
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, ost) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, ost) %s\n", cur,
fsm->path, (rc < 0 ? strerror(errno) : ""));
if (rc < 0) {
rc = (errno == ENOENT ? CPIOERR_ENOENT : CPIOERR_STAT_FAILED);
/* XXX NUL terminated result in fsm->rdbuf, len in fsm->rdnb. */
rc = Readlink(fsm->path, fsm->rdbuf, fsm->rdsize - 1);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, rdbuf, %d) %s\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, rdbuf, %d) %s\n", cur,
fsm->path, (int)(fsm->rdsize -1), (rc < 0 ? strerror(errno) : ""));
if (rc < 0) rc = CPIOERR_READLINK_FAILED;
else {
case FSM_DREAD:
fsm->rdnb = Fread(fsm->wrbuf, sizeof(*fsm->wrbuf), fsm->wrlen, fsm->cfd);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\trdnb %d\n",
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\trdnb %d\n",
cur, (fsm->wrbuf == fsm->wrb ? "wrbuf" : "mmap"),
(int)fsm->wrlen, (int)fsm->rdnb);
if (fsm->rdnb != fsm->wrlen || Ferror(fsm->cfd))
case FSM_DWRITE:
fsm->wrnb = Fwrite(fsm->rdbuf, sizeof(*fsm->rdbuf), fsm->rdnb, fsm->cfd);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\twrnb %d\n",
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\twrnb %d\n",
cur, (fsm->rdbuf == fsm->rdb ? "rdbuf" : "mmap"),
(int)fsm->rdnb, (int)fsm->wrnb);
if (fsm->rdnb != fsm->wrnb || Ferror(fsm->cfd))
break;
}
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, \"r\") rfd %p rdbuf %p\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, \"r\") rfd %p rdbuf %p\n", cur,
fsm->path, fsm->rfd, fsm->rdbuf);
break;
case FSM_READ:
fsm->rdnb = Fread(fsm->rdbuf, sizeof(*fsm->rdbuf), fsm->rdlen, fsm->rfd);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (rdbuf, %d, rfd)\trdnb %d\n",
+ rpmlog(RPMMESS_DEBUG, " %8s (rdbuf, %d, rfd)\trdnb %d\n",
cur, (int)fsm->rdlen, (int)fsm->rdnb);
if (fsm->rdnb != fsm->rdlen || Ferror(fsm->rfd))
rc = CPIOERR_READ_FAILED;
case FSM_RCLOSE:
if (fsm->rfd != NULL) {
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->rfd);
+ rpmlog(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->rfd);
(void) rpmswAdd(rpmtsOp(fsmGetTs(fsm), RPMTS_OP_DIGEST),
fdstat_op(fsm->rfd, FDSTAT_DIGEST));
(void) Fclose(fsm->rfd);
rc = CPIOERR_OPEN_FAILED;
}
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%s, \"w\") wfd %p wrbuf %p\n", cur,
+ rpmlog(RPMMESS_DEBUG, " %8s (%s, \"w\") wfd %p wrbuf %p\n", cur,
fsm->path, fsm->wfd, fsm->wrbuf);
break;
case FSM_WRITE:
fsm->wrnb = Fwrite(fsm->wrbuf, sizeof(*fsm->wrbuf), fsm->rdnb, fsm->wfd);
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (wrbuf, %d, wfd)\twrnb %d\n",
+ rpmlog(RPMMESS_DEBUG, " %8s (wrbuf, %d, wfd)\twrnb %d\n",
cur, (int)fsm->rdnb, (int)fsm->wrnb);
if (fsm->rdnb != fsm->wrnb || Ferror(fsm->wfd))
rc = CPIOERR_WRITE_FAILED;
case FSM_WCLOSE:
if (fsm->wfd != NULL) {
if (_fsm_debug && (stage & FSM_SYSCALL))
- rpmMessage(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->wfd);
+ rpmlog(RPMMESS_DEBUG, " %8s (%p)\n", cur, fsm->wfd);
(void) rpmswAdd(rpmtsOp(fsmGetTs(fsm), RPMTS_OP_DIGEST),
fdstat_op(fsm->wfd, FDSTAT_DIGEST));
(void) Fclose(fsm->wfd);
rpmrc = rpmGlob(s, &ac, &av);
if (rpmrc != RPMRC_OK) goto exit;
- rpmMessage(RPMMESS_DEBUG, _("adding %d args from manifest.\n"), ac);
+ rpmlog(RPMMESS_DEBUG, _("adding %d args from manifest.\n"), ac);
/* Count non-NULL args, keeping track of 1st arg after last NULL. */
npre = 0;
/* Parse the parameters from the OpenPGP packets that will be needed. */
xx = pgpPrtPkts(sig, info->count, dig, (_print_pkts & rpmIsDebug()));
if (dig->signature.version != 3 && dig->signature.version != 4) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping header with unverifiable V%u signature\n"),
dig->signature.version);
rpmtsCleanDig(ts);
/* Parse the parameters from the OpenPGP packets that will be needed. */
xx = pgpPrtPkts(sig, info->count, dig, (_print_pkts & rpmIsDebug()));
if (dig->signature.version != 3 && dig->signature.version != 4) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping header with unverifiable V%u signature\n"),
dig->signature.version);
rpmtsCleanDig(ts);
/* Parse the parameters from the OpenPGP packets that will be needed. */
xx = pgpPrtPkts(sig, siglen, dig, (_print_pkts & rpmIsDebug()));
if (dig->signature.version != 3 && dig->signature.version != 4) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping package %s with unverifiable V%u signature\n"),
fn, dig->signature.version);
rc = RPMRC_FAIL;
/* Parse the parameters from the OpenPGP packets that will be needed. */
xx = pgpPrtPkts(sig, siglen, dig, (_print_pkts & rpmIsDebug()));
if (dig->signature.version != 3 && dig->signature.version != 4) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping package %s with unverifiable V%u signature\n"),
fn, dig->signature.version);
rc = RPMRC_FAIL;
xx = pgpPrtPkts(sig, siglen, dig, (_print_pkts & rpmIsDebug()));
if (dig->signature.version != 3 && dig->signature.version != 4) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping package %s with unverifiable V%u signature\n"),
fn, dig->signature.version);
rc = RPMRC_FAIL;
rc = rpmVerifySignature(ts, buf);
switch (rc) {
case RPMRC_OK: /* Signature is OK. */
- rpmMessage(RPMMESS_DEBUG, "%s: %s", fn, buf);
+ rpmlog(RPMMESS_DEBUG, "%s: %s", fn, buf);
break;
case RPMRC_NOTTRUSTED: /* Signature is OK, but key is not trusted. */
case RPMRC_NOKEY: /* Public key is unavailable. */
/* XXX Print NOKEY/NOTTRUSTED warning only once. */
{ int lvl = (rpmtsStashKeyid(ts) ? RPMMESS_DEBUG : RPMMESS_WARNING);
- rpmMessage(lvl, "%s: %s", fn, buf);
+ rpmlog(lvl, "%s: %s", fn, buf);
} break;
case RPMRC_NOTFOUND: /* Signature is unknown type. */
- rpmMessage(RPMMESS_WARNING, "%s: %s", fn, buf);
+ rpmlog(RPMMESS_WARNING, "%s: %s", fn, buf);
break;
default:
case RPMRC_FAIL: /* Signature does not verify. */
- rpmMessage(RPMMESS_ERROR, "%s: %s", fn, buf);
+ rpmlog(RPMMESS_ERROR, "%s: %s", fn, buf);
break;
}
} else {
const char *nevra = hGetNEVRA(h, NULL);
if (payloadfmt && strncmp(payloadfmt, "drpm", strlen("drpm")) == 0) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("%s is a Delta RPM and cannot be directly installed\n"),
nevra);
} else {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("Unsupported payload (%s) in package %s\n"),
payloadfmt ? payloadfmt : "none", nevra);
}
msecs = psm->sq.op.usecs/1000;
(void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), &psm->sq.op);
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s: waitpid(%d) rc %d status %x secs %u.%03u\n"),
psm->stepName, (unsigned)psm->sq.child,
(unsigned)psm->sq.reaped, psm->sq.status,
if (progArgv && strcmp(progArgv[0], "<lua>") == 0) {
#ifdef WITH_LUA
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s: %s(%s-%s-%s.%s) running <lua> scriptlet.\n"),
psm->stepName, tag2sln(psm->scriptTag), n, v, r, a);
return runLuaScript(psm, h, sln, progArgc, progArgv,
*/
if (ldconfig_path && progArgv != NULL && psm->unorderedSuccessor) {
if (ldconfig_done && !strcmp(progArgv[0], ldconfig_path)) {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s: %s(%s-%s-%s.%s) skipping redundant \"%s\".\n"),
psm->stepName, tag2sln(psm->scriptTag), n, v, r, a,
progArgv[0]);
}
}
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("%s: %s(%s-%s-%s.%s) %ssynchronous scriptlet start\n"),
psm->stepName, tag2sln(psm->scriptTag), n, v, r, a,
(psm->unorderedSuccessor ? "a" : ""));
xx = chroot(rootDir);
}
xx = chdir("/");
- rpmMessage(RPMMESS_DEBUG, _("%s: %s(%s-%s-%s.%s)\texecv(%s) pid %d\n"),
+ rpmlog(RPMMESS_DEBUG, _("%s: %s(%s-%s-%s.%s)\texecv(%s) pid %d\n"),
psm->stepName, sln, n, v, r, a,
argv[0], (unsigned)getpid());
case PSM_UNKNOWN:
break;
case PSM_INIT:
- rpmMessage(RPMMESS_DEBUG, _("%s: %s has %d files, test = %d\n"),
+ rpmlog(RPMMESS_DEBUG, _("%s: %s has %d files, test = %d\n"),
psm->stepName, rpmteNEVR(psm->te),
rpmfiFC(fi), (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST));
if (psm->goal == PSM_PKGSAVE) {
if (!rc && ts && ts->notify == NULL) {
- rpmMessage(RPMMESS_VERBOSE, _("Wrote: %s\n"),
+ rpmlog(RPMMESS_VERBOSE, _("Wrote: %s\n"),
(psm->pkgURL ? psm->pkgURL : "???"));
}
}
/* OK, we got a real score so lets get the appropriate
* score entry.
*/
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Attempting to mark %s as installed in score board(%p).\n"),
rpmteN(psm->te), score);
se = rpmtsScoreGetEntry(score, rpmteN(psm->te));
/* OK, we got a real score so lets get the appropriate
* score entry.
*/
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Attempting to mark %s as erased in score board(%p).\n"),
rpmteN(psm->te), score);
se = rpmtsScoreGetEntry(score, rpmteN(psm->te));
*te++ = '\n';
*te = '\0';
}
- rpmMessage(RPMMESS_NORMAL, "%s", t);
+ rpmlog(RPMMESS_NORMAL, "%s", t);
te = t;
*t = '\0';
}
rpmlog(RPMERR_QUERYINFO, _("invalid package number: %s\n"), arg);
return 1;
}
- rpmMessage(RPMMESS_DEBUG, _("package record number: %u\n"), recOffset);
+ rpmlog(RPMMESS_DEBUG, _("package record number: %u\n"), recOffset);
/* RPMDBI_PACKAGES */
qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, &recOffset, sizeof(recOffset));
if (qva->qva_mi == NULL) {
/* If same signer, skip resigning the package. */
if (!memcmp(oldsignid, newsignid, sizeof(oldsignid))) {
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("%s: was already signed by key ID %s, skipping\n"),
rpm, pgpHexStr(newsignid+4, sizeof(newsignid)-4));
if (!(ds->Type != NULL && ds->DNEVR != NULL))
return;
- rpmMessage(RPMMESS_DEBUG, "%9s: %-45s %-s %s\n", ds->Type,
+ rpmlog(RPMMESS_DEBUG, "%9s: %-45s %-s %s\n", ds->Type,
(!strcmp(ds->DNEVR, "cached") ? ds->DNEVR : ds->DNEVR+2),
(rc ? _("NO ") : _("YES")),
(where != NULL ? where : ""));
else if (aE && *aE && atol(aE) > 0) {
if (!B->nopromote) {
int lvl = (_rpmds_unspecified_epoch_noise ? RPMMESS_WARNING : RPMMESS_DEBUG);
- rpmMessage(lvl, _("The \"B\" dependency needs an epoch (assuming same epoch as \"A\")\n\tA = \"%s\"\tB = \"%s\"\n"),
+ rpmlog(lvl, _("The \"B\" dependency needs an epoch (assuming same epoch as \"A\")\n\tA = \"%s\"\tB = \"%s\"\n"),
aDepend, bDepend);
sense = 0;
} else
exit:
if (_noisy_range_comparison_debug_message)
- rpmMessage(RPMMESS_DEBUG, _(" %s A %s\tB %s\n"),
+ rpmlog(RPMMESS_DEBUG, _(" %s A %s\tB %s\n"),
(result ? _("YES") : _("NO ")), aDepend, bDepend);
aDepend = _free(aDepend);
bDepend = _free(bDepend);
if (EVR == NULL) EVR = "?EVR?";
if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?";
- rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"),
pkgNEVR, ds->Type, DNEVR+2);
switch ((unsigned)DNEVR[0]) {
* package has marked it as missingok, or allfiles is requested.
*/
if (skipMissing && (newFlags & RPMFILE_MISSINGOK)) {
- rpmMessage(RPMMESS_DEBUG, _("%s skipped due to missingok flag\n"),
+ rpmlog(RPMMESS_DEBUG, _("%s skipped due to missingok flag\n"),
fn);
return FA_SKIP;
} else {
if (!_printed) {
_printed = 1;
- rpmMessage(RPMMESS_DEBUG, _("========== relocations\n"));
+ rpmlog(RPMMESS_DEBUG, _("========== relocations\n"));
for (i = 0; i < numRelocations; i++) {
if (relocations[i].oldPath == NULL) continue; /* XXX can't happen */
if (relocations[i].newPath == NULL)
- rpmMessage(RPMMESS_DEBUG, _("%5d exclude %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("%5d exclude %s\n"),
i, relocations[i].oldPath);
else
- rpmMessage(RPMMESS_DEBUG, _("%5d relocate %s -> %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("%5d relocate %s -> %s\n"),
i, relocations[i].oldPath, relocations[i].newPath);
}
}
}
if (actions) {
actions[i] = FA_SKIPNSTATE;
- rpmMessage(RPMMESS_DEBUG, _("excluding %s %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("excluding %s %s\n"),
ftstring(ft), fn);
}
continue;
if (fnlen != len) continue;
if (actions)
- rpmMessage(RPMMESS_DEBUG, _("relocating %s to %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("relocating %s to %s\n"),
fn, relocations[j].newPath);
nrelocated++;
t[slen+1] = '\0';
if (actions)
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("relocating directory %s to %s\n"), dirNames[i], t);
dirNames[i] = t;
nrelocated++;
const char * s;
if (_rpmgi_debug < 0)
-rpmMessage(RPMMESS_DEBUG, "FTS_%s\t%*s %s%s\n", ftsInfoStr(fts->fts_info),
+rpmlog(RPMMESS_DEBUG, "FTS_%s\t%*s %s%s\n", ftsInfoStr(fts->fts_info),
indent * (fts->fts_level < 0 ? 0 : fts->fts_level), "",
fts->fts_name,
((fts->fts_info == FTS_D || fts->fts_info == FTS_DP) ? "/" : ""));
ps = rpmtsProblems(ts);
if (rpmpsNumProblems(ps) > 0) {
/* XXX rpminstall will need RPMMESS_ERROR */
- rpmMessage(RPMMESS_VERBOSE, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_VERBOSE, _("Failed dependencies:\n"));
if (rpmIsVerbose())
rpmpsPrint(NULL, ps);
if (ts->suggests != NULL && ts->nsuggests > 0) {
- rpmMessage(RPMMESS_VERBOSE, _(" Suggested resolutions:\n"));
+ rpmlog(RPMMESS_VERBOSE, _(" Suggested resolutions:\n"));
for (i = 0; i < ts->nsuggests; i++) {
const char * str = ts->suggests[i];
if (str == NULL)
break;
- rpmMessage(RPMMESS_VERBOSE, "\t%s\n", str);
+ rpmlog(RPMMESS_VERBOSE, "\t%s\n", str);
ts->suggests[i] = NULL;
str = _free(str);
ts->suggests[ts->nsuggests] = _free(ts->suggests[ts->nsuggests]);
}
ts->suggests = _free(ts->suggests);
- rpmMessage(RPMMESS_DEBUG, _("Adding goal: %s\n"), fileURL);
+ rpmlog(RPMMESS_DEBUG, _("Adding goal: %s\n"), fileURL);
eiu->pkgURL[eiu->pkgx] = fileURL;
fileURL = NULL;
eiu->pkgx++;
/* XXX undefined %{name}/%{version}/%{release} here */
/* XXX %{_tmpdir} does not exist */
- rpmMessage(RPMMESS_DEBUG, _(" ... as %s\n"), tfn);
+ rpmlog(RPMMESS_DEBUG, _(" ... as %s\n"), tfn);
rc = urlGetFile(fileURL, tfn);
if (rc < 0) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("skipping %s - transfer failed - %s\n"),
fileURL, ftpStrerror(rc));
eiu->numFailed++;
{
const char * fileName;
- rpmMessage(RPMMESS_DEBUG, "============== %s\n", *eiu->fnp);
+ rpmlog(RPMMESS_DEBUG, "============== %s\n", *eiu->fnp);
(void) urlPath(*eiu->fnp, &fileName);
/* Try to read the header from a package file. */
switch (eiu->rpmrc) {
case RPMRC_FAIL:
- rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), *eiu->fnp);
+ rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *eiu->fnp);
eiu->numFailed++; *eiu->fnp = NULL;
continue;
break;
eiu->isSource = headerIsEntry(eiu->h, RPMTAG_SOURCEPACKAGE);
if (eiu->isSource) {
- rpmMessage(RPMMESS_DEBUG, _("\tadded source package [%d]\n"),
+ rpmlog(RPMMESS_DEBUG, _("\tadded source package [%d]\n"),
eiu->numSRPMS);
eiu->sourceURL = xrealloc(eiu->sourceURL,
(eiu->numSRPMS + 2) * sizeof(*eiu->sourceURL));
} else {
const char * name;
xx = headerNVR(eiu->h, &name, NULL, NULL);
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("package %s is not relocatable\n"), name);
eiu->numFailed++;
goto exit;
switch(rc) {
case 0:
- rpmMessage(RPMMESS_DEBUG, _("\tadded binary package [%d]\n"),
+ rpmlog(RPMMESS_DEBUG, _("\tadded binary package [%d]\n"),
eiu->numRPMS);
break;
case 1:
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("error reading from file %s\n"), *eiu->fnp);
eiu->numFailed++;
goto exit;
break;
case 2:
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("file %s requires a newer version of RPM\n"),
*eiu->fnp);
eiu->numFailed++;
break;
}
- rpmMessage(RPMMESS_DEBUG, _("found %d source and %d binary packages\n"),
+ rpmlog(RPMMESS_DEBUG, _("found %d source and %d binary packages\n"),
eiu->numSRPMS, eiu->numRPMS);
if (eiu->numFailed) goto exit;
ps = rpmtsProblems(ts);
if (!stopInstall && rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
eiu->numFailed = eiu->numPkgs;
stopInstall = 1;
if (ts->suggests != NULL && ts->nsuggests > 0) {
- rpmMessage(RPMMESS_NORMAL, _(" Suggested resolutions:\n"));
+ rpmlog(RPMMESS_NORMAL, _(" Suggested resolutions:\n"));
for (i = 0; i < ts->nsuggests; i++) {
const char * str = ts->suggests[i];
if (str == NULL)
break;
- rpmMessage(RPMMESS_NORMAL, "\t%s\n", str);
+ rpmlog(RPMMESS_NORMAL, "\t%s\n", str);
ts->suggests[i] = NULL;
str = _free(str);
rpmcliPackagesTotal += eiu->numSRPMS;
- rpmMessage(RPMMESS_DEBUG, _("installing binary packages\n"));
+ rpmlog(RPMMESS_DEBUG, _("installing binary packages\n"));
/* Drop added/available package indices and dependency sets. */
rpmtsClean(ts);
if (eiu->sourceURL[i] == NULL) continue;
eiu->fd = Fopen(eiu->sourceURL[i], "r.ufdio");
if (eiu->fd == NULL || Ferror(eiu->fd)) {
- rpmMessage(RPMMESS_ERROR, _("cannot open file %s: %s\n"),
+ rpmlog(RPMMESS_ERROR, _("cannot open file %s: %s\n"),
eiu->sourceURL[i], Fstrerror(eiu->fd));
if (eiu->fd != NULL) {
xx = Fclose(eiu->fd);
/* XXX HACK to get rpmdbFindByLabel out of the API */
mi = rpmtsInitIterator(ts, RPMDBI_LABEL, *arg, 0);
if (mi == NULL) {
- rpmMessage(RPMMESS_ERROR, _("package %s is not installed\n"), *arg);
+ rpmlog(RPMMESS_ERROR, _("package %s is not installed\n"), *arg);
numFailed++;
} else {
Header h; /* XXX iterator owns the reference */
unsigned int recOffset = rpmdbGetIteratorOffset(mi);
if (!(count++ == 0 || (ia->eraseInterfaceFlags & UNINSTALL_ALLMATCHES))) {
- rpmMessage(RPMMESS_ERROR, _("\"%s\" specifies multiple packages\n"),
+ rpmlog(RPMMESS_ERROR, _("\"%s\" specifies multiple packages\n"),
*arg);
numFailed++;
break;
ps = rpmtsProblems(ts);
if (!stopUninstall && rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
numFailed += numPackages;
stopUninstall = 1;
fd = Fopen(arg, "r.ufdio");
if (fd == NULL || Ferror(fd)) {
- rpmMessage(RPMMESS_ERROR, _("cannot open %s: %s\n"), arg, Fstrerror(fd));
+ rpmlog(RPMMESS_ERROR, _("cannot open %s: %s\n"), arg, Fstrerror(fd));
if (fd != NULL) (void) Fclose(fd);
return 1;
}
ovsflags = rpmtsSetVSFlags(ts, ovsflags);
}
if (rc != 0) {
- rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), arg);
+ rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), arg);
if (specFilePtr && *specFilePtr)
*specFilePtr = _free(*specFilePtr);
if (cookie && *cookie)
/* Install the previously erased packages for this transaction. */
while (rp != NULL && rp->val.u32 == thistid) {
- rpmMessage(RPMMESS_DEBUG, "\t+++ install %s\n",
+ rpmlog(RPMMESS_DEBUG, "\t+++ install %s\n",
(rp->key ? rp->key : "???"));
rc = rpmtsAddInstallElement(ts, rp->h, (fnpyKey)rp->key,
/* Erase the previously installed packages for this transaction. */
while (ip != NULL && ip->val.u32 == thistid) {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
"\t--- erase h#%u\n", ip->instance);
rc = rpmtsAddEraseElement(ts, ip->h, ip->instance);
break;
tid = (time_t)thistid;
- rpmMessage(RPMMESS_NORMAL,
+ rpmlog(RPMMESS_NORMAL,
_("Rollback packages (+%d/-%d) to %-24.24s (0x%08x):\n"),
numAdded, numRemoved, ctime(&tid), tid);
rc = rpmtsCheck(ts);
ps = rpmtsProblems(ts);
if (rc != 0 && rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
ps = rpmpsFree(ps);
goto exit;
/* Clean up after successful rollback. */
if (rtids && !rpmIsDebug()) {
int i;
- rpmMessage(RPMMESS_NORMAL, _("Cleaning up repackaged packages:\n"));
+ rpmlog(RPMMESS_NORMAL, _("Cleaning up repackaged packages:\n"));
if (rtids->idt)
for (i = 0; i < rtids->nidt; i++) {
IDT rrp = rtids->idt + i;
if (rrp->val.u32 != thistid)
continue;
if (rrp->key) { /* XXX can't happen */
- rpmMessage(RPMMESS_NORMAL, _("\tRemoving %s:\n"), rrp->key);
+ rpmlog(RPMMESS_NORMAL, _("\tRemoving %s:\n"), rrp->key);
(void) unlink(rrp->key); /* XXX: Should check rc??? */
}
}
rootDir = "/";
lock = rpmlock_new(rootDir);
if (!lock) {
- rpmMessage(RPMMESS_ERROR, _("can't create transaction lock on %s\n"), rpmlock_path);
+ rpmlog(RPMMESS_ERROR, _("can't create transaction lock on %s\n"), rpmlock_path);
} else if (!rpmlock_acquire(lock, RPMLOCK_WRITE)) {
if (lock->openmode & RPMLOCK_WRITE)
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("waiting for transaction lock on %s\n"), rpmlock_path);
if (!rpmlock_acquire(lock, RPMLOCK_WRITE|RPMLOCK_WAIT)) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("can't create transaction lock on %s\n"), rpmlock_path);
rpmlock_free(lock);
lock = NULL;
if (name) *name = current[type];
if (tables[currTables[type]].hasCanon) {
- rpmMessage(RPMMESS_WARNING, _("Unknown system: %s\n"), current[type]);
- rpmMessage(RPMMESS_WARNING, _("Please contact %s\n"), PACKAGE_BUGREPORT);
+ rpmlog(RPMMESS_WARNING, _("Unknown system: %s\n"), current[type]);
+ rpmlog(RPMMESS_WARNING, _("Please contact %s\n"), PACKAGE_BUGREPORT);
}
}
}
if (rc) {
const char * dn;
dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("cannot open Packages database in %s\n"), dn);
dn = _free(dn);
}
memcpy(ts->pksignid, pubp->signid, sizeof(ts->pksignid));
if (pubkeysource)
- rpmMessage(RPMMESS_DEBUG, "========== %s pubkey id %08x %08x (%s)\n",
+ rpmlog(RPMMESS_DEBUG, "========== %s pubkey id %08x %08x (%s)\n",
(sigp->pubkey_algo == PGPPUBKEYALGO_DSA ? "DSA" :
(sigp->pubkey_algo == PGPPUBKEYALGO_RSA ? "RSA" : "???")),
pgpGrab(sigp->signid, 4), pgpGrab(sigp->signid+4, 4),
if (rc) {
const char * dn;
dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL);
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("cannot open Solve database in %s\n"), dn);
dn = _free(dn);
}
if (h != NULL &&
!rpmtsAddInstallElement(ts, h, (fnpyKey)str, 1, NULL))
{
- rpmMessage(RPMMESS_DEBUG, _("Adding: %s\n"), str);
+ rpmlog(RPMMESS_DEBUG, _("Adding: %s\n"), str);
rc = -1;
/* XXX str memory leak */
break;
goto exit;
}
- rpmMessage(RPMMESS_DEBUG, _("Suggesting: %s\n"), str);
+ rpmlog(RPMMESS_DEBUG, _("Suggesting: %s\n"), str);
/* If suggestion is already present, don't bother. */
if (ts->suggests != NULL && ts->nsuggests > 0) {
if (bsearch(&str, ts->suggests, ts->nsuggests,
if (rpmtsFilterFlags(ts) & RPMPROB_FILTER_DISKSPACE)
return 0;
- rpmMessage(RPMMESS_DEBUG, _("mounted filesystems:\n"));
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG, _("mounted filesystems:\n"));
+ rpmlog(RPMMESS_DEBUG,
_(" i dev bsize bavail iavail mount point\n"));
rc = rpmGetFilesystemList(&ts->filesystems, &ts->filesystemCount);
/* XXX Avoid FAT and other file systems that have not inodes. */
dsi->iavail = !(sfb.f_ffree == 0 && sfb.f_files == 0)
? sfb.f_ffree : -1;
- rpmMessage(RPMMESS_DEBUG, _("%5d 0x%08x %8u %12ld %12ld %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("%5d 0x%08x %8u %12ld %12ld %s\n"),
i, (unsigned) dsi->dev, (unsigned) dsi->bsize,
(signed long) dsi->bavail, (signed long) dsi->iavail,
ts->filesystems[i]);
rpmRC rc = RPMRC_OK; /* Assume success */
rpmtsScoreEntry se;
- rpmMessage(RPMMESS_DEBUG, _("Creating transaction score board(%p, %p)\n"),
+ rpmlog(RPMMESS_DEBUG, _("Creating transaction score board(%p, %p)\n"),
runningTS, rollbackTS);
/* Allocate space for score board */
score = xcalloc(1, sizeof(*score));
- rpmMessage(RPMMESS_DEBUG, _("\tScore board address: %p\n"), score);
+ rpmlog(RPMMESS_DEBUG, _("\tScore board address: %p\n"), score);
/*
* Determine the maximum size needed for the entry list.
* but for now it will work.
*/
tranElements = rpmtsNElements(runningTS);
- rpmMessage(RPMMESS_DEBUG, _("\tAllocating space for %d entries\n"), tranElements);
+ rpmlog(RPMMESS_DEBUG, _("\tAllocating space for %d entries\n"), tranElements);
score->scores = xcalloc(tranElements, sizeof(score->scores));
/* Initialize score entry count */
/* If we did not find the entry then allocate space for it */
if (!found) {
/* XXX p->fi->te undefined. */
- rpmMessage(RPMMESS_DEBUG, _("\tAdding entry for %s to score board.\n"),
+ rpmlog(RPMMESS_DEBUG, _("\tAdding entry for %s to score board.\n"),
rpmteN(p));
se = xcalloc(1, sizeof(*(*(score->scores))));
- rpmMessage(RPMMESS_DEBUG, _("\t\tEntry address: %p\n"), se);
+ rpmlog(RPMMESS_DEBUG, _("\t\tEntry address: %p\n"), se);
se->N = xstrdup(rpmteN(p));
se->te_types = rpmteType(p);
se->installed = 0;
/* We found this one, so just add the element type to the one
* already there.
*/
- rpmMessage(RPMMESS_DEBUG, _("\tUpdating entry for %s in score board.\n"),
+ rpmlog(RPMMESS_DEBUG, _("\tUpdating entry for %s in score board.\n"),
rpmteN(p));
score->scores[i]->te_types |= rpmteType(p);
}
rpmtsScoreEntry se = NULL;
int i;
- rpmMessage(RPMMESS_DEBUG, _("May free Score board(%p)\n"), score);
+ rpmlog(RPMMESS_DEBUG, _("May free Score board(%p)\n"), score);
/* If score is not initialized, then just return.
* This is likely the case if autorollbacks are not enabled.
*/
if (score->nrefs > 0) return NULL;
- rpmMessage(RPMMESS_DEBUG, _("\tRefcount is zero...will free\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tRefcount is zero...will free\n"));
/* No more references, lets clean up */
/* First deallocate the score entries */
for(i = 0; i < score->entries; i++) {
rpmtsScoreEntry se;
rpmtsScoreEntry ret = NULL; /* Assume we don't find it */
- rpmMessage(RPMMESS_DEBUG, _("Looking in score board(%p) for %s\n"), score, N);
+ rpmlog(RPMMESS_DEBUG, _("Looking in score board(%p) for %s\n"), score, N);
/* Try to find the entry in the score list */
for(i = 0; i < score->entries; i++) {
se = score->scores[i];
if (strcmp(N, se->N) == 0) {
- rpmMessage(RPMMESS_DEBUG, _("\tFound entry at address: %p\n"), se);
+ rpmlog(RPMMESS_DEBUG, _("\tFound entry at address: %p\n"), se);
ret = se;
break;
}
} else if (fstat(fdno, &st) < 0)
return RPMRC_FAIL;
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Expected size: %12d = lead(%d)+sigs(%d)+pad(%d)+data(%d)\n"),
(int)sizeof(struct rpmlead)+siglen+pad+datalen,
(int)sizeof(struct rpmlead), siglen, pad, datalen);
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_(" Actual size: %12d\n"), (int)st.st_size);
return RPMRC_OK;
if (Fwrite(buf, sizeof(buf[0]), pad, fd) != pad)
rc = 1;
}
- rpmMessage(RPMMESS_DEBUG, _("Signature: size(%d)+pad(%d)\n"), sigSize, pad);
+ rpmlog(RPMMESS_DEBUG, _("Signature: size(%d)+pad(%d)\n"), sigSize, pad);
return rc;
}
}
*pktlenp = st.st_size;
- rpmMessage(RPMMESS_DEBUG, _("PGP sig size: %d\n"), *pktlenp);
+ rpmlog(RPMMESS_DEBUG, _("PGP sig size: %d\n"), *pktlenp);
*pktp = xmalloc(*pktlenp);
{ FD_t fd;
}
}
- rpmMessage(RPMMESS_DEBUG, _("Got %d bytes of PGP sig\n"), *pktlenp);
+ rpmlog(RPMMESS_DEBUG, _("Got %d bytes of PGP sig\n"), *pktlenp);
#ifdef NOTYET
/* Parse the signature, change signature tag as appropriate. */
}
*pktlenp = st.st_size;
- rpmMessage(RPMMESS_DEBUG, _("GPG sig size: %d\n"), *pktlenp);
+ rpmlog(RPMMESS_DEBUG, _("GPG sig size: %d\n"), *pktlenp);
*pktp = xmalloc(*pktlenp);
{ FD_t fd;
}
}
- rpmMessage(RPMMESS_DEBUG, _("Got %d bytes of GPG sig\n"), *pktlenp);
+ rpmlog(RPMMESS_DEBUG, _("Got %d bytes of GPG sig\n"), *pktlenp);
/* Parse the signature, change signature tag as appropriate. */
dig = pgpNewDig();
continue;
if (strncmp(fbn, bn, bnlen))
continue;
- rpmMessage(RPMMESS_DEBUG, _("excluding directory %s\n"), dn);
+ rpmlog(RPMMESS_DEBUG, _("excluding directory %s\n"), dn);
fi->actions[i] = FA_SKIPNSTATE;
break;
}
}
tsi = rpmtsiFree(tsi);
- rpmMessage(RPMMESS_NORMAL, _("Transaction failed...rolling back\n"));
- rpmMessage(RPMMESS_NORMAL,
+ rpmlog(RPMMESS_NORMAL, _("Transaction failed...rolling back\n"));
+ rpmlog(RPMMESS_NORMAL,
_("Rollback packages (+%d/-%d) to %-24.24s (0x%08x):\n"),
numAdded, numRemoved, ctime((time_t*) &tid), tid);
rc = rpmtsCheck(rollbackTransaction);
ps = rpmtsProblems(rollbackTransaction);
if (rc != 0 && rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
ps = rpmpsFree(ps);
return -1;
/* Order the transaction */
rc = rpmtsOrder(rollbackTransaction);
if (rc != 0) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("Could not order auto-rollback transaction!\n"));
return -1;
}
*/
tsi = rpmtsiInit(rollbackTransaction);
while((te = rpmtsiNext(tsi, 0)) != NULL) {
- rpmMessage(RPMMESS_NORMAL, _("Cleaning up repackaged packages:\n"));
+ rpmlog(RPMMESS_NORMAL, _("Cleaning up repackaged packages:\n"));
switch (rpmteType(te)) {
/* The install elements are repackaged packages */
case TR_ADDED:
/* Make sure the filename is still there. XXX: Can't happen */
if(te->key) {
- rpmMessage(RPMMESS_NORMAL, _("\tRemoving %s:\n"), te->key);
+ rpmlog(RPMMESS_NORMAL, _("\tRemoving %s:\n"), te->key);
(void) unlink(te->key); /* XXX: Should check for an error? */
}
break;
int rc = RPMRC_NOTFOUND; /* Assume we do not find it*/
int xx;
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Getting repackaged header from transaction element\n"));
/* Set header pointer to null if its not already */
xx = snprintf(rp, nb, "%s/%s%s.rpm", _repackage_dir, name, globStr);
/* Get the index of possible repackaged packages */
- rpmMessage(RPMMESS_DEBUG, _("\tLooking for %s...\n"), rp);
+ rpmlog(RPMMESS_DEBUG, _("\tLooking for %s...\n"), rp);
rtids = IDTXglob(ts, rp, RPMTAG_REMOVETID);
rp = _free(rp);
if (rtids != NULL) {
- rpmMessage(RPMMESS_DEBUG, _("\tMatches found.\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tMatches found.\n"));
rpIDT = rtids->idt;
nrids = rtids->nidt;
} else {
- rpmMessage(RPMMESS_DEBUG, _("\tNo matches found.\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tNo matches found.\n"));
goto exit;
}
* get out of here...the repackaged package was not found.
*/
if (rpIDT == NULL) {
- rpmMessage(RPMMESS_DEBUG, _("\tRepackaged package not found!.\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tRepackaged package not found!.\n"));
break;
}
* would be found.
* XXX: Should Match NAC!
*/
- rpmMessage(RPMMESS_DEBUG, _("\tREMOVETID matched INSTALLTID.\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tREMOVETID matched INSTALLTID.\n"));
if (headerGetEntry(rpIDT->h, RPMTAG_NAME, NULL, (void **) &rpname, NULL)) {
- rpmMessage(RPMMESS_DEBUG, _("\t\tName: %s.\n"), rpname);
+ rpmlog(RPMMESS_DEBUG, _("\t\tName: %s.\n"), rpname);
if (!strcmp(name,rpname)) {
/* It matched we have a canidate */
h = headerLink(rpIDT->h);
exit:
if (rc != RPMRC_NOTFOUND && h != NULL && hdrp != NULL) {
- rpmMessage(RPMMESS_DEBUG, _("\tRepackaged Package was %s...\n"), rp);
+ rpmlog(RPMMESS_DEBUG, _("\tRepackaged Package was %s...\n"), rp);
if (hdrp != NULL)
*hdrp = headerLink(h);
if (fnp != NULL)
case TR_ADDED:
{ rpmdbMatchIterator mi;
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Adding install element to auto-rollback transaction.\n"));
/* Get the header for this package from the database
db_instance = rpmteDBInstance(te);
if (db_instance == 0) {
/* Could not get the db instance: WTD! */
- rpmMessage(RPMMESS_FATALERROR,
+ rpmlog(RPMMESS_FATALERROR,
_("Could not get install element database instance!\n"));
break;
}
mi = rpmdbFreeIterator(mi);
if (h == NULL) {
/* Header was not there??? */
- rpmMessage(RPMMESS_FATALERROR,
+ rpmlog(RPMMESS_FATALERROR,
_("Could not get header for auto-rollback transaction!\n"));
break;
}
switch(rc) {
case RPMRC_OK:
/* Add the install element, as we had a repackaged package */
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("\tAdded repackaged package header: %s.\n"), rpn);
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("\tAdded from install element %s.\n"), rpmteNEVRA(te));
rc = rpmtsAddInstallElement(rollbackTransaction, headerLink(rph),
(fnpyKey) rpn, 1, te->relocs);
/* Add the header as an erase element, we did not
* have a repackaged package
*/
- rpmMessage(RPMMESS_DEBUG, _("\tAdded erase element.\n"));
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG, _("\tAdded erase element.\n"));
+ rpmlog(RPMMESS_DEBUG,
_("\tAdded from install element %s.\n"), rpmteNEVRA(te));
rc = rpmtsAddEraseElement(rollbackTransaction, h, db_instance);
break;
default:
/* Not sure what to do on failure...just give up */
- rpmMessage(RPMMESS_FATALERROR,
+ rpmlog(RPMMESS_FATALERROR,
_("Could not get repackaged header for auto-rollback transaction!\n"));
break;
}
} break;
case TR_REMOVED:
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Add erase element to auto-rollback transaction.\n"));
/* See if this element has already been added.
* If so we want to do nothing. Compare N's for match.
pi = rpmtsiInit(rollbackTransaction);
while ((p = rpmtsiNext(pi, 0)) != NULL) {
if (!strcmp(rpmteN(p), rpmteN(te))) {
- rpmMessage(RPMMESS_DEBUG, _("\tFound existing upgrade element.\n"));
- rpmMessage(RPMMESS_DEBUG, _("\tNot adding erase element for %s.\n"),
+ rpmlog(RPMMESS_DEBUG, _("\tFound existing upgrade element.\n"));
+ rpmlog(RPMMESS_DEBUG, _("\tNot adding erase element for %s.\n"),
rpmteN(te));
rc = RPMRC_OK;
pi = rpmtsiFree(pi);
switch(rc) {
case RPMRC_OK:
/* Add the install element */
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("\tAdded repackaged package %s.\n"), rpn);
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("\tAdded from erase element %s.\n"), rpmteNEVRA(te));
rc = rpmtsAddInstallElement(rollbackTransaction, rph,
(fnpyKey) rpn, 1, te->relocs);
if (rc != RPMRC_OK)
- rpmMessage(RPMMESS_FATALERROR,
+ rpmlog(RPMMESS_FATALERROR,
_("Could not add erase element to auto-rollback transaction.\n"));
break;
case RPMRC_NOTFOUND:
/* Just did not have a repackaged package */
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("\tNo repackaged package...nothing to do.\n"));
rc = RPMRC_OK;
break;
default:
- rpmMessage(RPMMESS_FATALERROR,
+ rpmlog(RPMMESS_FATALERROR,
_("Failure reading repackaged package!\n"));
break;
}
* - count files.
*/
-rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elements\n"), rpmtsNElements(ts));
+rpmlog(RPMMESS_DEBUG, _("sanity checking %d elements\n"), rpmtsNElements(ts));
ps = rpmtsProblems(ts);
/* The ordering doesn't matter here */
pi = rpmtsiInit(ts);
if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_TEST))
|| (rpmpsNumProblems(ts->probs) &&
(okProbs == NULL || rpmpsTrim(ts->probs, okProbs))))) {
- rpmMessage(RPMMESS_DEBUG, _("running pre-transaction scripts\n"));
+ rpmlog(RPMMESS_DEBUG, _("running pre-transaction scripts\n"));
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
if ((fi = rpmtsiFi(pi)) == NULL)
* calling fpLookupList only once. I'm not sure that the speedup is
* worth the trouble though.
*/
-rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount);
+rpmlog(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount);
numAdded = numRemoved = 0;
pi = rpmtsiInit(ts);
/* ===============================================
* Compute file disposition for each package in transaction set.
*/
-rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
+rpmlog(RPMMESS_DEBUG, _("computing file dispositions\n"));
ps = rpmtsProblems(ts);
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, 0)) != NULL) {
rpmVSFlags ovsflags;
rpmVSFlags vsflags;
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("Creating auto-rollback transaction\n"));
rollbackTransaction = rpmtsCreate();
pkgKey = rpmteAddedKey(p);
- rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s-%s 0x%x\n",
+ rpmlog(RPMMESS_DEBUG, "========== +++ %s %s-%s 0x%x\n",
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
p->h = NULL;
/* If we should rollback this transaction
on failure, lets do it. */
if (rollbackOnFailure) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("Add failed. Could not read package header.\n"));
/* Clean up the current transaction */
p->h = headerFree(p->h);
/* If we should rollback this transaction
on failure, lets do it. */
if (rollbackOnFailure) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("Add failed in rpmpsmStage().\n"));
/* Clean up the current transaction */
p->h = headerFree(p->h);
* on failure, lets do it.
*/
if (rollbackOnFailure) {
- rpmMessage(RPMMESS_ERROR, _("Add failed. Could not get file list.\n"));
+ rpmlog(RPMMESS_ERROR, _("Add failed. Could not get file list.\n"));
/* Clean up the current transaction */
p->h = headerFree(p->h);
xx = rpmdbSync(rpmtsGetRdb(ts));
case TR_REMOVED:
(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_ERASE), 0);
- rpmMessage(RPMMESS_DEBUG, "========== --- %s %s-%s 0x%x\n",
+ rpmlog(RPMMESS_DEBUG, "========== --- %s %s-%s 0x%x\n",
rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
/*
* on failure, lets do it.
*/
if (rollbackOnFailure) {
- rpmMessage(RPMMESS_ERROR,
+ rpmlog(RPMMESS_ERROR,
_("Erase failed failed in rpmpsmStage().\n"));
/* Clean up the current transaction */
xx = rpmdbSync(rpmtsGetRdb(ts));
rollbackTransaction = rpmtsFree(rollbackTransaction);
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)) {
- rpmMessage(RPMMESS_DEBUG, _("running post-transaction scripts\n"));
+ rpmlog(RPMMESS_DEBUG, _("running post-transaction scripts\n"));
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
int haspostscript;
if (te > t) {
*te++ = '\n';
*te = '\0';
- rpmMessage(RPMMESS_NORMAL, "%s", t);
+ rpmlog(RPMMESS_NORMAL, "%s", t);
te = t = buf;
*t = '\0';
}
if (te > t) {
*te++ = '\n';
*te = '\0';
- rpmMessage(RPMMESS_NORMAL, "%s", t);
+ rpmlog(RPMMESS_NORMAL, "%s", t);
te = t;
*t = '\0';
}
rc = cvtdberr(dbi, "dbenv->close", rc, _debug);
if (dbfile)
- rpmMessage(RPMMESS_DEBUG, _("closed db environment %s/%s\n"),
+ rpmlog(RPMMESS_DEBUG, _("closed db environment %s/%s\n"),
dbhome, dbfile);
if (rpmdb->db_remove_env) {
xx = cvtdberr(dbi, "dbenv->remove", xx, _debug);
if (dbfile)
- rpmMessage(RPMMESS_DEBUG, _("removed db environment %s/%s\n"),
+ rpmlog(RPMMESS_DEBUG, _("removed db environment %s/%s\n"),
dbhome, dbfile);
}
if (eflags & DB_JOINENV) eflags &= DB_JOINENV;
if (dbfile)
- rpmMessage(RPMMESS_DEBUG, _("opening db environment %s/%s %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening db environment %s/%s %s\n"),
dbhome, dbfile, prDbiOpenFlags(eflags, 1));
/* XXX Can't do RPC w/o host. */
rc = cvtdberr(dbi, "db->close", rc, _printit);
db = dbi->dbi_db = NULL;
- rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"),
+ rpmlog(RPMMESS_DEBUG, _("closed db index %s/%s\n"),
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)));
}
rc = db->verify(db, dbf, NULL, NULL, flags);
rc = cvtdberr(dbi, "db->verify", rc, _debug);
- rpmMessage(RPMMESS_DEBUG, _("verified db index %s/%s\n"),
+ rpmlog(RPMMESS_DEBUG, _("verified db index %s/%s\n"),
(dbhome ? dbhome : ""),
(dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)));
}
}
- rpmMessage(RPMMESS_DEBUG, _("opening db index %s/%s %s mode=0x%x\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening db index %s/%s %s mode=0x%x\n"),
dbhome, (dbfile ? dbfile : rpmTagGetName(dbi->dbi_rpmtag)),
prDbiOpenFlags(oflags, 0), dbi->dbi_mode);
? _("exclusive") : _("shared")),
dbhome, (dbfile ? dbfile : ""));
} else if (dbfile) {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("locked db index %s/%s\n"),
dbhome, dbfile);
}
*oe++ = '\0';
rpmtag = rpmTagGetValue(o);
if (rpmtag < 0) {
- rpmMessage(RPMMESS_WARNING,
+ rpmlog(RPMMESS_WARNING,
_("dbiTagsInit: unrecognized tag name: \"%s\" ignored\n"), o);
continue;
}
default:
_dbapi = _dbapi_wanted;
if (_dbapi < 0 || _dbapi >= 5 || mydbvecs[_dbapi] == NULL) {
- rpmMessage(RPMMESS_DEBUG, "dbiOpen: _dbiapi failed\n");
+ rpmlog(RPMMESS_DEBUG, "dbiOpen: _dbiapi failed\n");
return NULL;
}
errno = 0;
{
if (rpmdbCheckTerminate(0)) {
/* sigset_t is abstract type */
- rpmMessage(RPMMESS_DEBUG, "Exiting on signal(0x%lx) ...\n", *((unsigned long *)&rpmsqCaught));
+ rpmlog(RPMMESS_DEBUG, "Exiting on signal(0x%lx) ...\n", *((unsigned long *)&rpmsqCaught));
exit(EXIT_FAILURE);
}
return 0;
rpmrc = (*mi->mi_hdrchk) (mi->mi_ts, data->data, data->size, &msg);
lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMMESS_DEBUG);
- rpmMessage(lvl, "%s h#%8u %s",
+ rpmlog(lvl, "%s h#%8u %s",
(rpmrc == RPMRC_FAIL ? _("miFreeHeader: skipping") : "write"),
mi->mi_prevoffset, (msg ? msg : "\n"));
msg = _free(msg);
rpmrc = (*mi->mi_hdrchk) (mi->mi_ts, uh, uhlen, &msg);
lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMMESS_DEBUG);
- rpmMessage(lvl, "%s h#%8u %s",
+ rpmlog(lvl, "%s h#%8u %s",
(rpmrc == RPMRC_FAIL ? _("rpmdbNextIterator: skipping") : " read"),
mi->mi_offset, (msg ? msg : "\n"));
msg = _free(msg);
{ const char *n, *v, *r;
(void) headerNVR(h, &n, &v, &r);
- rpmMessage(RPMMESS_DEBUG, " --- h#%8u %s-%s-%s\n", hdrNum, n, v, r);
+ rpmlog(RPMMESS_DEBUG, " --- h#%8u %s-%s-%s\n", hdrNum, n, v, r);
}
(void) blockSignals(db, &signalMask);
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("removing \"%s\" from %s index.\n"),
(char *)key->data, rpmTagGetName(dbi->dbi_rpmtag));
} else {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("removing %d entries from %s index.\n"),
rpmcnt, rpmTagGetName(dbi->dbi_rpmtag));
}
rpmrc = (*hdrchk) (ts, data->data, data->size, &msg);
lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMMESS_DEBUG);
- rpmMessage(lvl, "%s h#%8u %s",
+ rpmlog(lvl, "%s h#%8u %s",
(rpmrc == RPMRC_FAIL ? _("rpmdbAdd: skipping") : " +++"),
hdrNum, (msg ? msg : "\n"));
msg = _free(msg);
if (!printed) {
if (rpmcnt == 1 && stringvalued) {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("adding \"%s\" to %s index.\n"),
(char *)key->data, rpmTagGetName(dbi->dbi_rpmtag));
} else {
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("adding %d entries to %s index.\n"),
rpmcnt, rpmTagGetName(dbi->dbi_rpmtag));
}
const char * mdb1 = "/etc/rpm/macros.db1";
struct stat st;
if (!stat(mdb1, &st) && S_ISREG(st.st_mode) && !unlink(mdb1))
- rpmMessage(RPMMESS_DEBUG,
+ rpmlog(RPMMESS_DEBUG,
_("removing %s after successful db3 rebuild.\n"), mdb1);
}
#endif
tfn = rpmGetPath("%{?_dbpath}", NULL);
if (!(tfn && tfn[0] != '\0'))
{
- rpmMessage(RPMMESS_DEBUG, _("no dbpath has been set"));
+ rpmlog(RPMMESS_DEBUG, _("no dbpath has been set"));
rc = 1;
goto exit;
}
newdbpath += strlen(prefix) - 1;
tfn = _free(tfn);
- rpmMessage(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("rebuilding database %s into %s\n"),
rootdbpath, newrootdbpath);
if (!access(newrootdbpath, F_OK)) {
goto exit;
}
- rpmMessage(RPMMESS_DEBUG, _("creating directory %s\n"), newrootdbpath);
+ rpmlog(RPMMESS_DEBUG, _("creating directory %s\n"), newrootdbpath);
if (Mkdir(newrootdbpath, 0755)) {
rpmlog(RPMERR_MKDIR, _("creating directory %s: %s\n"),
newrootdbpath, strerror(errno));
_rebuildinprogress = 0;
- rpmMessage(RPMMESS_DEBUG, _("opening old database with dbapi %d\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening old database with dbapi %d\n"),
_dbapi);
if (openDatabase(prefix, dbpath, _dbapi, &olddb, O_RDONLY, 0644,
RPMDB_FLAG_MINIMAL)) {
}
_dbapi = olddb->db_api;
_rebuildinprogress = 1;
- rpmMessage(RPMMESS_DEBUG, _("opening new database with dbapi %d\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening new database with dbapi %d\n"),
_dbapi_rebuild);
(void) rpmDefineMacro(NULL, "_rpmdb_rebuild %{nil}", -1);
if (openDatabase(prefix, newdbpath, _dbapi_rebuild, &newdb, O_RDWR | O_CREAT, 0644, 0)) {
xx = rpmdbClose(newdb);
if (failed) {
- rpmMessage(RPMMESS_NORMAL, _("failed to rebuild database: original database "
+ rpmlog(RPMMESS_NORMAL, _("failed to rebuild database: original database "
"remains in place\n"));
xx = rpmdbRemoveDatabase(prefix, newdbpath, _dbapi_rebuild);
goto exit;
} else if (!nocleanup) {
if (rpmdbMoveDatabase(prefix, newdbpath, _dbapi_rebuild, dbpath, _dbapi)) {
- rpmMessage(RPMMESS_ERROR, _("failed to replace old database with new "
+ rpmlog(RPMMESS_ERROR, _("failed to replace old database with new "
"database!\n"));
- rpmMessage(RPMMESS_ERROR, _("replace files in %s with files from %s "
+ rpmlog(RPMMESS_ERROR, _("replace files in %s with files from %s "
"to recover"), dbpath, newdbpath);
rc = 1;
goto exit;
exit:
if (removedir && !(rc == 0 && nocleanup)) {
- rpmMessage(RPMMESS_DEBUG, _("removing directory %s\n"), newrootdbpath);
+ rpmlog(RPMMESS_DEBUG, _("removing directory %s\n"), newrootdbpath);
if (Rmdir(newrootdbpath))
- rpmMessage(RPMMESS_ERROR, _("failed to remove directory %s: %s\n"),
+ rpmlog(RPMMESS_ERROR, _("failed to remove directory %s: %s\n"),
newrootdbpath, strerror(errno));
}
newrootdbpath = _free(newrootdbpath);
}
if (scp->pStmt) {
xx = sqlite3_reset(scp->pStmt);
- if (xx) rpmMessage(RPMMESS_WARNING, "reset %d\n", xx);
+ if (xx) rpmlog(RPMMESS_WARNING, "reset %d\n", xx);
xx = sqlite3_finalize(scp->pStmt);
- if (xx) rpmMessage(RPMMESS_WARNING, "finalize %d\n", xx);
+ if (xx) rpmlog(RPMMESS_WARNING, "finalize %d\n", xx);
scp->pStmt = NULL;
}
{
dbiIndex dbi = (dbiIndex) dbi_void;
- rpmMessage(RPMMESS_WARNING, _("Unable to get lock on db %s, retrying... (%d)\n"),
+ rpmlog(RPMMESS_WARNING, _("Unable to get lock on db %s, retrying... (%d)\n"),
dbi->dbi_file, time);
(void) sleep(1);
exit:
if (rc)
- rpmMessage(RPMMESS_WARNING, "Unable to initDB %s (%d)\n",
+ rpmlog(RPMMESS_WARNING, "Unable to initDB %s (%d)\n",
scp->pzErrmsg, rc);
scp = scpFree(scp);
(void) sqlite3_close(sqldb->db);
- rpmMessage(RPMMESS_DEBUG, _("closed sql db %s\n"),
+ rpmlog(RPMMESS_DEBUG, _("closed sql db %s\n"),
dbi->dbi_subfile);
dbi->dbi_stats = _free(dbi->dbi_stats);
dbfname = rpmGenPath(dbhome, dbi->dbi_file, NULL);
- rpmMessage(RPMMESS_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
+ rpmlog(RPMMESS_DEBUG, _("opening sql db %s (%s) mode=0x%x\n"),
dbfname, dbi->dbi_subfile, dbi->dbi_mode);
/* Open the Database */
dbi->dbi_db = (DB *)sqldb;
if (sql_errcode != NULL) {
- rpmMessage(RPMMESS_DEBUG, "Unable to open database: %s\n", sql_errcode);
+ rpmlog(RPMMESS_DEBUG, "Unable to open database: %s\n", sql_errcode);
rc = EINVAL;
}
dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) bind key %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) bind key %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_data(dbi, scp, 2, data);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) bind data %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cdel(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpFree(scp);
break;
}
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sequential prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sequential sql_step rc %d\n", dbi->dbi_subfile, rc);
scp = scpResetKeys(scp);
scp->nkeys = scp->nr;
scp->cmd = sqlite3_mprintf("SELECT value FROM '%q' WHERE key=?;", dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) prepare %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
}
scp = scpResetAv(scp); /* Free av and avlen, reset counters.*/
/* Bind key to prepared statement */
rc = sql_bind_key(dbi, scp, 1, scp->keys[scp->rx]);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cget(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
rc = sqlite3_reset(scp->pStmt);
- if (rc) rpmMessage(RPMMESS_WARNING, "reset %d\n", rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "reset %d\n", rc);
/* 1 key should return 0 or 1 row/value */
assert(scp->nr < 2);
scp->cmd = sqlite3_mprintf("INSERT OR REPLACE INTO '%q' VALUES(?, ?);",
dbi->dbi_subfile);
rc = sqlite3_prepare(sqldb->db, scp->cmd, strlen(scp->cmd), &scp->pStmt, &scp->pzErrmsg);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) prepare %s (%d)\n",dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_key(dbi, scp, 1, key);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) key bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_bind_data(dbi, scp, 2, data);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) data bind %s (%d)\n", dbi->dbi_subfile, sqlite3_errmsg(sqldb->db), rc);
rc = sql_step(dbi, scp);
- if (rc) rpmMessage(RPMMESS_WARNING, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
+ if (rc) rpmlog(RPMMESS_WARNING, "cput(%s) sql_step rc %d\n", dbi->dbi_subfile, rc);
break;
}
} else {
if ( sql_rc ) {
- rpmMessage(RPMMESS_DEBUG, "db_info failed %s (%d)\n",
+ rpmlog(RPMMESS_DEBUG, "db_info failed %s (%d)\n",
scp->pzErrmsg, sql_rc);
}
- rpmMessage(RPMMESS_WARNING, "Unable to determine DB endian.\n");
+ rpmlog(RPMMESS_WARNING, "Unable to determine DB endian.\n");
}
scp = scpFree(scp);
assert(scp->av != NULL);
nkeys = strtol(scp->av[1], NULL, 10);
- rpmMessage(RPMMESS_DEBUG, " stat on %s nkeys %ld\n",
+ rpmlog(RPMMESS_DEBUG, " stat on %s nkeys %ld\n",
dbi->dbi_subfile, nkeys);
} else {
if ( rc ) {
- rpmMessage(RPMMESS_DEBUG, "stat failed %s (%d)\n",
+ rpmlog(RPMMESS_DEBUG, "stat failed %s (%d)\n",
scp->pzErrmsg, rc);
}
}
}
rc = 0;
if (created)
- rpmMessage(RPMMESS_DEBUG, "created directory(s) %s mode 0%o\n",
+ rpmlog(RPMMESS_DEBUG, "created directory(s) %s mode 0%o\n",
path, mode);
return rc;
}
char *end;
u->port = strtol(u->portstr, &end, 0);
if (!(end && *end == '\0')) {
- rpmMessage(RPMMESS_ERROR, _("url port must be a number\n"));
+ rpmlog(RPMMESS_ERROR, _("url port must be a number\n"));
myurl = _free(myurl);
u = urlFree(u);
return -1;
sfd = Fopen(url, "r.ufdio");
if (sfd == NULL || Ferror(sfd)) {
- rpmMessage(RPMMESS_DEBUG, _("failed to open %s: %s\n"), url, Fstrerror(sfd));
+ rpmlog(RPMMESS_DEBUG, _("failed to open %s: %s\n"), url, Fstrerror(sfd));
rc = FTPERR_UNKNOWN;
goto exit;
}
fprintf(stderr, "*** urlGetFile sfd %p %s tfd %p %s\n", sfd, url, (tfd ? tfd : NULL), dest);
if (tfd == NULL || Ferror(tfd)) {
/* XXX Fstrerror */
- rpmMessage(RPMMESS_DEBUG, _("failed to create %s: %s\n"), dest, Fstrerror(tfd));
+ rpmlog(RPMMESS_DEBUG, _("failed to create %s: %s\n"), dest, Fstrerror(tfd));
rc = FTPERR_UNKNOWN;
goto exit;
}
int ec = -1; /* assume not found */
int i = 0;
- rpmMessage(RPMMESS_DEBUG, "============== %s\n", fts->fts_accpath);
+ rpmlog(RPMMESS_DEBUG, "============== %s\n", fts->fts_accpath);
/* Read header from file. */
{ FD_t fd = Fopen(fts->fts_accpath, "r");
bhglobs[i].patterns[0] = pattern;
bhglobs[i].fnflags = (FNM_PATHNAME | FNM_PERIOD | FNM_EXTMATCH);
if (bhglobs[i].patterns[0] != NULL)
- rpmMessage(RPMMESS_DEBUG, "\t%d \"%s\"\n",
+ rpmlog(RPMMESS_DEBUG, "\t%d \"%s\"\n",
i, bhglobs[i].patterns[0]);
}
}
switch (rpmrc) {
case RPMRC_FAIL:
default:
- rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp);
+ rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp);
numFailed++; *fnp = NULL;
break;
case RPMRC_OK:
}
ps = rpmtsProblems(ts);
if (rpmpsNumProblems(ps) > 0) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
numFailed += numPkgs;
if (ts->suggests != NULL && ts->nsuggests > 0) {
- rpmMessage(RPMMESS_NORMAL, _(" Suggested resolutions:\n"));
+ rpmlog(RPMMESS_NORMAL, _(" Suggested resolutions:\n"));
for (i = 0; i < ts->nsuggests; i++) {
const char * str = ts->suggests[i];
if (str == NULL)
break;
- rpmMessage(RPMMESS_NORMAL, "\t%s\n", str);
+ rpmlog(RPMMESS_NORMAL, "\t%s\n", str);
ts->suggests[i] = NULL;
str = _free(str);
}
rc = rpmtsOpenDB(ts, O_RDONLY);
if (rc) {
- rpmMessage(RPMMESS_ERROR, _("cannot open Packages database\n"));
+ rpmlog(RPMMESS_ERROR, _("cannot open Packages database\n"));
rc = -1;
goto exit;
}
rc = rpmdbOpen(rootdir, &avdb, O_RDONLY, 0644);
delMacro(NULL, "_dbpath");
if (rc) {
- rpmMessage(RPMMESS_ERROR, _("cannot open Available database\n"));
+ rpmlog(RPMMESS_ERROR, _("cannot open Available database\n"));
goto endavail;
}
mi = rpmdbInitIterator(avdb, RPMDBI_PACKAGES, NULL, 0);
}
if (rc != RPMRC_NOTFOUND) {
- rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp);
+ rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp);
numFailed++; *fnp = NULL;
break;
}
ps = rpmtsProblems(ts);
if (ps) {
- rpmMessage(RPMMESS_ERROR, _("Failed dependencies:\n"));
+ rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n"));
rpmpsPrint(NULL, ps);
ps = rpmpsFree(ps);
rc = -1;