diff options
author | jbj <devnull@localhost> | 2000-06-09 21:24:37 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-06-09 21:24:37 +0000 |
commit | 4afe94756b1d4960b946c88912b458c04c856e9e (patch) | |
tree | 94178233b6e16714eee257b1fd47aef2c5f85945 /lib | |
parent | 685d3e79b097371c7c222a224716e88d38fe30bd (diff) | |
download | librpm-tizen-4afe94756b1d4960b946c88912b458c04c856e9e.tar.gz librpm-tizen-4afe94756b1d4960b946c88912b458c04c856e9e.tar.bz2 librpm-tizen-4afe94756b1d4960b946c88912b458c04c856e9e.zip |
- make librpmio standalone.
CVS patchset: 3824
CVS date: 2000/06/09 21:24:37
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 1 | ||||
-rw-r--r-- | lib/rpmlib.h | 112 |
2 files changed, 3 insertions, 110 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index efc3ca3af..cd90323ec 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -27,7 +27,6 @@ librpm_la_SOURCES = \ rpmlead.c rpmrc.c signature.c stringbuf.c stubs.c \ tagName.c tagtable.c transaction.c uninstall.c verify.c librpm_la_LDFLAGS = -L$(top_builddir)/rpmio/.libs -lrpmio -# -L$(top_builddir)/popt -lpopt librpm_la_LIBADD = $(subst .c,.lo,$(DBLIBOBJS)) # XXX Drill out -L ldflags remnants until libtool-1.4 appears diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 625ab3f1f..a39cbd708 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -6,6 +6,8 @@ /* and it shouldn't need these :-( */ #include "rpmio.h" +#include "rpmmessages.h" +#include "rpmerr.h" #include "header.h" #include "popt.h" @@ -320,26 +322,10 @@ void rpmSetMachine(const char * arch, const char * os); void rpmGetMachine( /*@out@*/ const char **arch, /*@out@*/ const char **os); void rpmFreeRpmrc(void); +/* ==================================================================== */ /** **/ - typedef /*@abstract@*/ struct rpmdb_s * rpmdb; -typedef enum rpmCallbackType_e { - RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START, - RPMCALLBACK_INST_OPEN_FILE, RPMCALLBACK_INST_CLOSE_FILE, - RPMCALLBACK_TRANS_PROGRESS, RPMCALLBACK_TRANS_START, RPMCALLBACK_TRANS_STOP, - RPMCALLBACK_UNINST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP -} rpmCallbackType; - -typedef void * (*rpmCallbackFunction)(const Header h, - const rpmCallbackType what, - const unsigned long amount, - const unsigned long total, - const void * pkgKey, void * data); - -void urlSetCallback(rpmCallbackFunction notify, void *notifyData, int notifyCount); - -/* ==================================================================== */ /** * @param dbp address of rpm database */ @@ -654,24 +640,6 @@ int rpmRunTransactions(rpmTransactionSet ts, rpmCallbackFunction notify, #define RPMPROB_FILTER_OLDPACKAGE (1 << 6) #define RPMPROB_FILTER_DISKSPACE (1 << 7) -/** messages.c **/ - -#define RPMMESS_DEBUG 1 -#define RPMMESS_VERBOSE 2 -#define RPMMESS_NORMAL 3 -#define RPMMESS_WARNING 4 -#define RPMMESS_ERROR 5 -#define RPMMESS_FATALERROR 6 - -#define RPMMESS_QUIET (RPMMESS_NORMAL + 1) - -void rpmIncreaseVerbosity(void); -void rpmSetVerbosity(int level); -int rpmGetVerbosity(void); -int rpmIsVerbose(void); -int rpmIsDebug(void); -void rpmMessage(int level, const char * format, ...); - /** rpmlead.c **/ #define RPMLEAD_BINARY 0 @@ -708,80 +676,6 @@ struct oldrpmlead { /* for version 1 packages */ unsigned int archiveOffset; } ; -/** rpmerr.c **/ - -typedef void (*rpmErrorCallBackType)(void); - -#if defined(__GNUC__) -void rpmError(int code, char * format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#else -void rpmError(int code, char * format, ...); -#endif - -int rpmErrorCode(void); -char *rpmErrorCodeString(void); -char *rpmErrorString(void); -rpmErrorCallBackType rpmErrorSetCallback(rpmErrorCallBackType); - -#define RPMERR_GDBMOPEN -2 /* gdbm open failed */ -#define RPMERR_GDBMREAD -3 /* gdbm read failed */ -#define RPMERR_GDBMWRITE -4 /* gdbm write failed */ -#define RPMERR_INTERNAL -5 /* internal RPM error */ -#define RPMERR_DBCORRUPT -6 /* rpm database is corrupt */ -#define RPMERR_OLDDBCORRUPT -7 /* old style rpm database is corrupt */ -#define RPMERR_OLDDBMISSING -8 /* old style rpm database is missing */ -#define RPMERR_NOCREATEDB -9 /* cannot create new database */ -#define RPMERR_DBOPEN -10 /* database open failed */ -#define RPMERR_DBGETINDEX -11 /* database get from index failed */ -#define RPMERR_DBPUTINDEX -12 /* database get from index failed */ -#define RPMERR_NEWPACKAGE -13 /* package is too new to handle */ -#define RPMERR_BADMAGIC -14 /* bad magic for an RPM */ -#define RPMERR_RENAME -15 /* rename(2) failed */ -#define RPMERR_UNLINK -16 /* unlink(2) failed */ -#define RPMERR_RMDIR -17 /* rmdir(2) failed */ -#define RPMERR_PKGINSTALLED -18 /* package already installed */ -#define RPMERR_CHOWN -19 /* chown() call failed */ -#define RPMERR_NOUSER -20 /* user does not exist */ -#define RPMERR_NOGROUP -21 /* group does not exist */ -#define RPMERR_MKDIR -22 /* mkdir() call failed */ -#define RPMERR_FILECONFLICT -23 /* file being installed exists */ -#define RPMERR_RPMRC -24 /* bad line in rpmrc */ -#define RPMERR_NOSPEC -25 /* .spec file is missing */ -#define RPMERR_NOTSRPM -26 /* a source rpm was expected */ -#define RPMERR_FLOCK -27 /* locking the database failed */ -#define RPMERR_OLDPACKAGE -28 /* trying upgrading to old version */ -/*#define RPMERR_BADARCH -29 bad architecture or arch mismatch */ -#define RPMERR_CREATE -30 /* failed to create a file */ -#define RPMERR_NOSPACE -31 /* out of disk space */ -#define RPMERR_NORELOCATE -32 /* tried to do improper relocatation */ -/*#define RPMERR_BADOS -33 bad architecture or arch mismatch */ -#define RPMMESS_BACKUP -34 /* backup made during [un]install */ -#define RPMERR_MTAB -35 /* failed to read mount table */ -#define RPMERR_STAT -36 /* failed to stat something */ -#define RPMERR_BADDEV -37 /* file on device not listed in mtab */ -#define RPMMESS_ALTNAME -38 /* file written as .rpmnew */ -#define RPMMESS_PREREQLOOP -39 /* loop in prerequisites */ -#define RPMERR_BADRELOCATE -40 /* bad relocation was specified */ -#define RPMERR_OLDDB -41 /* old format database */ - -/* spec.c build.c pack.c */ -#define RPMERR_UNMATCHEDIF -107 /* unclosed %ifarch or %ifos */ -#define RPMERR_BADARG -109 -#define RPMERR_SCRIPT -110 /* errors related to script exec */ -#define RPMERR_READERROR -111 -#define RPMERR_UNKNOWNOS -112 -#define RPMERR_UNKNOWNARCH -113 -#define RPMERR_EXEC -114 -#define RPMERR_FORK -115 -#define RPMERR_CPIO -116 -#define RPMERR_GZIP -117 -#define RPMERR_BADSPEC -118 -#define RPMERR_LDD -119 /* couldn't understand ldd output */ -#define RPMERR_BADFILENAME -120 - -#define RPMERR_BADSIGTYPE -200 /* Unknown signature type */ -#define RPMERR_SIGGEN -201 /* Error generating signature */ - /** signature.c **/ /**************************************************/ |