diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-12 12:28:12 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-12 12:28:12 +0300 |
commit | 90e10708f824ff8e86b0f030d12e14329b1cf2c0 (patch) | |
tree | 7e6acf37286a04ed0d3e9f7ba0729af5a11bb878 /lib | |
parent | a68a5a049e98bc8406c0e7015ad5dadbed39972d (diff) | |
download | rpm-90e10708f824ff8e86b0f030d12e14329b1cf2c0.tar.gz rpm-90e10708f824ff8e86b0f030d12e14329b1cf2c0.tar.bz2 rpm-90e10708f824ff8e86b0f030d12e14329b1cf2c0.zip |
Fixup paths and Makefiles for rpmdb/ elimination
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 141 | ||||
-rw-r--r-- | lib/backend/db3.c | 4 | ||||
-rw-r--r-- | lib/backend/dbconfig.c | 6 | ||||
-rw-r--r-- | lib/backend/sqlite.c | 2 | ||||
-rw-r--r-- | lib/depends.c | 2 | ||||
-rw-r--r-- | lib/fprint.c | 6 | ||||
-rw-r--r-- | lib/fprint.h | 4 | ||||
-rw-r--r-- | lib/hdrNVR.c | 2 | ||||
-rw-r--r-- | lib/header.c | 4 | ||||
-rw-r--r-- | lib/header.h | 2 | ||||
-rw-r--r-- | lib/header_internal.c | 4 | ||||
-rw-r--r-- | lib/header_internal.h | 2 | ||||
-rw-r--r-- | lib/merge.c | 2 | ||||
-rw-r--r-- | lib/package.c | 2 | ||||
-rw-r--r-- | lib/poptDB.c | 2 | ||||
-rw-r--r-- | lib/rpmdb.c | 8 | ||||
-rw-r--r-- | lib/rpmdb.h | 2 | ||||
-rw-r--r-- | lib/rpmhash.c | 4 | ||||
-rw-r--r-- | lib/rpmhash.h | 2 | ||||
-rw-r--r-- | lib/rpmts_internal.h | 2 | ||||
-rw-r--r-- | lib/signature.c | 2 | ||||
-rw-r--r-- | lib/tagname.c | 2 | ||||
-rw-r--r-- | lib/transaction.c | 4 |
23 files changed, 174 insertions, 37 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 4f5e1932e..aac7b2eed 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,8 +1,11 @@ # Makefile for rpm library. +include $(top_srcdir)/rpm.am + AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ AM_CPPFLAGS += @WITH_NSS_INCLUDE@ AM_CPPFLAGS += @WITH_POPT_INCLUDE@ +AM_CPPFLAGS += @WITH_SQLITE3_INCLUDE@ AM_CPPFLAGS += -I$(top_srcdir)/misc AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\"" AM_CPPFLAGS += -DSYSCONFDIR="\"$(sysconfdir)\"" @@ -11,10 +14,17 @@ AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\"" AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"@RPMCONFIGDIR@/rpmpopt-${VERSION}\"" check_PROGRAMS = +CLEANFILES = +EXTRA_DIST = gentagtbl.sh +EXTRA_PROGRAMS = usrlibdir = $(libdir) usrlib_LTLIBRARIES = librpm.la librpm_la_SOURCES = \ + backend/dbconfig.c backend/db3.c \ + hdrNVR.c header.c header_internal.c header_internal.h \ + poptDB.c rpmhash.c rpmhash.h rpmdb.c rpmdb_internal.h \ + fprint.c fprint.h tagname.c tagtbl.c \ cpio.c cpio.h depends.c formats.c fs.c fsm.c fsm.h \ manifest.c manifest.h misc.c package.c \ poptALL.c poptI.c poptQV.c psm.c psm.h query.c \ @@ -24,15 +34,142 @@ librpm_la_SOURCES = \ rpmte.c rpmte_internal.h rpmts.c \ rpmvercmp.c signature.c signature.h transaction.c \ verify.c rpmlock.c rpmlock.h misc.h \ - legacy.c legacy.h + legacy.c legacy.h merge.c +if SQLITE3 +librpm_la_SOURCES += backend/sqlite.c +endif librpm_la_LDFLAGS = -release 4.6 librpm_la_LIBADD = \ - $(top_builddir)/rpmdb/librpmdb.la \ $(top_builddir)/rpmio/librpmio.la \ @WITH_NSS_LIB@ \ @WITH_POPT_LIB@ \ @WITH_SELINUX_LIB@ \ + @WITH_SQLITE3_LIB@ \ @LIBINTL@ +if WITH_INTERNAL_DB +librpm_la_LIBADD += $(libdb_la) +else +librpm_la_LIBADD += @WITH_DB_LIB@ +endif + +tagtbl.c: Makefile.am $(top_srcdir)/lib/rpmtag.h gentagtbl.sh + @AWK=${AWK} ${SHELL} gentagtbl.sh $(top_srcdir)/lib/rpmtag.h > $@ +BUILT_SOURCES = tagtbl.c + +if WITH_INTERNAL_DB +# XXX watchout, $(top_builddir)/db3/libdb.la created by this Makefile may surprise +libdb_la = $(top_builddir)/db3/libdb.la + +# XXX grrr, force noinst libdb.la for db3. +# there are more reliable ways to get the BDB version info, just a dirty +# hack for now... +BDBVER = $(shell grep ^LIBVERSION $(top_builddir)/db3/Makefile|cut -f2) +$(libdb_la): $(top_builddir)/db3/libdb-$(BDBVER).la + sed -e"/^libdir=/s/^.*$$/libdir=''/" \ + < $(top_builddir)/db3/libdb-$(BDBVER).la > $(libdb_la) +CLEANFILES += $(libdb_la) + +rpmlibexec_PROGRAMS = + +rpmlibexec_PROGRAMS += rpmdb_archive +rpmdb_archive_SOURCES = +rpmdb_archive_LDADD = \ + $(top_builddir)/db3/db_archive.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_checkpoint +rpmdb_checkpoint_SOURCES = +rpmdb_checkpoint_LDADD = \ + $(top_builddir)/db3/db_checkpoint.o \ + $(top_builddir)/db3/util_log.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_deadlock +rpmdb_deadlock_SOURCES = +rpmdb_deadlock_LDADD = \ + $(top_builddir)/db3/db_deadlock.o \ + $(top_builddir)/db3/util_log.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_dump +rpmdb_dump_SOURCES = +rpmdb_dump_LDADD = \ + $(top_builddir)/db3/db_dump.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_load +rpmdb_load_SOURCES = +rpmdb_load_LDADD = \ + $(top_builddir)/db3/db_load.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_printlog +rpmdb_printlog_SOURCES = +rpmdb_printlog_LDADD = \ + $(top_builddir)/db3/db_printlog.o \ + $(top_builddir)/db3/btree_autop.o \ + $(top_builddir)/db3/crdel_autop.o \ + $(top_builddir)/db3/db_autop.o \ + $(top_builddir)/db3/dbreg_autop.o \ + $(top_builddir)/db3/fileops_autop.o \ + $(top_builddir)/db3/hash_autop.o \ + $(top_builddir)/db3/qam_autop.o \ + $(top_builddir)/db3/rep_autop.o \ + $(top_builddir)/db3/txn_autop.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_recover +rpmdb_recover_SOURCES = +rpmdb_recover_LDADD = \ + $(top_builddir)/db3/db_recover.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_stat +rpmdb_stat_SOURCES = +rpmdb_stat_LDADD = \ + $(top_builddir)/db3/db_stat.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_svc +rpmdb_svc_SOURCES = +rpmdb_svc_LDADD = \ + $(top_builddir)/db3/db_server_proc.o \ + $(top_builddir)/db3/db_server_svc.o \ + $(top_builddir)/db3/db_server_util.o \ + $(top_builddir)/db3/gen_db_server.o \ + $(top_builddir)/db3/util_log.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_upgrade +rpmdb_upgrade_SOURCES = +rpmdb_upgrade_LDADD = \ + $(top_builddir)/db3/db_upgrade.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la + +rpmlibexec_PROGRAMS += rpmdb_verify +rpmdb_verify_SOURCES = +rpmdb_verify_LDADD = \ + $(top_builddir)/db3/db_verify.o \ + $(top_builddir)/db3/util_cache.o \ + $(top_builddir)/db3/util_sig.o \ + librpm.la +endif + +CLEANFILES += $(BUILT_SOURCES) diff --git a/lib/backend/db3.c b/lib/backend/db3.c index e1983de41..05c7d8284 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -1,5 +1,5 @@ /** \ingroup db3 - * \file rpmdb/db3.c + * \file lib/db3.c */ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */ @@ -15,7 +15,7 @@ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */ #include <rpm/rpmfileutil.h> /* rpmioMkPath */ #include <rpm/rpmlog.h> -#include "rpmdb/rpmdb_internal.h" +#include "lib/rpmdb_internal.h" #include "debug.h" diff --git a/lib/backend/dbconfig.c b/lib/backend/dbconfig.c index fc75af3bf..fd7e11aef 100644 --- a/lib/backend/dbconfig.c +++ b/lib/backend/dbconfig.c @@ -1,5 +1,5 @@ /** \ingroup rpmdb - * \file rpmdb/dbconfig.c + * \file lib/dbconfig.c */ #include "system.h" @@ -11,7 +11,7 @@ #include <rpm/rpmstring.h> #include <rpm/rpmlog.h> #include <rpm/argv.h> -#include "rpmdb/rpmdb_internal.h" +#include "lib/rpmdb_internal.h" #include "debug.h" @@ -402,7 +402,7 @@ dbiIndex db3New(rpmdb rpmdb, rpmTag rpmtag) if (!(dbi->dbi_perms & 0600)) dbi->dbi_perms = 0644; dbi->dbi_mode = rpmdb->db_mode; - /* FIX: figger rpmdb/dbi refcounts */ + /* FIX: figger lib/dbi refcounts */ dbi->dbi_rpmdb = rpmdb; dbi->dbi_rpmtag = rpmtag; diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c index e290a5b25..5178c8711 100644 --- a/lib/backend/sqlite.c +++ b/lib/backend/sqlite.c @@ -35,7 +35,7 @@ #include <rpm/rpmstring.h> #include <rpm/rpmdb.h> -#include "rpmdb/rpmdb_internal.h" +#include "lib/rpmdb_internal.h" #include "debug.h" diff --git a/lib/depends.c b/lib/depends.c index 614cf5abc..dbd128d84 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -14,7 +14,7 @@ #include <rpm/rpmds.h> #include <rpm/rpmfi.h> -#include "rpmdb/rpmdb_internal.h" /* XXX response cache needs dbiOpen et al. */ +#include "lib/rpmdb_internal.h" /* XXX response cache needs dbiOpen et al. */ #include "lib/rpmte_internal.h" /* XXX tsortInfo_s */ #include "lib/rpmts_internal.h" diff --git a/lib/fprint.c b/lib/fprint.c index b1996689c..2f757ddfe 100644 --- a/lib/fprint.c +++ b/lib/fprint.c @@ -1,13 +1,13 @@ /** - * \file rpmdb/fprint.c + * \file lib/fprint.c */ #include "system.h" #include <rpm/rpmfileutil.h> /* for rpmCleanPath */ -#include "rpmdb/rpmdb_internal.h" -#include "rpmdb/fprint.h" +#include "lib/rpmdb_internal.h" +#include "lib/fprint.h" #include "debug.h" fingerPrintCache fpCacheCreate(int sizeHint) diff --git a/lib/fprint.h b/lib/fprint.h index 3e478fbbe..36f1f59ae 100644 --- a/lib/fprint.h +++ b/lib/fprint.h @@ -2,12 +2,12 @@ #define H_FINGERPRINT /** \ingroup rpmtrans - * \file rpmdb/fprint.h + * \file lib/fprint.h * Identify a file name path by a unique "finger print". */ #include <rpm/header.h> -#include "rpmdb/rpmhash.h" +#include "lib/rpmhash.h" /** */ diff --git a/lib/hdrNVR.c b/lib/hdrNVR.c index 367d165a1..0238f981f 100644 --- a/lib/hdrNVR.c +++ b/lib/hdrNVR.c @@ -1,5 +1,5 @@ /** \ingroup rpmdb - * \file rpmdb/hdrNVR.c + * \file lib/hdrNVR.c */ #include "system.h" diff --git a/lib/header.c b/lib/header.c index 1639c4313..890d12013 100644 --- a/lib/header.c +++ b/lib/header.c @@ -1,5 +1,5 @@ /** \ingroup header - * \file rpmdb/header.c + * \file lib/header.c */ /* RPM - Copyright (C) 1995-2002 Red Hat Software */ @@ -13,7 +13,7 @@ #include <rpm/rpmtag.h> #include <rpm/rpmstring.h> #include <rpm/rpmpgp.h> -#include "rpmdb/header_internal.h" +#include "lib/header_internal.h" #include "debug.h" diff --git a/lib/header.h b/lib/header.h index 19dd0a53f..9a2f223d0 100644 --- a/lib/header.h +++ b/lib/header.h @@ -2,7 +2,7 @@ #define H_HEADER /** \ingroup header - * \file rpmdb/header.h + * \file lib/header.h * * An rpm header carries all information about a package. A header is * a collection of data elements called tags. Each tag has a data type, diff --git a/lib/header_internal.c b/lib/header_internal.c index 1af4bc0ab..a48351437 100644 --- a/lib/header_internal.c +++ b/lib/header_internal.c @@ -1,11 +1,11 @@ /** \ingroup header - * \file rpmdb/header_internal.c + * \file lib/header_internal.c */ #include "system.h" #include <rpm/rpmtag.h> -#include "rpmdb/header_internal.h" +#include "lib/header_internal.h" #include "debug.h" diff --git a/lib/header_internal.h b/lib/header_internal.h index f789fbbbe..c866caf5d 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -2,7 +2,7 @@ #define H_HEADER_INTERNAL /** \ingroup header - * \file rpmdb/header_internal.h + * \file lib/header_internal.h */ #include <netinet/in.h> diff --git a/lib/merge.c b/lib/merge.c index 02f922d7f..b4163e235 100644 --- a/lib/merge.c +++ b/lib/merge.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94"; */ #include "system.h" -#include "rpmdb/rpmdb_internal.h" /* XXX for mergesort */ +#include "lib/rpmdb_internal.h" /* XXX for mergesort */ #define ISIZE sizeof(int) #define PSIZE sizeof(unsigned char *) diff --git a/lib/package.c b/lib/package.c index 1bea015ba..143923df2 100644 --- a/lib/package.c +++ b/lib/package.c @@ -16,7 +16,7 @@ #include "lib/signature.h" #include "rpmio/digest.h" #include "rpmio/rpmio_internal.h" /* fd*Digest(), fd stats */ -#include "rpmdb/header_internal.h" /* XXX headerCheck */ +#include "lib/header_internal.h" /* XXX headerCheck */ #include "debug.h" diff --git a/lib/poptDB.c b/lib/poptDB.c index db3266306..3dfc9642e 100644 --- a/lib/poptDB.c +++ b/lib/poptDB.c @@ -1,5 +1,5 @@ /** \ingroup rpmcli - * \file rpmdb/poptDB.c + * \file lib/poptDB.c * Popt tables for database modes. */ diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 72d86adee..a8c94868d 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -1,5 +1,5 @@ /** \ingroup rpmdb dbi - * \file rpmdb/rpmdb.c + * \file lib/rpmdb.c */ #include "system.h" @@ -27,9 +27,9 @@ #include <rpm/rpmdb.h> #include <rpm/argv.h> -#include "rpmdb/rpmdb_internal.h" -#include "rpmdb/fprint.h" -#include "rpmdb/header_internal.h" /* XXX for HEADERFLAG_ALLOCATED */ +#include "lib/rpmdb_internal.h" +#include "lib/fprint.h" +#include "lib/header_internal.h" /* XXX for HEADERFLAG_ALLOCATED */ #include "debug.h" int _rpmdb_debug = 0; diff --git a/lib/rpmdb.h b/lib/rpmdb.h index 9526133bd..30465eea8 100644 --- a/lib/rpmdb.h +++ b/lib/rpmdb.h @@ -2,7 +2,7 @@ #define H_RPMDB /** \ingroup rpmdb dbi db1 db3 - * \file rpmdb/rpmdb.h + * \file lib/rpmdb.h * Access RPM indices using Berkeley DB interface(s). */ diff --git a/lib/rpmhash.c b/lib/rpmhash.c index c7f7fc506..383697514 100644 --- a/lib/rpmhash.c +++ b/lib/rpmhash.c @@ -1,10 +1,10 @@ /** - * \file rpmdb/rpmhash.c + * \file lib/rpmhash.c * Hash table implemenation */ #include "system.h" -#include "rpmdb/rpmhash.h" +#include "lib/rpmhash.h" #include "debug.h" typedef const void * voidptr; diff --git a/lib/rpmhash.h b/lib/rpmhash.h index 5e840bd5a..a2008717e 100644 --- a/lib/rpmhash.h +++ b/lib/rpmhash.h @@ -2,7 +2,7 @@ #define H_RPMHASH /** - * \file rpmdb/rpmhash.h + * \file lib/rpmhash.h * Hash table implemenation. */ diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h index 7e0fd4519..6c662e481 100644 --- a/lib/rpmts_internal.h +++ b/lib/rpmts_internal.h @@ -4,7 +4,7 @@ #include <rpm/rpmts.h> #include <rpm/rpmal.h> /* XXX availablePackage/relocateFileList ,*/ -#include "rpmdb/rpmhash.h" /* XXX hashTable */ +#include "lib/rpmhash.h" /* XXX hashTable */ /** \ingroup rpmts */ diff --git a/lib/signature.c b/lib/signature.c index 953c1bb30..fe57310c8 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -19,7 +19,7 @@ #include "lib/misc.h" /* XXX for dosetenv() */ #include "lib/rpmlead.h" #include "lib/signature.h" -#include "rpmdb/header_internal.h" +#include "lib/header_internal.h" #include "debug.h" diff --git a/lib/tagname.c b/lib/tagname.c index 2ea0a96b1..c962330ec 100644 --- a/lib/tagname.c +++ b/lib/tagname.c @@ -1,5 +1,5 @@ /** - * \file rpmdb/tagname.c + * \file lib/tagname.c */ #include "system.h" diff --git a/lib/transaction.c b/lib/transaction.c index 685d2b762..471cdc687 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -13,8 +13,8 @@ #include <rpm/rpmstring.h> #include <rpm/argv.h> -#include "rpmdb/rpmdb_internal.h" /* XXX for dbiIndexSetCount */ -#include "rpmdb/fprint.h" +#include "lib/rpmdb_internal.h" /* XXX for dbiIndexSetCount */ +#include "lib/fprint.h" #include "lib/psm.h" #include "lib/rpmlock.h" #include "lib/rpmfi_internal.h" /* fi->replaced, fi->actions... */ |