diff options
42 files changed, 41 insertions, 162 deletions
@@ -12,7 +12,7 @@ #include "rpmts.h" #include "build.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" /** diff --git a/build/build.c b/build/build.c index cb6a7cbe1..82235b3e9 100644 --- a/build/build.c +++ b/build/build.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "misc.h" /* XXX for makeTempFile */ #include "debug.h" diff --git a/build/expression.c b/build/expression.c index 3591a8165..b668402f5 100644 --- a/build/expression.c +++ b/build/expression.c @@ -15,7 +15,7 @@ #include "rpmbuild.h" #include "rpmlib.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" diff --git a/build/files.c b/build/files.c index 7ced1bf54..62120c52c 100644 --- a/build/files.c +++ b/build/files.c @@ -31,7 +31,7 @@ #include "legacy.h" /* XXX domd5, expandFileList, compressFileList */ #include "misc.h" /* for splitString, freeSplitString */ -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; } diff --git a/build/pack.c b/build/pack.c index aa1588a82..6125faf02 100644 --- a/build/pack.c +++ b/build/pack.c @@ -24,7 +24,7 @@ #include "signature.h" #include "rpmlead.h" #include "misc.h" /* XXX for makeTempFile */ -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" /** diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index 7ee86d40f..1010e6469 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -5,7 +5,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" diff --git a/build/parseChangelog.c b/build/parseChangelog.c index 218ee7ff8..52985705d 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; } diff --git a/build/parseDescription.c b/build/parseDescription.c index 2d32d7b10..89fb2a3cb 100644 --- a/build/parseDescription.c +++ b/build/parseDescription.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" extern int noLang; diff --git a/build/parseFiles.c b/build/parseFiles.c index 5d5295240..bf1e2ba15 100644 --- a/build/parseFiles.c +++ b/build/parseFiles.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" /* These have to be global scope to make up for *stupid* compilers */ diff --git a/build/parsePreamble.c b/build/parsePreamble.c index f5957bea8..f6bd90ced 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; } diff --git a/build/parsePrep.c b/build/parsePrep.c index 8ce0fa2cd..ff49679c1 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "misc.h" /* XXX for splitString */ #include "debug.h" diff --git a/build/parseReqs.c b/build/parseReqs.c index 0b3e77e72..cff482f5a 100644 --- a/build/parseReqs.c +++ b/build/parseReqs.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" /** diff --git a/build/parseScript.c b/build/parseScript.c index 44c1d572c..7586da647 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -6,7 +6,7 @@ #include "system.h" #include "rpmbuild.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #include "rpmlua.h" diff --git a/build/parseSpec.c b/build/parseSpec.c index 461bc5bc6..796c15b02 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -8,7 +8,7 @@ #include "rpmbuild.h" #include "rpmds.h" #include "rpmts.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #define SKIPSPACE(s) { while (*(s) && xisspace(*(s))) (s)++; } diff --git a/build/poptBT.c b/build/poptBT.c index dce01d085..3770248d1 100644 --- a/build/poptBT.c +++ b/build/poptBT.c @@ -8,7 +8,7 @@ #include "rpmbuild.h" #include "legacy.h" /* XXX _noDirTokens */ -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" struct rpmBuildArguments_s rpmBTArgs; diff --git a/build/rpmfc.c b/build/rpmfc.c index ff995d7b5..4199a78ae 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -5,7 +5,7 @@ #include "rpmbuild.h" #include "argv.h" #include "rpmfc.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmds.h" #include "rpmfi.h" diff --git a/build/spec.c b/build/spec.c index f8b17eb37..4a6e29385 100644 --- a/build/spec.c +++ b/build/spec.c @@ -9,7 +9,7 @@ #include "rpmds.h" #include "rpmfi.h" #include "rpmts.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" diff --git a/lib/cpio.c b/lib/cpio.c index 4458a34bd..2306563b8 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -14,7 +14,7 @@ #include "cpio.h" #include "fsm.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" @@ -5,7 +5,7 @@ #include "system.h" #include "rpmlib.h" #include "rpmmacro.h" /* XXX for rpmGetPath */ -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" @@ -13,7 +13,7 @@ #include "fsm.h" #define fsmUNSAFE fsmStage -#include "rpmerr.h" +#include "rpmlog.h" #define _RPMFI_INTERNAL /* XXX fi->apath, fi->action... */ #include "rpmfi.h" diff --git a/lib/idtx.c b/lib/idtx.c index 8d2aca4c3..91882528c 100644 --- a/lib/idtx.c +++ b/lib/idtx.c @@ -5,7 +5,7 @@ #include "rpmdb.h" #include "rpmts.h" #include "rpmmacro.h" -#include "rpmerr.h" +#include "rpmlog.h" static int reverse = -1; diff --git a/lib/misc.c b/lib/misc.c index 1a01f252e..90e7309df 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -10,7 +10,7 @@ const char * RPMVERSION = VERSION; #include "rpmurl.h" #include "rpmmacro.h" /* XXX for rpmGetPath */ #include "rpmlib.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "misc.h" #include "debug.h" diff --git a/lib/package.c b/lib/package.c index 1a179a068..d2c5dde69 100644 --- a/lib/package.c +++ b/lib/package.c @@ -15,7 +15,7 @@ #include "legacy.h" /* XXX legacyRetrofit() */ #include "rpmlead.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "header_internal.h" /* XXX headerCheck */ #include "signature.h" #include "debug.h" @@ -31,7 +31,7 @@ #include "legacy.h" /* XXX rpmfiBuildFNames() */ #include "misc.h" /* XXX rpmMkdirPath, makeTempFile, doputenv */ #include "rpmdb.h" /* XXX for db_chrootDone */ -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #define _PSM_DEBUG 0 diff --git a/lib/query.c b/lib/query.c index 457f61376..4e481fe09 100644 --- a/lib/query.c +++ b/lib/query.c @@ -18,7 +18,7 @@ #include "rpmts.h" #include "manifest.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" #include "misc.h" /* XXX for currentDirectory */ diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index b2114ecd6..779643419 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -13,7 +13,7 @@ #include "rpmts.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmlead.h" #include "signature.h" #include "misc.h" /* XXX for makeTempFile() */ diff --git a/lib/rpmgi.c b/lib/rpmgi.c index ff115fbf3..e868885ca 100644 --- a/lib/rpmgi.c +++ b/lib/rpmgi.c @@ -11,7 +11,7 @@ #include "rpmdb.h" #include "rpmmacro.h" /* XXX rpmExpand */ #include "manifest.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" diff --git a/lib/rpminstall.c b/lib/rpminstall.c index 059d33644..af9c8f5fb 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -12,7 +12,7 @@ #include "rpmts.h" #include "manifest.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" int rpmcliPackagesTotal = 0; diff --git a/lib/rpmlead.c b/lib/rpmlead.c index b556ab703..981ce1c11 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -10,7 +10,7 @@ #include "signature.h" #include "rpmlead.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" static unsigned char lead_magic[] = { diff --git a/lib/rpmrc.c b/lib/rpmrc.c index a46bd48fb..9de8f8c97 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -18,7 +18,7 @@ #include "rpmmacro.h" #include "rpmlua.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" static const char *defrcfiles = diff --git a/lib/rpmts.c b/lib/rpmts.c index 3ede23269..4b4b9de44 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -15,7 +15,7 @@ #include "rpmds.h" #include "rpmfi.h" #include "rpmlock.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmte.h" diff --git a/lib/signature.c b/lib/signature.c index 19a0d1bda..f9ed5da42 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -11,7 +11,7 @@ #include "rpmts.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "misc.h" /* XXX for dosetenv() and makeTempFile() */ #include "legacy.h" /* XXX for mdbinfile() */ #include "rpmlead.h" diff --git a/rpmdb/db3.c b/rpmdb/db3.c index 486a540ca..6f9f676b6 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -15,7 +15,7 @@ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */ #include "rpmurl.h" /* XXX urlPath proto */ #include "rpmdb_internal.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" diff --git a/rpmdb/dbconfig.c b/rpmdb/dbconfig.c index a4ac5f2fe..00a35de34 100644 --- a/rpmdb/dbconfig.c +++ b/rpmdb/dbconfig.c @@ -7,7 +7,7 @@ #include "rpmlib.h" #include "rpmmacro.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmdb_internal.h" #include "debug.h" diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index 8857daa2a..cef7d3330 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -20,7 +20,7 @@ #include "rpmmacro.h" #include "rpmsq.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmdb_internal.h" #include "rpmdb.h" #include "fprint.h" diff --git a/rpmio/Makefile.am b/rpmio/Makefile.am index 0c31f872c..a0dfa7b11 100644 --- a/rpmio/Makefile.am +++ b/rpmio/Makefile.am @@ -14,7 +14,7 @@ librpmio_la_SOURCES = \ argv.c base64.c digest.h digest.c fts.c macro.c \ rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \ rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c url.c ugid.c \ - rpmio_internal.h rpmlua.h rpmhook.h ugid.h fts.h rpmerr.h + rpmio_internal.h rpmlua.h rpmhook.h ugid.h fts.h librpmio_la_LDFLAGS = -release 4.4 librpmio_la_LIBADD = \ ../misc/libmisc.la \ diff --git a/rpmio/macro.c b/rpmio/macro.c index 57c5703aa..5d2eccb24 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -15,7 +15,7 @@ #include "rpmio.h" #include "rpmurl.h" #include "rpmmessages.h" -#include "rpmerr.h" +#include "rpmlog.h" #ifdef WITH_LUA #include "rpmlua.h" diff --git a/rpmio/rpmerr.h b/rpmio/rpmerr.h deleted file mode 100644 index ad76e25df..000000000 --- a/rpmio/rpmerr.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef H_RPMERR -#define H_RPMERR - -/** \ingroup rpmio - * \file rpmio/rpmerr.h - */ - -#include "rpmlog.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define _em(_e) \ - (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_ERR)) -#define _wm(_e) \ - (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_WARNING)) -#define _nm(_e) \ - (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_NOTICE)) -#define _im(_e) \ - (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_INFO)) -#define _dm(_e) \ - (((_e) << 16) | RPMLOG_MAKEPRI(RPMLOG_ERRMSG, RPMLOG_DEBUG)) - -/** - * Tokens used by rpmError(). - */ -typedef enum rpmerrCode_e { - RPMERR_GDBMOPEN = _em(2), /*!< gdbm open failed */ - RPMERR_GDBMREAD = _em(3), /*!< gdbm read failed */ - RPMERR_GDBMWRITE = _em(4), /*!< gdbm write failed */ - RPMERR_INTERNAL = _em(5), /*!< internal RPM error */ - RPMERR_DBCORRUPT = _em(6), /*!< rpm database is corrupt */ - RPMERR_OLDDBCORRUPT = _em(7), /*!< old style rpm database is corrupt */ - RPMERR_OLDDBMISSING = _em(8), /*!< old style rpm database is missing */ - RPMERR_NOCREATEDB = _em(9), /*!< cannot create new database */ - RPMERR_DBOPEN = _em(10), /*!< database open failed */ - RPMERR_DBGETINDEX = _em(11), /*!< database get from index failed */ - RPMERR_DBPUTINDEX = _em(12), /*!< database get from index failed */ - RPMERR_NEWPACKAGE = _em(13), /*!< package is too new to handle */ - RPMERR_BADMAGIC = _em(14), /*!< bad magic for an RPM */ - RPMERR_RENAME = _em(15), /*!< rename(2) failed */ - RPMERR_UNLINK = _em(16), /*!< unlink(2) failed */ - RPMERR_RMDIR = _em(17), /*!< rmdir(2) failed */ - RPMERR_PKGINSTALLED = _em(18), /*!< package already installed */ - RPMERR_CHOWN = _em(19), /*!< chown() call failed */ - RPMERR_NOUSER = _em(20), /*!< user does not exist */ - RPMERR_NOGROUP = _em(21), /*!< group does not exist */ - RPMERR_MKDIR = _em(22), /*!< mkdir() call failed */ - RPMERR_FILECONFLICT = _em(23), /*!< file being installed exists */ - RPMERR_RPMRC = _em(24), /*!< bad line in rpmrc */ - RPMERR_NOSPEC = _em(25), /*!< .spec file is missing */ - RPMERR_NOTSRPM = _em(26), /*!< a source rpm was expected */ - RPMERR_FLOCK = _em(27), /*!< locking the database failed */ - RPMERR_OLDPACKAGE = _em(28), /*!< trying upgrading to old version */ -/* RPMERR_BADARCH = _em(29), bad architecture or arch mismatch */ - RPMERR_CREATE = _em(30), /*!< failed to create a file */ - RPMERR_NOSPACE = _em(31), /*!< out of disk space */ - RPMERR_NORELOCATE = _em(32), /*!< tried to do improper relocatation */ -/* RPMERR_BADOS = _em(33), bad architecture or arch mismatch */ - RPMMESS_BACKUP = _em(34), /*!< backup made during [un]install */ - RPMERR_MTAB = _em(35), /*!< failed to read mount table */ - RPMERR_STAT = _em(36), /*!< failed to stat something */ - RPMERR_BADDEV = _em(37), /*!< file on device not listed in mtab */ - RPMMESS_ALTNAME = _em(38), /*!< file written as .rpmnew */ - RPMMESS_PREREQLOOP = _em(39), /*!< loop in prerequisites */ - RPMERR_BADRELOCATE = _em(40), /*!< bad relocation was specified */ - RPMERR_OLDDB = _em(41), /*!< old format database */ - - RPMERR_UNMATCHEDIF = _em(107), /*!< unclosed %ifarch or %ifos */ - RPMERR_RELOAD = _em(108), /*!< */ - RPMERR_BADARG = _em(109), /*!< */ - RPMERR_SCRIPT = _em(110), /*!< errors related to script exec */ - RPMERR_READ = _em(111), /*!< */ - RPMERR_UNKNOWNOS = _em(112), /*!< */ - RPMERR_UNKNOWNARCH = _em(113), /*!< */ - RPMERR_EXEC = _em(114), /*!< */ - RPMERR_FORK = _em(115), /*!< */ - RPMERR_CPIO = _em(116), /*!< */ - RPMERR_GZIP = _em(117), /*!< */ - RPMERR_BADSPEC = _em(118), /*!< */ - RPMERR_LDD = _em(119), /*!< couldn't understand ldd output */ - RPMERR_BADFILENAME = _em(120), /*!< */ - RPMERR_OPEN = _em(121), /*!< */ - RPMERR_POPEN = _em(122), /*!< */ - RPMERR_NOTREG = _em(123), /*!< File %s is not a regular file */ - RPMERR_QUERY = _em(124), /*!< */ - RPMERR_QFMT = _em(125), /*!< */ - RPMERR_DBCONFIG = _em(126), /*!< */ - RPMERR_DBERR = _em(127), /*!< */ - RPMERR_BADPACKAGE = _em(128), /*!< getNextHeader: %s */ - RPMERR_FREELIST = _em(129), /*!< free list corrupt (%u)- please ... */ - RPMERR_DATATYPE = _em(130), /*!< Data type %d not supported */ - RPMERR_BUILDROOT = _em(131), /*!< */ - RPMERR_MAKETEMP = _em(132), /*!< makeTempFile failed */ - RPMERR_FWRITE = _em(133), /*!< %s: Fwrite failed: %s */ - RPMERR_FREAD = _em(134), /*!< %s: Fread failed: %s */ - RPMERR_READLEAD = _em(135), /*!< %s: readLead failed */ - RPMERR_WRITELEAD = _em(136), /*!< %s: writeLead failed: %s */ - RPMERR_QUERYINFO = _nm(137), /*!< */ - RPMERR_MANIFEST = _nm(138), /*!< %s: read manifest failed: %s */ - RPMERR_BADHEADER = _em(139), /*!< */ - RPMERR_FSEEK = _em(140), /*!< %s: Fseek failed: %s */ - RPMERR_REGCOMP = _em(141), /*!< %s: regcomp failed: %s */ - RPMERR_REGEXEC = _em(142), /*!< %s: regexec failed: %s */ - - RPMERR_BADSIGTYPE = _em(200), /*!< Unknown signature type */ - RPMERR_SIGGEN = _em(201), /*!< Error generating signature */ - RPMERR_SIGVFY = _nm(202), /*!< */ - RPMERR_IMPORT = _em(203), /*!< */ - - RPMDEBUG_UNLINK = _dm(512u+16), /*!< unlink(2) failed */ - RPMDEBUG_RMDIR = _dm(512u+17), /*!< rmdir(2) failed */ - RPMWARN_FLOCK = _wm(512u+27) /*!< locking the database failed */ -} rpmerrCode; - -#ifdef __cplusplus -} -#endif - -#endif /* H_RPMERR */ diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index c4aae2941..a2d6a83e1 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -26,7 +26,7 @@ extern int h_errno; #include "ugid.h" #include "rpmmessages.h" #include "argv.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmmacro.h" #include "debug.h" diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index d73dc0e95..a6118e979 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -3,7 +3,7 @@ #ifdef WITH_LUA #include "rpmio.h" #include "rpmmacro.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "rpmurl.h" #include "rpmhook.h" diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index cb804f4dc..e7f1d9aa1 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -11,7 +11,7 @@ const char *__progname; #include "rpmts.h" #include "manifest.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" static int noDeps = 1; diff --git a/tools/rpmsort.c b/tools/rpmsort.c index 15bada78a..1b1074077 100644 --- a/tools/rpmsort.c +++ b/tools/rpmsort.c @@ -11,7 +11,7 @@ const char *__progname; #include "rpmts.h" #include "manifest.h" -#include "rpmerr.h" +#include "rpmlog.h" #include "debug.h" static int _depends_debug; |