summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-11-19 16:25:24 +0200
committerPanu Matilainen <pmatilai@redhat.com>2007-11-19 16:25:24 +0200
commit43c5de66fb90cbc59dc23eb0774d66c66d34b37d (patch)
tree1e43219542c3ce060b4ce3c430a38aed45a62767 /lib
parentdb4e34966ed9d52a920ab1b135309e6e21f12473 (diff)
downloadlibrpm-tizen-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.tar.gz
librpm-tizen-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.tar.bz2
librpm-tizen-43c5de66fb90cbc59dc23eb0774d66c66d34b37d.zip
Replace all RPMERR_* etc uses with corresponding RPMLOG_* levels
Diffstat (limited to 'lib')
-rw-r--r--lib/fs.c14
-rw-r--r--lib/fsm.c6
-rw-r--r--lib/idtx.c2
-rw-r--r--lib/misc.c10
-rw-r--r--lib/package.c12
-rw-r--r--lib/psm.c24
-rw-r--r--lib/query.c40
-rw-r--r--lib/rpmchecksig.c56
-rw-r--r--lib/rpmgi.c4
-rw-r--r--lib/rpminstall.c10
-rw-r--r--lib/rpmlead.c2
-rw-r--r--lib/rpmrc.c46
-rw-r--r--lib/rpmts.c10
-rw-r--r--lib/signature.c36
14 files changed, 136 insertions, 136 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 604fdce61..59ed57859 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -63,7 +63,7 @@ static int getFilesystemList(void)
num = mntctl(MCTL_QUERY, sizeof(size), (char *) &size);
if (num < 0) {
- rpmlog(RPMERR_MTAB, _("mntctl() failed to return size: %s\n"),
+ rpmlog(RPMLOG_ERR, _("mntctl() failed to return size: %s\n"),
strerror(errno));
return 1;
}
@@ -78,7 +78,7 @@ static int getFilesystemList(void)
buf = alloca(size);
num = mntctl(MCTL_QUERY, size, buf);
if ( num <= 0 ) {
- rpmlog(RPMERR_MTAB, _("mntctl() failed to return mount points: %s\n"),
+ rpmlog(RPMLOG_ERR, _("mntctl() failed to return mount points: %s\n"),
strerror(errno));
return 1;
}
@@ -103,7 +103,7 @@ static int getFilesystemList(void)
case ESTALE:
continue;
default:
- rpmlog(RPMERR_STAT, _("failed to stat %s: %s\n"), fsnames[i],
+ rpmlog(RPMLOG_ERR, _("failed to stat %s: %s\n"), fsnames[i],
strerror(errno));
rpmFreeFilesystems();
@@ -145,7 +145,7 @@ static int getFilesystemList(void)
mtab = fopen(MOUNTED, "r");
if (!mtab) {
- rpmlog(RPMERR_MTAB, _("failed to open %s: %s\n"), MOUNTED,
+ rpmlog(RPMLOG_ERR, _("failed to open %s: %s\n"), MOUNTED,
strerror(errno));
return 1;
}
@@ -195,7 +195,7 @@ static int getFilesystemList(void)
# endif
if (stat(mntdir, &sb)) {
- rpmlog(RPMERR_STAT, _("failed to stat %s: %s\n"), mntdir,
+ rpmlog(RPMLOG_ERR, _("failed to stat %s: %s\n"), mntdir,
strerror(errno));
rpmFreeFilesystems();
@@ -306,7 +306,7 @@ int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, int numFile
chptr = dirName + strlen(dirName) - 1;
while (stat(dirName, &sb)) {
if (errno != ENOENT) {
- rpmlog(RPMERR_STAT, _("failed to stat %s: %s\n"), buf,
+ rpmlog(RPMLOG_ERR, _("failed to stat %s: %s\n"), buf,
strerror(errno));
sourceDir = _free(sourceDir);
usages = _free(usages);
@@ -328,7 +328,7 @@ int rpmGetFilesystemUsage(const char ** fileList, int32_t * fssizes, int numFile
break;
if (j == numFilesystems) {
- rpmlog(RPMERR_BADDEV,
+ rpmlog(RPMLOG_ERR,
_("file %s is on an unknown device\n"), buf);
sourceDir = _free(sourceDir);
usages = _free(usages);
diff --git a/lib/fsm.c b/lib/fsm.c
index 1e62586ca..20c7b5f58 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -1740,13 +1740,13 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
/* XXX common error message. */
rpmlog(
- (strict_erasures ? RPMERR_RMDIR : RPMDEBUG_RMDIR),
+ (strict_erasures ? RPMLOG_ERR : RPMLOG_DEBUG),
_("%s rmdir of %s failed: Directory not empty\n"),
rpmfiTypeString(fi), fsm->path);
break;
default:
rpmlog(
- (strict_erasures ? RPMERR_RMDIR : RPMDEBUG_RMDIR),
+ (strict_erasures ? RPMLOG_ERR : RPMLOG_DEBUG),
_("%s rmdir of %s failed: %s\n"),
rpmfiTypeString(fi), fsm->path, strerror(errno));
break;
@@ -1760,7 +1760,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
break;
default:
rpmlog(
- (strict_erasures ? RPMERR_UNLINK : RPMDEBUG_UNLINK),
+ (strict_erasures ? RPMLOG_ERR : RPMLOG_DEBUG),
_("%s unlink of %s failed: %s\n"),
rpmfiTypeString(fi), fsm->path, strerror(errno));
break;
diff --git a/lib/idtx.c b/lib/idtx.c
index 6559ec0b7..8d2aca4c3 100644
--- a/lib/idtx.c
+++ b/lib/idtx.c
@@ -131,7 +131,7 @@ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag)
fd = Fopen(av[i], "r.ufdio");
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), av[i],
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), av[i],
Fstrerror(fd));
if (fd != NULL) (void) Fclose(fd);
continue;
diff --git a/lib/misc.c b/lib/misc.c
index 8a59a56f1..1a01f252e 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -36,12 +36,12 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname)
break;
}
if (rc < 0) {
- rpmlog(RPMERR_CREATE, _("cannot create %%%s %s\n"), dname, dpath);
+ rpmlog(RPMLOG_ERR, _("cannot create %%%s %s\n"), dname, dpath);
return RPMRC_FAIL;
}
}
if ((rc = Access(dpath, W_OK))) {
- rpmlog(RPMERR_CREATE, _("cannot write to %%%s %s\n"), dname, dpath);
+ rpmlog(RPMLOG_ERR, _("cannot write to %%%s %s\n"), dname, dpath);
return RPMRC_FAIL;
}
return RPMRC_OK;
@@ -177,18 +177,18 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
case URL_IS_UNKNOWN:
{ struct stat sb, sb2;
if (!stat(tfn, &sb) && S_ISLNK(sb.st_mode)) {
- rpmlog(RPMERR_SCRIPT, _("error creating temporary file %s\n"), tfn);
+ rpmlog(RPMLOG_ERR, _("error creating temporary file %s\n"), tfn);
goto errxit;
}
if (sb.st_nlink != 1) {
- rpmlog(RPMERR_SCRIPT, _("error creating temporary file %s\n"), tfn);
+ rpmlog(RPMLOG_ERR, _("error creating temporary file %s\n"), tfn);
goto errxit;
}
if (fstat(Fileno(fd), &sb2) == 0) {
if (sb2.st_ino != sb.st_ino || sb2.st_dev != sb.st_dev) {
- rpmlog(RPMERR_SCRIPT, _("error creating temporary file %s\n"), tfn);
+ rpmlog(RPMLOG_ERR, _("error creating temporary file %s\n"), tfn);
goto errxit;
}
}
diff --git a/lib/package.c b/lib/package.c
index fa585ec18..1a179a068 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -700,7 +700,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
switch (l->major) {
case 1:
- rpmlog(RPMERR_NEWPACKAGE,
+ rpmlog(RPMLOG_ERR,
_("packaging version 1 is not supported by this version of RPM\n"));
rc = RPMRC_NOTFOUND;
goto exit;
@@ -710,7 +710,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
case 4:
break;
default:
- rpmlog(RPMERR_NEWPACKAGE, _("only packaging with major numbers <= 4 "
+ rpmlog(RPMLOG_ERR, _("only packaging with major numbers <= 4 "
"is supported by this version of RPM\n"));
rc = RPMRC_NOTFOUND;
goto exit;
@@ -722,14 +722,14 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
rc = rpmReadSignature(fd, &sigh, l->signature_type, &msg);
switch (rc) {
default:
- rpmlog(RPMERR_SIGGEN, _("%s: rpmReadSignature failed: %s"), fn,
+ rpmlog(RPMLOG_ERR, _("%s: rpmReadSignature failed: %s"), fn,
(msg && *msg ? msg : "\n"));
msg = _free(msg);
goto exit;
break;
case RPMRC_OK:
if (sigh == NULL) {
- rpmlog(RPMERR_SIGGEN, _("%s: No signature available\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: No signature available\n"), fn);
rc = RPMRC_FAIL;
goto exit;
}
@@ -794,7 +794,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
(void) rpmswExit(rpmtsOp(ts, opx), nb);
if (rc != RPMRC_OK || h == NULL) {
- rpmlog(RPMERR_FREAD, _("%s: headerRead failed: %s"), fn,
+ rpmlog(RPMLOG_ERR, _("%s: headerRead failed: %s"), fn,
(msg && *msg ? msg : "\n"));
msg = _free(msg);
goto exit;
@@ -900,7 +900,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
rpmtsOp(ts, RPMTS_OP_DIGEST)->count--; /* XXX one too many */
dig->nbytes += nb; /* XXX include size of header blob. */
if (count < 0) {
- rpmlog(RPMERR_FREAD, _("%s: Fread failed: %s\n"),
+ rpmlog(RPMLOG_ERR, _("%s: Fread failed: %s\n"),
fn, Fstrerror(fd));
rc = RPMRC_FAIL;
goto exit;
diff --git a/lib/psm.c b/lib/psm.c
index b4412da22..91fdcb8b9 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -247,7 +247,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
isSource = headerIsEntry(h, RPMTAG_SOURCEPACKAGE);
if (!isSource) {
- rpmlog(RPMERR_NOTSRPM, _("source package expected, binary found\n"));
+ rpmlog(RPMLOG_ERR, _("source package expected, binary found\n"));
rpmrc = RPMRC_FAIL;
goto exit;
}
@@ -358,7 +358,7 @@ fi->fmd5s = hfd(fi->fmd5s, -1);
(void) stpcpy( stpcpy( stpcpy(t, _specdir), "/"), fi->bnl[i]);
specFile = t;
} else {
- rpmlog(RPMERR_NOSPEC, _("source package contains no .spec file\n"));
+ rpmlog(RPMLOG_ERR, _("source package contains no .spec file\n"));
rpmrc = RPMRC_FAIL;
goto exit;
}
@@ -823,7 +823,7 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
}
if (psm->sq.child == (pid_t)-1) {
- rpmlog(RPMERR_FORK, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
+ rpmlog(RPMLOG_ERR, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
rc = RPMRC_FAIL;
goto exit;
}
@@ -833,18 +833,18 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
/* XXX filter order dependent multilib "other" arch helper error. */
if (!(psm->sq.reaped >= 0 && !strcmp(argv[0], "/usr/sbin/glibc_post_upgrade") && WEXITSTATUS(psm->sq.status) == 110)) {
if (psm->sq.reaped < 0) {
- rpmlog(RPMERR_SCRIPT,
+ rpmlog(RPMLOG_ERR,
_("%s(%s-%s-%s.%s) scriptlet failed, waitpid(%d) rc %d: %s\n"),
sln, n, v, r, a, psm->sq.child, psm->sq.reaped, strerror(errno));
rc = RPMRC_FAIL;
} else
if (!WIFEXITED(psm->sq.status) || WEXITSTATUS(psm->sq.status)) {
if (WIFSIGNALED(psm->sq.status)) {
- rpmlog(RPMERR_SCRIPT,
+ rpmlog(RPMLOG_ERR,
_("%s(%s-%s-%s.%s) scriptlet failed, signal %d\n"),
sln, n, v, r, a, WTERMSIG(psm->sq.status));
} else {
- rpmlog(RPMERR_SCRIPT,
+ rpmlog(RPMLOG_ERR,
_("%s(%s-%s-%s.%s) scriptlet failed, exit status %d\n"),
sln, n, v, r, a, WEXITSTATUS(psm->sq.status));
}
@@ -1415,7 +1415,7 @@ assert(psm->mi == NULL);
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPRE)) {
rc = rpmpsmNext(psm, PSM_SCRIPT);
if (rc != RPMRC_OK) {
- rpmlog(RPMERR_SCRIPT,
+ rpmlog(RPMLOG_ERR,
_("%s: %s scriptlet failed (%d), skipping %s\n"),
psm->stepName, tag2sln(psm->scriptTag), rc,
rpmteNEVR(psm->te));
@@ -1510,7 +1510,7 @@ assert(psm->mi == NULL);
rc = writeLead(psm->fd, &lead);
if (rc != RPMRC_OK) {
- rpmlog(RPMERR_NOSPACE, _("Unable to write package: %s\n"),
+ rpmlog(RPMLOG_ERR, _("Unable to write package: %s\n"),
Fstrerror(psm->fd));
break;
}
@@ -1522,7 +1522,7 @@ assert(psm->mi == NULL);
/* Reallocate the signature into one contiguous region. */
sigh = headerReload(sigh, RPMTAG_HEADERSIGNATURES);
if (sigh == NULL) {
- rpmlog(RPMERR_NOSPACE, _("Unable to reload signature header\n"));
+ rpmlog(RPMLOG_ERR, _("Unable to reload signature header\n"));
rc = RPMRC_FAIL;
break;
}
@@ -1596,7 +1596,7 @@ assert(psm->mi == NULL);
xx = rpmpsmNext(psm, PSM_NOTIFY);
if (rc) {
- rpmlog(RPMERR_CPIO,
+ rpmlog(RPMLOG_ERR,
_("unpacking of archive failed%s%s: %s\n"),
(psm->failedFile != NULL ? _(" on file ") : ""),
(psm->failedFile != NULL ? psm->failedFile : ""),
@@ -1778,11 +1778,11 @@ assert(psm->mi == NULL);
if (rc) {
if (psm->failedFile)
- rpmlog(RPMERR_CPIO,
+ rpmlog(RPMLOG_ERR,
_("%s failed on file %s: %s\n"),
psm->stepName, psm->failedFile, cpioStrerror(rc));
else
- rpmlog(RPMERR_CPIO, _("%s failed: %s\n"),
+ rpmlog(RPMLOG_ERR, _("%s failed: %s\n"),
psm->stepName, cpioStrerror(rc));
/* XXX notify callback on error. */
diff --git a/lib/query.c b/lib/query.c
index 83d77f961..457f61376 100644
--- a/lib/query.c
+++ b/lib/query.c
@@ -111,7 +111,7 @@ static inline const char * queryHeader(Header h, const char * qfmt)
str = headerSprintf(h, qfmt, rpmTagTable, rpmHeaderFormats, &errstr);
if (str == NULL)
- rpmlog(RPMERR_QFMT, _("incorrect format: %s\n"), errstr);
+ rpmlog(RPMLOG_ERR, _("incorrect format: %s\n"), errstr);
return str;
}
@@ -274,7 +274,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
sprintf(te, "%s %s", fuser, fgroup);
te += strlen(te);
} else {
- rpmlog(RPMERR_INTERNAL,
+ rpmlog(RPMLOG_ERR,
_("package has not file owner/group lists\n"));
}
@@ -303,7 +303,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
fuser, fgroup, flink);
te += strlen(te);
} else {
- rpmlog(RPMERR_INTERNAL,
+ rpmlog(RPMLOG_ERR,
_("package has neither file owner or id lists\n"));
}
}
@@ -453,7 +453,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
case RPMQV_GROUP:
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_GROUP, arg, 0);
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO,
+ rpmlog(RPMLOG_NOTICE,
_("group %s does not contain any packages\n"), arg);
res = 1;
} else
@@ -463,7 +463,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
case RPMQV_TRIGGEREDBY:
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_TRIGGERNAME, arg, 0);
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package triggers %s\n"), arg);
+ rpmlog(RPMLOG_NOTICE, _("no package triggers %s\n"), arg);
res = 1;
} else
res = rpmcliShowMatches(qva, ts);
@@ -476,7 +476,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
for (i = 0, s = arg; *s && isxdigit(*s); s++, i++)
{};
if (i != 32) {
- rpmlog(RPMERR_QUERYINFO, _("malformed %s: %s\n"), "pkgid", arg);
+ rpmlog(RPMLOG_NOTICE, _("malformed %s: %s\n"), "pkgid", arg);
return 1;
}
@@ -486,7 +486,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_SIGMD5, MD5, sizeof(MD5));
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package matches %s: %s\n"),
+ rpmlog(RPMLOG_NOTICE, _("no package matches %s: %s\n"),
"pkgid", arg);
res = 1;
} else
@@ -497,13 +497,13 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
for (i = 0, s = arg; *s && isxdigit(*s); s++, i++)
{};
if (i != 40) {
- rpmlog(RPMERR_QUERYINFO, _("malformed %s: %s\n"), "hdrid", arg);
+ rpmlog(RPMLOG_NOTICE, _("malformed %s: %s\n"), "hdrid", arg);
return 1;
}
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_SHA1HEADER, arg, 0);
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package matches %s: %s\n"),
+ rpmlog(RPMLOG_NOTICE, _("no package matches %s: %s\n"),
"hdrid", arg);
res = 1;
} else
@@ -517,7 +517,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
for (i = 0, s = arg; *s && isxdigit(*s); s++, i++)
{};
if (i != 32) {
- rpmlog(RPMERR_QUERY, _("malformed %s: %s\n"), "fileid", arg);
+ rpmlog(RPMLOG_ERR, _("malformed %s: %s\n"), "fileid", arg);
return 1;
}
@@ -527,7 +527,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_FILEMD5S, MD5, sizeof(MD5));
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package matches %s: %s\n"),
+ rpmlog(RPMLOG_NOTICE, _("no package matches %s: %s\n"),
"fileid", arg);
res = 1;
} else
@@ -551,12 +551,12 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
}
iid = strtoul(myarg, &end, mybase);
if ((*end) || (end == arg) || (iid == ULONG_MAX)) {
- rpmlog(RPMERR_QUERY, _("malformed %s: %s\n"), "tid", arg);
+ rpmlog(RPMLOG_ERR, _("malformed %s: %s\n"), "tid", arg);
return 1;
}
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_INSTALLTID, &iid, sizeof(iid));
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package matches %s: %s\n"),
+ rpmlog(RPMLOG_NOTICE, _("no package matches %s: %s\n"),
"tid", arg);
res = 1;
} else
@@ -566,7 +566,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
case RPMQV_WHATREQUIRES:
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_REQUIRENAME, arg, 0);
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package requires %s\n"), arg);
+ rpmlog(RPMLOG_NOTICE, _("no package requires %s\n"), arg);
res = 1;
} else
res = rpmcliShowMatches(qva, ts);
@@ -577,7 +577,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
provides_checked = 1;
qva->qva_mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, arg, 0);
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO, _("no package provides %s\n"), arg);
+ rpmlog(RPMLOG_NOTICE, _("no package provides %s\n"), arg);
res = 1;
} else
res = rpmcliShowMatches(qva, ts);
@@ -615,10 +615,10 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
}
if (myerrno != 0) {
- rpmlog(RPMERR_QUERY, _("file %s: %s\n"), fn, strerror(myerrno));
+ rpmlog(RPMLOG_ERR, _("file %s: %s\n"), fn, strerror(myerrno));
res = 1;
} else if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO,
+ rpmlog(RPMLOG_NOTICE,
_("file %s is not owned by any package\n"), fn);
res = 1;
} else
@@ -644,14 +644,14 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
}
recOffset = strtoul(myarg, &end, mybase);
if ((*end) || (end == arg) || (recOffset == ULONG_MAX)) {
- rpmlog(RPMERR_QUERYINFO, _("invalid package number: %s\n"), arg);
+ rpmlog(RPMLOG_NOTICE, _("invalid package number: %s\n"), arg);
return 1;
}
rpmlog(RPMLOG_DEBUG, _("package record number: %u\n"), recOffset);
/* RPMDBI_PACKAGES */
qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, &recOffset, sizeof(recOffset));
if (qva->qva_mi == NULL) {
- rpmlog(RPMERR_QUERYINFO,
+ rpmlog(RPMLOG_NOTICE,
_("record %u could not be read\n"), recOffset);
res = 1;
} else
@@ -668,7 +668,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
}
rpmdbFreeIterator(mi);
if (! matches) {
- rpmlog(RPMERR_QUERYINFO, _("package %s is not installed\n"), arg);
+ rpmlog(RPMLOG_NOTICE, _("package %s is not installed\n"), arg);
res = 1;
} else {
qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0);
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index 51a400cfe..b2114ecd6 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -44,7 +44,7 @@ static int manageFile(FD_t *fdp,
if (*fdp == NULL && fnp != NULL && *fnp != NULL) {
fd = Fopen(*fnp, ((flags & O_WRONLY) ? "w.ufdio" : "r.ufdio"));
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("%s: open failed: %s\n"), *fnp,
+ rpmlog(RPMLOG_ERR, _("%s: open failed: %s\n"), *fnp,
Fstrerror(fd));
return 1;
}
@@ -56,7 +56,7 @@ static int manageFile(FD_t *fdp,
if (*fdp == NULL && (fnp == NULL || *fnp == NULL)) {
fn = NULL;
if (makeTempFile(NULL, (fnp ? &fn : NULL), &fd)) {
- rpmlog(RPMERR_MAKETEMP, _("makeTempFile failed\n"));
+ rpmlog(RPMLOG_ERR, _("makeTempFile failed\n"));
return 1;
}
if (fnp != NULL)
@@ -92,17 +92,17 @@ static int copyFile(FD_t *sfdp, const char **sfnp,
while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), *sfdp)) > 0)
{
if (Fwrite(buf, sizeof(buf[0]), count, *tfdp) != count) {
- rpmlog(RPMERR_FWRITE, _("%s: Fwrite failed: %s\n"), *tfnp,
+ rpmlog(RPMLOG_ERR, _("%s: Fwrite failed: %s\n"), *tfnp,
Fstrerror(*tfdp));
goto exit;
}
}
if (count < 0) {
- rpmlog(RPMERR_FREAD, _("%s: Fread failed: %s\n"), *sfnp, Fstrerror(*sfdp));
+ rpmlog(RPMLOG_ERR, _("%s: Fread failed: %s\n"), *sfnp, Fstrerror(*sfdp));
goto exit;
}
if (Fflush(*tfdp) != 0) {
- rpmlog(RPMERR_FWRITE, _("%s: Fflush failed: %s\n"), *tfnp,
+ rpmlog(RPMLOG_ERR, _("%s: Fflush failed: %s\n"), *tfnp,
Fstrerror(*tfdp));
}
@@ -181,16 +181,16 @@ static int rpmReSign(rpmts ts,
memset(l, 0, sizeof(*l));
rc = readLead(fd, l);
if (rc != RPMRC_OK) {
- rpmlog(RPMERR_READLEAD, _("%s: not an rpm package\n"), rpm);
+ rpmlog(RPMLOG_ERR, _("%s: not an rpm package\n"), rpm);
goto exit;
}
switch (l->major) {
case 1:
- rpmlog(RPMERR_BADSIGTYPE, _("%s: Can't sign v1 packaging\n"), rpm);
+ rpmlog(RPMLOG_ERR, _("%s: Can't sign v1 packaging\n"), rpm);
goto exit;
break;
case 2:
- rpmlog(RPMERR_BADSIGTYPE, _("%s: Can't re-sign v2 packaging\n"), rpm);
+ rpmlog(RPMLOG_ERR, _("%s: Can't re-sign v2 packaging\n"), rpm);
goto exit;
break;
default:
@@ -201,14 +201,14 @@ static int rpmReSign(rpmts ts,
rc = rpmReadSignature(fd, &sigh, l->signature_type, &msg);
switch (rc) {
default:
- rpmlog(RPMERR_SIGGEN, _("%s: rpmReadSignature failed: %s"), rpm,
+ rpmlog(RPMLOG_ERR, _("%s: rpmReadSignature failed: %s"), rpm,
(msg && *msg ? msg : "\n"));
msg = _free(msg);
goto exit;
break;
case RPMRC_OK:
if (sigh == NULL) {
- rpmlog(RPMERR_SIGGEN, _("%s: No signature available\n"), rpm);
+ rpmlog(RPMLOG_ERR, _("%s: No signature available\n"), rpm);
goto exit;
}
break;
@@ -341,13 +341,13 @@ static int rpmReSign(rpmts ts,
l->signature_type = RPMSIGTYPE_HEADERSIG;
rc = writeLead(ofd, l);
if (rc != RPMRC_OK) {
- rpmlog(RPMERR_WRITELEAD, _("%s: writeLead failed: %s\n"), trpm,
+ rpmlog(RPMLOG_ERR, _("%s: writeLead failed: %s\n"), trpm,
Fstrerror(ofd));
goto exit;
}
if (rpmWriteSignature(ofd, sigh)) {
- rpmlog(RPMERR_SIGGEN, _("%s: rpmWriteSignature failed: %s\n"), trpm,
+ rpmlog(RPMLOG_ERR, _("%s: rpmWriteSignature failed: %s\n"), trpm,
Fstrerror(ofd));
goto exit;
}
@@ -432,19 +432,19 @@ static int rpmcliImportPubkeys(const rpmts ts,
/* Read pgp packet. */
if ((rc = pgpReadPkts(fn, &pkt, &pktlen)) <= 0) {
- rpmlog(RPMERR_IMPORT, _("%s: import read failed(%d).\n"), fn, rc);
+ rpmlog(RPMLOG_ERR, _("%s: import read failed(%d).\n"), fn, rc);
res++;
continue;
}
if (rc != PGPARMOR_PUBKEY) {
- rpmlog(RPMERR_IMPORT, _("%s: not an armored public key.\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: not an armored public key.\n"), fn);
res++;
continue;
}
/* Import pubkey packet(s). */
if ((rpmrc = rpmtsImportPubkey(ts, pkt, pktlen)) != RPMRC_OK) {
- rpmlog(RPMERR_IMPORT, _("%s: import failed.\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: import failed.\n"), fn);
res++;
continue;
}
@@ -475,7 +475,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig)
/* Read the header from the package. */
{ Header h = headerRead(fd, HEADER_MAGIC_YES);
if (h == NULL) {
- rpmlog(RPMERR_FREAD, _("%s: headerRead failed\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: headerRead failed\n"), fn);
goto exit;
}
@@ -489,7 +489,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig)
|| uh == NULL)
{
h = headerFree(h);
- rpmlog(RPMERR_FREAD, _("%s: headerGetEntry failed\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: headerGetEntry failed\n"), fn);
goto exit;
}
dig->hdrsha1ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE);
@@ -507,7 +507,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig)
while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), fd)) > 0)
dig->nbytes += count;
if (count < 0) {
- rpmlog(RPMERR_FREAD, _("%s: Fread failed: %s\n"), fn, Fstrerror(fd));
+ rpmlog(RPMLOG_ERR, _("%s: Fread failed: %s\n"), fn, Fstrerror(fd));
goto exit;
}
fdStealDigest(fd, dig);
@@ -546,13 +546,13 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
memset(l, 0, sizeof(*l));
rc = readLead(fd, l);
if (rc != RPMRC_OK) {
- rpmlog(RPMERR_READLEAD, _("%s: not an rpm package\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: not an rpm package\n"), fn);
res++;
goto exit;
}
switch (l->major) {
case 1:
- rpmlog(RPMERR_BADSIGTYPE, _("%s: No signature available (v1.0 RPM)\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: No signature available (v1.0 RPM)\n"), fn);
res++;
goto exit;
break;
@@ -564,7 +564,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
rc = rpmReadSignature(fd, &sigh, l->signature_type, &msg);
switch (rc) {
default:
- rpmlog(RPMERR_SIGGEN, _("%s: rpmReadSignature failed: %s"), fn,
+ rpmlog(RPMLOG_ERR, _("%s: rpmReadSignature failed: %s"), fn,
(msg && *msg ? msg : "\n"));
msg = _free(msg);
res++;
@@ -572,7 +572,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
break;
case RPMRC_OK:
if (sigh == NULL) {
- rpmlog(RPMERR_SIGGEN, _("%s: No signature available\n"), fn);
+ rpmlog(RPMLOG_ERR, _("%s: No signature available\n"), fn);
res++;
goto exit;
}
@@ -659,7 +659,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
(_print_pkts & rpmIsDebug()));
if (sigp->version != 3 && sigp->version != 4) {
- rpmlog(RPMERR_SIGVFY,
+ rpmlog(RPMLOG_NOTICE,
_("skipping package %s with unverifiable V%u signature\n"),
fn, sigp->version);
res++;
@@ -821,9 +821,9 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
if (res2) {
if (rpmIsVerbose()) {
- rpmlog(RPMERR_SIGVFY, "%s", buf);
+ rpmlog(RPMLOG_NOTICE, "%s", buf);
} else {
- rpmlog(RPMERR_SIGVFY, "%s%s%s%s%s%s%s%s\n", buf,
+ rpmlog(RPMLOG_NOTICE, "%s%s%s%s%s%s%s%s\n", buf,
_("NOT OK"),
(missingKeys[0] != '\0') ? _(" (MISSING KEYS:") : "",
missingKeys,
@@ -835,9 +835,9 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
}
} else {
if (rpmIsVerbose()) {
- rpmlog(RPMERR_SIGVFY, "%s", buf);
+ rpmlog(RPMLOG_NOTICE, "%s", buf);
} else {
- rpmlog(RPMERR_SIGVFY, "%s%s%s%s%s%s%s%s\n", buf,
+ rpmlog(RPMLOG_NOTICE, "%s%s%s%s%s%s%s%s\n", buf,
_("OK"),
(missingKeys[0] != '\0') ? _(" (MISSING KEYS:") : "",
missingKeys,
@@ -886,7 +886,7 @@ int rpmcliSign(rpmts ts, QVA_t qva, const char ** argv)
fd = Fopen(arg, "r.ufdio");
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("%s: open failed: %s\n"),
+ rpmlog(RPMLOG_ERR, _("%s: open failed: %s\n"),
arg, Fstrerror(fd));
res++;
} else if (rpmVerifySignatures(qva, ts, fd, arg)) {
diff --git a/lib/rpmgi.c b/lib/rpmgi.c
index 17f773a32..ff115fbf3 100644
--- a/lib/rpmgi.c
+++ b/lib/rpmgi.c
@@ -61,7 +61,7 @@ static FD_t rpmgiOpen(const char * path, const char * fmode)
FD_t fd = Fopen(fn, fmode);
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), fn, Fstrerror(fd));
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), fn, Fstrerror(fd));
if (fd != NULL) (void) Fclose(fd);
fd = NULL;
}
@@ -319,7 +319,7 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi);
*ae++ = '\0';
tag = rpmTagGetValue(a);
if (tag < 0) {
- rpmlog(RPMERR_QUERYINFO, _("unknown tag: \"%s\"\n"), a);
+ rpmlog(RPMLOG_NOTICE, _("unknown tag: \"%s\"\n"), a);
res = 1;
}
pat = ae;
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
index af38ca50d..059d33644 100644
--- a/lib/rpminstall.c
+++ b/lib/rpminstall.c
@@ -92,7 +92,7 @@ void * rpmShowProgress(const void * arg,
fd = Fopen(filename, "r.ufdio");
/* FIX: still necessary? */
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), filename,
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), filename,
Fstrerror(fd));
if (fd != NULL) {
xx = Fclose(fd);
@@ -300,7 +300,7 @@ const char * fileURL = NULL;
av = _free(av); ac = 0;
rc = rpmGlob(*eiu->fnp, &ac, &av);
if (rc || ac == 0) {
- rpmlog(RPMERR_OPEN, _("File not found by glob: %s\n"), *eiu->fnp);
+ rpmlog(RPMLOG_ERR, _("File not found by glob: %s\n"), *eiu->fnp);
continue;
}
@@ -421,7 +421,7 @@ if (fileURL[0] == '=') {
/* Try to read the header from a package file. */
eiu->fd = Fopen(*eiu->fnp, "r.ufdio");
if (eiu->fd == NULL || Ferror(eiu->fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), *eiu->fnp,
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), *eiu->fnp,
Fstrerror(eiu->fd));
if (eiu->fd != NULL) {
xx = Fclose(eiu->fd);
@@ -553,7 +553,7 @@ maybe_manifest:
/* Try to read a package manifest. */
eiu->fd = Fopen(*eiu->fnp, "r.fpio");
if (eiu->fd == NULL || Ferror(eiu->fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), *eiu->fnp,
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), *eiu->fnp,
Fstrerror(eiu->fd));
if (eiu->fd != NULL) {
xx = Fclose(eiu->fd);
@@ -567,7 +567,7 @@ maybe_manifest:
/* FIX: *eiu->argv can be NULL */
rc = rpmReadPackageManifest(eiu->fd, &eiu->argc, &eiu->argv);
if (rc != RPMRC_OK)
- rpmlog(RPMERR_MANIFEST, _("%s: not an rpm package (or package manifest): %s\n"),
+ rpmlog(RPMLOG_NOTICE, _("%s: not an rpm package (or package manifest): %s\n"),
*eiu->fnp, Fstrerror(eiu->fd));
xx = Fclose(eiu->fd);
eiu->fd = NULL;
diff --git a/lib/rpmlead.c b/lib/rpmlead.c
index 554662cf1..b556ab703 100644
--- a/lib/rpmlead.c
+++ b/lib/rpmlead.c
@@ -43,7 +43,7 @@ rpmRC readLead(FD_t fd, struct rpmlead *lead)
/* FIX: remove timed read */
if (timedRead(fd, (char *)lead, sizeof(*lead)) != sizeof(*lead)) {
if (Ferror(fd)) {
- rpmlog(RPMERR_READ, _("read failed: %s (%d)\n"),
+ rpmlog(RPMLOG_ERR, _("read failed: %s (%d)\n"),
Fstrerror(fd), errno);
return RPMRC_FAIL;
}
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index d4190e457..a46bd48fb 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -189,10 +189,10 @@ static int machCompatCacheAdd(char * name, const char * fn, int linenum,
chptr = name;
while (*chptr && *chptr != ':') chptr++;
if (!*chptr) {
- rpmlog(RPMERR_RPMRC, _("missing second ':' at %s:%d\n"), fn, linenum);
+ rpmlog(RPMLOG_ERR, _("missing second ':' at %s:%d\n"), fn, linenum);
return 1;
} else if (chptr == name) {
- rpmlog(RPMERR_RPMRC, _("missing architecture name at %s:%d\n"), fn,
+ rpmlog(RPMLOG_ERR, _("missing architecture name at %s:%d\n"), fn,
linenum);
return 1;
}
@@ -337,22 +337,22 @@ static int addCanon(canonEntry * table, int * tableLen, char * line,
tshort_name = strtok(NULL, " \t");
s = strtok(NULL, " \t");
if (! (tname && tshort_name && s)) {
- rpmlog(RPMERR_RPMRC, _("Incomplete data line at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("Incomplete data line at %s:%d\n"),
fn, lineNum);
- return RPMERR_RPMRC;
+ return RPMLOG_ERR;
}
if (strtok(NULL, " \t")) {
- rpmlog(RPMERR_RPMRC, _("Too many args in data line at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("Too many args in data line at %s:%d\n"),
fn, lineNum);
- return RPMERR_RPMRC;
+ return RPMLOG_ERR;
}
/* LCL: s != NULL here. */
tnum = strtoul(s, &s1, 10);
if ((*s1) || (s1 == s) || (tnum == ULONG_MAX)) {
- rpmlog(RPMERR_RPMRC, _("Bad arch/os number: %s (%s:%d)\n"), s,
+ rpmlog(RPMLOG_ERR, _("Bad arch/os number: %s (%s:%d)\n"), s,
fn, lineNum);
- return(RPMERR_RPMRC);
+ return(RPMLOG_ERR);
}
t[0].name = xstrdup(tname);
@@ -381,14 +381,14 @@ static int addDefault(defaultEntry * table, int * tableLen, char * line,
t->name = strtok(line, ": \t");
t->defName = strtok(NULL, " \t");
if (! (t->name && t->defName)) {
- rpmlog(RPMERR_RPMRC, _("Incomplete default line at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("Incomplete default line at %s:%d\n"),
fn, lineNum);
- return RPMERR_RPMRC;
+ return RPMLOG_ERR;
}
if (strtok(NULL, " \t")) {
- rpmlog(RPMERR_RPMRC, _("Too many args in default line at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("Too many args in default line at %s:%d\n"),
fn, lineNum);
- return RPMERR_RPMRC;
+ return RPMLOG_ERR;
}
t->name = xstrdup(t->name);
@@ -516,7 +516,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
next[0] = '\0';
rc = Fread(next, sizeof(*next), nb, fd);
if (Ferror(fd) || (size > 0 && rc != nb)) { /* XXX Feof(fd) */
- rpmlog(RPMERR_RPMRC, _("Failed to read %s: %s.\n"), urlfn,
+ rpmlog(RPMLOG_ERR, _("Failed to read %s: %s.\n"), urlfn,
Fstrerror(fd));
rc = 1;
} else
@@ -553,7 +553,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
}
if (*se != ':') {
- rpmlog(RPMERR_RPMRC, _("missing ':' (found 0x%02x) at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("missing ':' (found 0x%02x) at %s:%d\n"),
(unsigned)(0xff & *se), urlfn, linenum);
return 1;
}
@@ -570,7 +570,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
arch = val = fn = NULL;
if (*se == '\0') {
- rpmlog(RPMERR_RPMRC, _("missing argument for %s at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("missing argument for %s at %s:%d\n"),
option->name, urlfn, linenum);
return 1;
}
@@ -587,7 +587,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
fn = rpmGetPath(s, NULL);
if (fn == NULL || *fn == '\0') {
- rpmlog(RPMERR_RPMRC, _("%s expansion failed at %s:%d \"%s\"\n"),
+ rpmlog(RPMLOG_ERR, _("%s expansion failed at %s:%d \"%s\"\n"),
option->name, urlfn, linenum, s);
fn = _free(fn);
return 1;
@@ -595,7 +595,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
fdinc = Fopen(fn, "r.fpio");
if (fdinc == NULL || Ferror(fdinc)) {
- rpmlog(RPMERR_RPMRC, _("cannot open %s at %s:%d: %s\n"),
+ rpmlog(RPMLOG_ERR, _("cannot open %s at %s:%d: %s\n"),
fn, urlfn, linenum, Fstrerror(fdinc));
rc = 1;
} else {
@@ -613,7 +613,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
arch = se;
while (*se && !xisspace(*se)) se++;
if (*se == '\0') {
- rpmlog(RPMERR_RPMRC,
+ rpmlog(RPMLOG_ERR,
_("missing architecture for %s at %s:%d\n"),
option->name, urlfn, linenum);
return 1;
@@ -621,7 +621,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
*se++ = '\0';
while (*se && xisspace(*se)) se++;
if (*se == '\0') {
- rpmlog(RPMERR_RPMRC,
+ rpmlog(RPMLOG_ERR,
_("missing argument for %s at %s:%d\n"),
option->name, urlfn, linenum);
return 1;
@@ -681,7 +681,7 @@ static int doReadRC( FD_t fd, const char * urlfn)
}
if (!gotit) {
- rpmlog(RPMERR_RPMRC, _("bad option '%s' at %s:%d\n"),
+ rpmlog(RPMLOG_ERR, _("bad option '%s' at %s:%d\n"),
s, urlfn, linenum);
}
}
@@ -1630,12 +1630,12 @@ static int rpmReadRC(const char * rcfiles)
/* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
if (rcfiles == defrcfiles && myrcfiles != r)
continue;
- rpmlog(RPMERR_RPMRC, _("Cannot expand %s\n"), r);
+ rpmlog(RPMLOG_ERR, _("Cannot expand %s\n"), r);
rc = 1;
break;
}
if (strlen(home) > (sizeof(fn) - strlen(r))) {
- rpmlog(RPMERR_RPMRC, _("Cannot read %s, HOME is too large.\n"),
+ rpmlog(RPMLOG_ERR, _("Cannot read %s, HOME is too large.\n"),
r);
rc = 1;
break;
@@ -1652,7 +1652,7 @@ static int rpmReadRC(const char * rcfiles)
/* XXX Only /usr/lib/rpm/rpmrc must exist in default rcfiles list */
if (rcfiles == defrcfiles && myrcfiles != r)
continue;
- rpmlog(RPMERR_RPMRC, _("Unable to open %s for reading: %s.\n"),
+ rpmlog(RPMLOG_ERR, _("Unable to open %s for reading: %s.\n"),
fn, Fstrerror(fd));
rc = 1;
break;
diff --git a/lib/rpmts.c b/lib/rpmts.c
index bc0cc46ce..3ede23269 100644
--- a/lib/rpmts.c
+++ b/lib/rpmts.c
@@ -264,7 +264,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
case '(':
/* XXX Fail if nested parens. */
if (level++ != 0) {
- rpmlog(RPMERR_QFMT, _("extra '(' in package label: %s\n"), keyp);
+ rpmlog(RPMLOG_ERR, _("extra '(' in package label: %s\n"), keyp);
return NULL;
}
/* Parse explicit epoch. */
@@ -282,7 +282,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
case ')':
/* XXX Fail if nested parens. */
if (--level != 0) {
- rpmlog(RPMERR_QFMT, _("missing '(' in package label: %s\n"), keyp);
+ rpmlog(RPMLOG_ERR, _("missing '(' in package label: %s\n"), keyp);
return NULL;
}
/* Don't copy trailing ')' */
@@ -290,7 +290,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
}
}
if (level) {
- rpmlog(RPMERR_QFMT, _("missing ')' in package label: %s\n"), keyp);
+ rpmlog(RPMLOG_ERR, _("missing ')' in package label: %s\n"), keyp);
return NULL;
}
*t = '\0';
@@ -728,7 +728,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
bh = headerFree(bh);
qfmt = _free(qfmt);
if (str == NULL) {
- rpmlog(RPMERR_QFMT, _("incorrect format: %s\n"), errstr);
+ rpmlog(RPMLOG_ERR, _("incorrect format: %s\n"), errstr);
goto exit;
}
@@ -739,7 +739,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
h = headerFree(h);
fd = Fopen(str, "r.ufdio");
if (fd == NULL || Ferror(fd)) {
- rpmlog(RPMERR_OPEN, _("open of %s failed: %s\n"), str,
+ rpmlog(RPMLOG_ERR, _("open of %s failed: %s\n"), str,
Fstrerror(fd));
if (fd != NULL) {
xx = Fclose(fd);
diff --git a/lib/signature.c b/lib/signature.c
index a9f2da417..19a0d1bda 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -404,9 +404,9 @@ static int makePGPSignature(const char * file, int32_t * sigTagp,
break;
}
}
- rpmlog(RPMERR_EXEC, _("Could not exec %s: %s\n"), "pgp",
+ rpmlog(RPMLOG_ERR, _("Could not exec %s: %s\n"), "pgp",
strerror(errno));
- _exit(RPMERR_EXEC);
+ _exit(RPMLOG_ERR);
}
delMacro(NULL, "__plaintext_filename");
@@ -420,14 +420,14 @@ static int makePGPSignature(const char * file, int32_t * sigTagp,
(void)waitpid(pid, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
- rpmlog(RPMERR_SIGGEN, _("pgp failed\n"));
+ rpmlog(RPMLOG_ERR, _("pgp failed\n"));
return 1;
}
if (stat(sigfile, &st)) {
/* PGP failed to write signature */
if (sigfile) (void) unlink(sigfile); /* Just in case */
- rpmlog(RPMERR_SIGGEN, _("pgp failed to write signature\n"));
+ rpmlog(RPMLOG_ERR, _("pgp failed to write signature\n"));
return 1;
}
@@ -446,7 +446,7 @@ static int makePGPSignature(const char * file, int32_t * sigTagp,
}
if (rc != *pktlenp) {
*pktp = _free(*pktp);
- rpmlog(RPMERR_SIGGEN, _("unable to read the signature\n"));
+ rpmlog(RPMLOG_ERR, _("unable to read the signature\n"));
return 1;
}
}
@@ -515,9 +515,9 @@ static int makeGPGSignature(const char * file, int32_t * sigTagp,
if (!rc)
rc = execve(av[0], av+1, environ);
- rpmlog(RPMERR_EXEC, _("Could not exec %s: %s\n"), "gpg",
+ rpmlog(RPMLOG_ERR, _("Could not exec %s: %s\n"), "gpg",
strerror(errno));
- _exit(RPMERR_EXEC);
+ _exit(RPMLOG_ERR);
}
delMacro(NULL, "__plaintext_filename");
@@ -532,14 +532,14 @@ static int makeGPGSignature(const char * file, int32_t * sigTagp,
(void) waitpid(pid, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
- rpmlog(RPMERR_SIGGEN, _("gpg exec failed (%d)\n"), WEXITSTATUS(status));
+ rpmlog(RPMLOG_ERR, _("gpg exec failed (%d)\n"), WEXITSTATUS(status));
return 1;
}
if (stat(sigfile, &st)) {
/* GPG failed to write signature */
if (sigfile) (void) unlink(sigfile); /* Just in case */
- rpmlog(RPMERR_SIGGEN, _("gpg failed to write signature\n"));
+ rpmlog(RPMLOG_ERR, _("gpg failed to write signature\n"));
return 1;
}
@@ -558,7 +558,7 @@ static int makeGPGSignature(const char * file, int32_t * sigTagp,
}
if (rc != *pktlenp) {
*pktp = _free(*pktp);
- rpmlog(RPMERR_SIGGEN, _("unable to read the signature\n"));
+ rpmlog(RPMLOG_ERR, _("unable to read the signature\n"));
return 1;
}
}
@@ -808,7 +808,7 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag)
if (!rc)
rc = execve(av[0], av+1, environ);
- rpmlog(RPMERR_EXEC, _("Could not exec %s: %s\n"), "gpg",
+ rpmlog(RPMLOG_ERR, _("Could not exec %s: %s\n"), "gpg",
strerror(errno));
} break;
case RPMSIGTAG_RSA:
@@ -841,13 +841,13 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag)
break;
}
}
- rpmlog(RPMERR_EXEC, _("Could not exec %s: %s\n"), "pgp",
+ rpmlog(RPMLOG_ERR, _("Could not exec %s: %s\n"), "pgp",
strerror(errno));
- _exit(RPMERR_EXEC);
+ _exit(RPMLOG_ERR);
} break;
default: /* This case should have been screened out long ago. */
- rpmlog(RPMERR_SIGGEN, _("Invalid %%_signature spec in macro file\n"));
- _exit(RPMERR_SIGGEN);
+ rpmlog(RPMLOG_ERR, _("Invalid %%_signature spec in macro file\n"));
+ _exit(RPMLOG_ERR);
break;
}
}
@@ -876,7 +876,7 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
}
if (aok)
break;
- rpmlog(RPMERR_SIGGEN,
+ rpmlog(RPMLOG_ERR,
_("You must set \"%%_gpg_name\" in your macro file\n"));
break;
case RPMSIGTAG_RSA:
@@ -888,14 +888,14 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
}
if (aok)
break;
- rpmlog(RPMERR_SIGGEN,
+ rpmlog(RPMLOG_ERR,
_("You must set \"%%_pgp_name\" in your macro file\n"));
break;
default:
/* Currently the calling function (rpm.c:main) is checking this and
* doing a better job. This section should never be accessed.
*/
- rpmlog(RPMERR_SIGGEN, _("Invalid %%_signature spec in macro file\n"));
+ rpmlog(RPMLOG_ERR, _("Invalid %%_signature spec in macro file\n"));
break;
}