diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-10-09 14:49:02 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-10-09 14:49:02 +0300 |
commit | c52905d33460c020f8f1b33da47c06a8a2cb513f (patch) | |
tree | 61d7dcdb8cb727dd21a6d82fe68f6ab6a75a9872 | |
parent | 9d9aa852ca724e4c7671cec249189f7dfef5ed8e (diff) | |
download | librpm-tizen-c52905d33460c020f8f1b33da47c06a8a2cb513f.tar.gz librpm-tizen-c52905d33460c020f8f1b33da47c06a8a2cb513f.tar.bz2 librpm-tizen-c52905d33460c020f8f1b33da47c06a8a2cb513f.zip |
Replace all uses of RPMMESS_ERROR with RPMLOG_ERR
-rw-r--r-- | build.c | 2 | ||||
-rw-r--r-- | build/files.c | 2 | ||||
-rw-r--r-- | lib/depends.c | 2 | ||||
-rw-r--r-- | lib/package.c | 16 | ||||
-rw-r--r-- | lib/rpmgi.c | 2 | ||||
-rw-r--r-- | lib/rpminstall.c | 26 | ||||
-rw-r--r-- | lib/rpmlock.c | 4 | ||||
-rw-r--r-- | lib/rpmts.c | 2 | ||||
-rw-r--r-- | lib/transaction.c | 12 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 12 | ||||
-rw-r--r-- | rpmio/url.c | 2 | ||||
-rw-r--r-- | tools/rpmgraph.c | 4 | ||||
-rw-r--r-- | tools/rpmsort.c | 8 |
13 files changed, 47 insertions, 47 deletions
@@ -31,7 +31,7 @@ static int checkSpec(rpmts ts, Header h) ps = rpmtsProblems(ts); if (rc == 0 && rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed build dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed build dependencies:\n")); rpmpsPrint(NULL, ps); rc = 1; } diff --git a/build/files.c b/build/files.c index e2efeb909..81d856535 100644 --- a/build/files.c +++ b/build/files.c @@ -2267,7 +2267,7 @@ static int checkFiles(StringBuf fileList) t = getStringBuf(sb_stdout); if ((*t != '\0') && (*t != '\n')) { rc = (_unpackaged_files_terminate_build) ? 1 : 0; - rpmlog((rc ? RPMMESS_ERROR : RPMMESS_WARNING), + rpmlog((rc ? RPMLOG_ERR : RPMMESS_WARNING), _("Installed (but unpackaged) file(s) found:\n%s"), t); } } diff --git a/lib/depends.c b/lib/depends.c index c8470c3f6..a1986e80a 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -1400,7 +1400,7 @@ rescan: } /* Return no. of packages that could not be ordered. */ - rpmlog(RPMMESS_ERROR, _("rpmtsOrder failed, %d elements remain\n"), + rpmlog(RPMLOG_ERR, _("rpmtsOrder failed, %d elements remain\n"), loopcheck); return loopcheck; } diff --git a/lib/package.c b/lib/package.c index 6afa18f0c..64e5eb6e0 100644 --- a/lib/package.c +++ b/lib/package.c @@ -490,7 +490,7 @@ verifyinfo_exit: /* 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) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping header with unverifiable V%u signature\n"), dig->signature.version); rpmtsCleanDig(ts); @@ -531,7 +531,7 @@ verifyinfo_exit: /* 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) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping header with unverifiable V%u signature\n"), dig->signature.version); rpmtsCleanDig(ts); @@ -840,7 +840,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) /* 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) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping package %s with unverifiable V%u signature\n"), fn, dig->signature.version); rc = RPMRC_FAIL; @@ -866,7 +866,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) /* 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) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping package %s with unverifiable V%u signature\n"), fn, dig->signature.version); rc = RPMRC_FAIL; @@ -897,7 +897,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) xx = pgpPrtPkts(sig, siglen, dig, (_print_pkts & rpmIsDebug())); if (dig->signature.version != 3 && dig->signature.version != 4) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping package %s with unverifiable V%u signature\n"), fn, dig->signature.version); rc = RPMRC_FAIL; @@ -962,7 +962,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) break; default: case RPMRC_FAIL: /* Signature does not verify. */ - rpmlog(RPMMESS_ERROR, "%s: %s", fn, buf); + rpmlog(RPMLOG_ERR, "%s: %s", fn, buf); break; } @@ -1007,11 +1007,11 @@ rpmRC headerCheckPayloadFormat(Header h) { } else { const char *nevra = hGetNEVRA(h, NULL); if (payloadfmt && strncmp(payloadfmt, "drpm", strlen("drpm")) == 0) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("%s is a Delta RPM and cannot be directly installed\n"), nevra); } else { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("Unsupported payload (%s) in package %s\n"), payloadfmt ? payloadfmt : "none", nevra); } diff --git a/lib/rpmgi.c b/lib/rpmgi.c index 15884e006..442d4b525 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -580,7 +580,7 @@ enditer: /* XXX query/verify will need the glop added to a buffer instead. */ ps = rpmtsProblems(ts); if (rpmpsNumProblems(ps) > 0) { - /* XXX rpminstall will need RPMMESS_ERROR */ + /* XXX rpminstall will need RPMLOG_ERR */ rpmlog(RPMMESS_VERBOSE, _("Failed dependencies:\n")); if (rpmIsVerbose()) rpmpsPrint(NULL, ps); diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 180e08156..781c8afa2 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -380,7 +380,7 @@ if (fileURL[0] == '=') { rpmlog(RPMLOG_DEBUG, _(" ... as %s\n"), tfn); rc = urlGetFile(fileURL, tfn); if (rc < 0) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("skipping %s - transfer failed - %s\n"), fileURL, ftpStrerror(rc)); eiu->numFailed++; @@ -438,7 +438,7 @@ if (fileURL[0] == '=') { switch (eiu->rpmrc) { case RPMRC_FAIL: - rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *eiu->fnp); + rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), *eiu->fnp); eiu->numFailed++; *eiu->fnp = NULL; continue; break; @@ -479,7 +479,7 @@ if (fileURL[0] == '=') { } else { const char * name; xx = headerNVR(eiu->h, &name, NULL, NULL); - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("package %s is not relocatable\n"), name); eiu->numFailed++; goto exit; @@ -526,13 +526,13 @@ if (fileURL[0] == '=') { eiu->numRPMS); break; case 1: - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("error reading from file %s\n"), *eiu->fnp); eiu->numFailed++; goto exit; break; case 2: - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("file %s requires a newer version of RPM\n"), *eiu->fnp); eiu->numFailed++; @@ -594,7 +594,7 @@ maybe_manifest: ps = rpmtsProblems(ts); if (!stopInstall && rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); eiu->numFailed = eiu->numPkgs; stopInstall = 1; @@ -653,7 +653,7 @@ maybe_manifest: if (eiu->sourceURL[i] == NULL) continue; eiu->fd = Fopen(eiu->sourceURL[i], "r.ufdio"); if (eiu->fd == NULL || Ferror(eiu->fd)) { - rpmlog(RPMMESS_ERROR, _("cannot open file %s: %s\n"), + rpmlog(RPMLOG_ERR, _("cannot open file %s: %s\n"), eiu->sourceURL[i], Fstrerror(eiu->fd)); if (eiu->fd != NULL) { xx = Fclose(eiu->fd); @@ -732,7 +732,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, /* XXX HACK to get rpmdbFindByLabel out of the API */ mi = rpmtsInitIterator(ts, RPMDBI_LABEL, *arg, 0); if (mi == NULL) { - rpmlog(RPMMESS_ERROR, _("package %s is not installed\n"), *arg); + rpmlog(RPMLOG_ERR, _("package %s is not installed\n"), *arg); numFailed++; } else { Header h; /* XXX iterator owns the reference */ @@ -741,7 +741,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, unsigned int recOffset = rpmdbGetIteratorOffset(mi); if (!(count++ == 0 || (ia->eraseInterfaceFlags & UNINSTALL_ALLMATCHES))) { - rpmlog(RPMMESS_ERROR, _("\"%s\" specifies multiple packages\n"), + rpmlog(RPMLOG_ERR, _("\"%s\" specifies multiple packages\n"), *arg); numFailed++; break; @@ -766,7 +766,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia, ps = rpmtsProblems(ts); if (!stopUninstall && rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); numFailed += numPackages; stopUninstall = 1; @@ -811,7 +811,7 @@ int rpmInstallSource(rpmts ts, const char * arg, fd = Fopen(arg, "r.ufdio"); if (fd == NULL || Ferror(fd)) { - rpmlog(RPMMESS_ERROR, _("cannot open %s: %s\n"), arg, Fstrerror(fd)); + rpmlog(RPMLOG_ERR, _("cannot open %s: %s\n"), arg, Fstrerror(fd)); if (fd != NULL) (void) Fclose(fd); return 1; } @@ -827,7 +827,7 @@ int rpmInstallSource(rpmts ts, const char * arg, ovsflags = rpmtsSetVSFlags(ts, ovsflags); } if (rc != 0) { - rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), arg); + rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), arg); if (specFilePtr && *specFilePtr) *specFilePtr = _free(*specFilePtr); if (cookie && *cookie) @@ -1012,7 +1012,7 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv) rc = rpmtsCheck(ts); ps = rpmtsProblems(ts); if (rc != 0 && rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); ps = rpmpsFree(ps); goto exit; diff --git a/lib/rpmlock.c b/lib/rpmlock.c index bb3e15c07..c373b30a2 100644 --- a/lib/rpmlock.c +++ b/lib/rpmlock.c @@ -115,13 +115,13 @@ void *rpmtsAcquireLock(rpmts ts) rootDir = "/"; lock = rpmlock_new(rootDir); if (!lock) { - rpmlog(RPMMESS_ERROR, _("can't create transaction lock on %s\n"), rpmlock_path); + rpmlog(RPMLOG_ERR, _("can't create transaction lock on %s\n"), rpmlock_path); } else if (!rpmlock_acquire(lock, RPMLOCK_WRITE)) { if (lock->openmode & RPMLOCK_WRITE) rpmlog(RPMMESS_WARNING, _("waiting for transaction lock on %s\n"), rpmlock_path); if (!rpmlock_acquire(lock, RPMLOCK_WRITE|RPMLOCK_WAIT)) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("can't create transaction lock on %s\n"), rpmlock_path); rpmlock_free(lock); lock = NULL; diff --git a/lib/rpmts.c b/lib/rpmts.c index 33cfb92c5..8b7786c4d 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -154,7 +154,7 @@ int rpmtsOpenDB(rpmts ts, int dbmode) if (rc) { const char * dn; dn = rpmGetPath(ts->rootDir, "%{_dbpath}", NULL); - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("cannot open Packages database in %s\n"), dn); dn = _free(dn); } diff --git a/lib/transaction.c b/lib/transaction.c index 1c386586f..7d976eac2 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -944,7 +944,7 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction) rc = rpmtsCheck(rollbackTransaction); ps = rpmtsProblems(rollbackTransaction); if (rc != 0 && rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); ps = rpmpsFree(ps); return -1; @@ -954,7 +954,7 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction) /* Order the transaction */ rc = rpmtsOrder(rollbackTransaction); if (rc != 0) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("Could not order auto-rollback transaction!\n")); return -1; } @@ -1974,7 +1974,7 @@ assert(psm != NULL); /* If we should rollback this transaction on failure, lets do it. */ if (rollbackOnFailure) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("Add failed. Could not read package header.\n")); /* Clean up the current transaction */ p->h = headerFree(p->h); @@ -2056,7 +2056,7 @@ assert(psm != NULL); /* If we should rollback this transaction on failure, lets do it. */ if (rollbackOnFailure) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("Add failed in rpmpsmStage().\n")); /* Clean up the current transaction */ p->h = headerFree(p->h); @@ -2100,7 +2100,7 @@ assert(psm != NULL); * on failure, lets do it. */ if (rollbackOnFailure) { - rpmlog(RPMMESS_ERROR, _("Add failed. Could not get file list.\n")); + rpmlog(RPMLOG_ERR, _("Add failed. Could not get file list.\n")); /* Clean up the current transaction */ p->h = headerFree(p->h); xx = rpmdbSync(rpmtsGetRdb(ts)); @@ -2145,7 +2145,7 @@ assert(psm != NULL); * on failure, lets do it. */ if (rollbackOnFailure) { - rpmlog(RPMMESS_ERROR, + rpmlog(RPMLOG_ERR, _("Erase failed failed in rpmpsmStage().\n")); /* Clean up the current transaction */ xx = rpmdbSync(rpmtsGetRdb(ts)); diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index cc82389a5..98feb3b3c 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -1485,7 +1485,7 @@ static int miFreeHeader(rpmdbMatchIterator mi, dbiIndex dbi) int lvl; rpmrc = (*mi->mi_hdrchk) (mi->mi_ts, data->data, data->size, &msg); - lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMLOG_DEBUG); + lvl = (rpmrc == RPMRC_FAIL ? RPMLOG_ERR : RPMLOG_DEBUG); rpmlog(lvl, "%s h#%8u %s", (rpmrc == RPMRC_FAIL ? _("miFreeHeader: skipping") : "write"), mi->mi_prevoffset, (msg ? msg : "\n")); @@ -2111,7 +2111,7 @@ if (dbiByteSwapped(dbi) == 1) int lvl; rpmrc = (*mi->mi_hdrchk) (mi->mi_ts, uh, uhlen, &msg); - lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMLOG_DEBUG); + lvl = (rpmrc == RPMRC_FAIL ? RPMLOG_ERR : RPMLOG_DEBUG); rpmlog(lvl, "%s h#%8u %s", (rpmrc == RPMRC_FAIL ? _("rpmdbNextIterator: skipping") : " read"), mi->mi_offset, (msg ? msg : "\n")); @@ -2865,7 +2865,7 @@ data->size = headerSizeof(h, HEADER_MAGIC_NO); int lvl; rpmrc = (*hdrchk) (ts, data->data, data->size, &msg); - lvl = (rpmrc == RPMRC_FAIL ? RPMMESS_ERROR : RPMLOG_DEBUG); + lvl = (rpmrc == RPMRC_FAIL ? RPMLOG_ERR : RPMLOG_DEBUG); rpmlog(lvl, "%s h#%8u %s", (rpmrc == RPMRC_FAIL ? _("rpmdbAdd: skipping") : " +++"), hdrNum, (msg ? msg : "\n")); @@ -3595,9 +3595,9 @@ int rpmdbRebuild(const char * prefix, rpmts ts, goto exit; } else if (!nocleanup) { if (rpmdbMoveDatabase(prefix, newdbpath, _dbapi_rebuild, dbpath, _dbapi)) { - rpmlog(RPMMESS_ERROR, _("failed to replace old database with new " + rpmlog(RPMLOG_ERR, _("failed to replace old database with new " "database!\n")); - rpmlog(RPMMESS_ERROR, _("replace files in %s with files from %s " + rpmlog(RPMLOG_ERR, _("replace files in %s with files from %s " "to recover"), dbpath, newdbpath); rc = 1; goto exit; @@ -3609,7 +3609,7 @@ exit: if (removedir && !(rc == 0 && nocleanup)) { rpmlog(RPMLOG_DEBUG, _("removing directory %s\n"), newrootdbpath); if (Rmdir(newrootdbpath)) - rpmlog(RPMMESS_ERROR, _("failed to remove directory %s: %s\n"), + rpmlog(RPMLOG_ERR, _("failed to remove directory %s: %s\n"), newrootdbpath, strerror(errno)); } newrootdbpath = _free(newrootdbpath); diff --git a/rpmio/url.c b/rpmio/url.c index 90e15b451..c2d236aa6 100644 --- a/rpmio/url.c +++ b/rpmio/url.c @@ -209,7 +209,7 @@ int urlSplit(const char * url, urlinfo *uret) char *end; u->port = strtol(u->portstr, &end, 0); if (!(end && *end == '\0')) { - rpmlog(RPMMESS_ERROR, _("url port must be a number\n")); + rpmlog(RPMLOG_ERR, _("url port must be a number\n")); myurl = _free(myurl); u = urlFree(u); return -1; diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index c9b4ff3c8..6f28c6337 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -136,7 +136,7 @@ restart: switch (rpmrc) { case RPMRC_FAIL: default: - rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp); + rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), *fnp); numFailed++; *fnp = NULL; break; case RPMRC_OK: @@ -191,7 +191,7 @@ maybe_manifest: } ps = rpmtsProblems(ts); if (rpmpsNumProblems(ps) > 0) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); numFailed += numPkgs; diff --git a/tools/rpmsort.c b/tools/rpmsort.c index a58076b30..d12a21635 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -70,7 +70,7 @@ do_tsort(const char *fileArgv[]) rc = rpmtsOpenDB(ts, O_RDONLY); if (rc) { - rpmlog(RPMMESS_ERROR, _("cannot open Packages database\n")); + rpmlog(RPMLOG_ERR, _("cannot open Packages database\n")); rc = -1; goto exit; } @@ -86,7 +86,7 @@ do_tsort(const char *fileArgv[]) rc = rpmdbOpen(rootdir, &avdb, O_RDONLY, 0644); delMacro(NULL, "_dbpath"); if (rc) { - rpmlog(RPMMESS_ERROR, _("cannot open Available database\n")); + rpmlog(RPMLOG_ERR, _("cannot open Available database\n")); goto endavail; } mi = rpmdbInitIterator(avdb, RPMDBI_PACKAGES, NULL, 0); @@ -172,7 +172,7 @@ restart: } if (rc != RPMRC_NOTFOUND) { - rpmlog(RPMMESS_ERROR, _("%s cannot be installed\n"), *fnp); + rpmlog(RPMLOG_ERR, _("%s cannot be installed\n"), *fnp); numFailed++; *fnp = NULL; break; } @@ -213,7 +213,7 @@ restart: ps = rpmtsProblems(ts); if (ps) { - rpmlog(RPMMESS_ERROR, _("Failed dependencies:\n")); + rpmlog(RPMLOG_ERR, _("Failed dependencies:\n")); rpmpsPrint(NULL, ps); ps = rpmpsFree(ps); rc = -1; |