diff --git a/lib/depends.c b/lib/depends.c index 7846c313a2..4cda58722e 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -13,6 +13,7 @@ #include "lib/rpmts_internal.h" #include "lib/rpmte_internal.h" +#include "lib/rpmds_internal.h" #include "lib/misc.h" #include "debug.h" diff --git a/lib/rpmds.h b/lib/rpmds.h index 511cac464d..811ff862fa 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -108,16 +108,6 @@ rpmds rpmdsFree(rpmds ds); */ rpmds rpmdsNew(Header h, rpmTagVal tagN, int flags); -/** \ingroup rpmds - * Create and load a dependency set. - * @param pool shared string pool (or NULL for private pool) - * @param h header - * @param tagN type of dependency - * @param flags unused - * @return new dependency set - */ -rpmds rpmdsNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, int flags); - /** \ingroup rpmds * Return new formatted dependency string. * @param dspfx formatted dependency string prefix @@ -135,17 +125,6 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds); */ rpmds rpmdsThis(Header h, rpmTagVal tagN, rpmsenseFlags Flags); -/** \ingroup rpmds - * Create, load and initialize a dependency for this header. - * @param pool string pool (or NULL for private pool) - * @param h header - * @param tagN type of dependency - * @param Flags comparison flags - * @return new dependency set - */ -rpmds rpmdsThisPool(rpmstrPool pool, - Header h, rpmTagVal tagN, rpmsenseFlags Flags); - /** \ingroup rpmds * Create, load and initialize a dependency set of size 1. * @param tagN type of dependency @@ -156,18 +135,6 @@ rpmds rpmdsThisPool(rpmstrPool pool, */ rpmds rpmdsSingle(rpmTagVal tagN, const char * N, const char * EVR, rpmsenseFlags Flags); -/** \ingroup rpmds - * Create, load and initialize a dependency set of size 1. - * @param pool string pool (or NULL for private pool) - * @param tagN type of dependency - * @param N name - * @param EVR epoch:version-release - * @param Flags comparison flags - * @return new dependency set - */ -rpmds rpmdsSinglePool(rpmstrPool pool, rpmTagVal tagN, - const char * N, const char * EVR, rpmsenseFlags Flags); - /** \ingroup rpmds * Return a new dependency set of size 1 from the current iteration index * @param ds dependency set @@ -204,20 +171,6 @@ int rpmdsSetIx(rpmds ds, int ix); */ const char * rpmdsDNEVR(const rpmds ds); -/** \ingroup rpmds - * Return current dependency name pool id. - * @param ds dependency set - * @return current dependency name id, 0 on invalid - */ -rpmsid rpmdsNId(rpmds ds); - -/** \ingroup rpmds - * Return current dependency epoch-version-release pool id. - * @param ds dependency set - * @return current dependency EVR id, 0 on invalid - */ -rpmsid rpmdsEVRId(rpmds ds); - /** \ingroup rpmds * Return current dependency name. * @param ds dependency set @@ -377,18 +330,6 @@ int rpmdsMatchesDep (const Header h, int ix, const rpmds req, int nopromote); */ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote); -/** \ingroup rpmds - * Swiss army knife dependency matching function. - * @param pool string pool (or NULL for private pool) - * @param h header - * @param prix index to provides (or -1 or any) - * @param req dependency set - * @param selfevr only look at package EVR? - * @param nopromote dont promote epoch in comparison? - * @return 1 if dependency overlaps, 0 otherwise - */ -int rpmdsMatches(rpmstrPool pool, Header h, int prix, - rpmds req, int selfevr, int nopromote); /** * Load rpmlib provides into a dependency set. * @retval *dsp (loaded) depedency set @@ -397,22 +338,6 @@ int rpmdsMatches(rpmstrPool pool, Header h, int prix, */ int rpmdsRpmlib(rpmds * dsp, const void * tblp); -/** - * Load rpmlib provides into a dependency set. - * @param pool shared string pool (or NULL for private pool) - * @retval *dsp (loaded) depedency set - * @param tblp rpmlib provides table (NULL uses internal table) - * @return 0 on success - */ -int rpmdsRpmlibPool(rpmstrPool pool, rpmds * dsp, const void * tblp); - -/** \ingroup rpmds - * Return dependency set string pool handle - * @param ds dependency set - * @return string pool handle (weak reference) - */ -rpmstrPool rpmdsPool(rpmds ds); - #ifdef __cplusplus } #endif diff --git a/lib/rpmds_internal.h b/lib/rpmds_internal.h index d4f24b39df..edd5a0268d 100644 --- a/lib/rpmds_internal.h +++ b/lib/rpmds_internal.h @@ -7,6 +7,90 @@ extern "C" { #endif +/** \ingroup rpmds + * Create and load a dependency set. + * @param pool shared string pool (or NULL for private pool) + * @param h header + * @param tagN type of dependency + * @param flags unused + * @return new dependency set + */ +RPM_GNUC_INTERNAL +rpmds rpmdsNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, int flags); + +/** \ingroup rpmds + * Create, load and initialize a dependency for this header. + * @param pool string pool (or NULL for private pool) + * @param h header + * @param tagN type of dependency + * @param Flags comparison flags + * @return new dependency set + */ +RPM_GNUC_INTERNAL +rpmds rpmdsThisPool(rpmstrPool pool, + Header h, rpmTagVal tagN, rpmsenseFlags Flags); + +/** \ingroup rpmds + * Create, load and initialize a dependency set of size 1. + * @param pool string pool (or NULL for private pool) + * @param tagN type of dependency + * @param N name + * @param EVR epoch:version-release + * @param Flags comparison flags + * @return new dependency set + */ +RPM_GNUC_INTERNAL +rpmds rpmdsSinglePool(rpmstrPool pool, rpmTagVal tagN, + const char * N, const char * EVR, rpmsenseFlags Flags); + +/** + * Load rpmlib provides into a dependency set. + * @param pool shared string pool (or NULL for private pool) + * @retval *dsp (loaded) depedency set + * @param tblp rpmlib provides table (NULL uses internal table) + * @return 0 on success + */ +RPM_GNUC_INTERNAL +int rpmdsRpmlibPool(rpmstrPool pool, rpmds * dsp, const void * tblp); + +/** \ingroup rpmds + * Swiss army knife dependency matching function. + * @param pool string pool (or NULL for private pool) + * @param h header + * @param prix index to provides (or -1 or any) + * @param req dependency set + * @param selfevr only look at package EVR? + * @param nopromote dont promote epoch in comparison? + * @return 1 if dependency overlaps, 0 otherwise + */ +RPM_GNUC_INTERNAL +int rpmdsMatches(rpmstrPool pool, Header h, int prix, + rpmds req, int selfevr, int nopromote); + +/** \ingroup rpmds + * Return current dependency name pool id. + * @param ds dependency set + * @return current dependency name id, 0 on invalid + */ +RPM_GNUC_INTERNAL +rpmsid rpmdsNId(rpmds ds); + +/** \ingroup rpmds + * Return current dependency epoch-version-release pool id. + * @param ds dependency set + * @return current dependency EVR id, 0 on invalid + */ +RPM_GNUC_INTERNAL +rpmsid rpmdsEVRId(rpmds ds); + +/** \ingroup rpmds + * Return dependency set string pool handle + * @param ds dependency set + * @return string pool handle (weak reference) + */ +RPM_GNUC_INTERNAL +rpmstrPool rpmdsPool(rpmds ds); + RPM_GNUC_INTERNAL rpmsid rpmdsNIdIndex(rpmds ds, int i); diff --git a/lib/rpmfi.h b/lib/rpmfi.h index cb85e88436..c526c90cab 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -147,20 +147,6 @@ int rpmfiDX(rpmfi fi); */ int rpmfiSetDX(rpmfi fi, int dx); -/** \ingroup rpmfi - * Return current base name pool id from file info set. - * @param fi file info set - * @return current base name id, 0 on invalid - */ -rpmsid rpmfiBNId(rpmfi fi); - -/** \ingroup rpmfi - * Return current directory name pool id from file info set. - * @param fi file info set - * @return current base name id, 0 on invalid - */ -rpmsid rpmfiDNId(rpmfi fi); - /** \ingroup rpmfi * Return current base name from file info set. * @param fi file info set @@ -434,16 +420,6 @@ typedef rpmFlags rpmfiFlags; */ rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags); -/** \ingroup rpmfi - * Create and load a file info set. - * @param pool shared string pool (or NULL for private pool) - * @param h header - * @param tagN unused - * @param flags Flags to control what information is loaded. - * @return new file info set - */ -rpmfi rpmfiNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags); - /** \ingroup rpmfi * Return file type from mode_t. * @param mode file mode bits (from header) @@ -475,13 +451,6 @@ rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing); */ int rpmfiConfigConflict(const rpmfi fi); -/** \ingroup rpmfi - * Return file info set string pool handle - * @param fi file info - * @return string pool handle (weak reference) - */ -rpmstrPool rpmfiPool(rpmfi fi); - #ifdef __cplusplus } #endif diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index 24662e6b05..19484ec5ac 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -72,6 +72,41 @@ struct rpmfi_s { extern "C" { #endif +/** \ingroup rpmfi + * Create and load a file info set. + * @param pool shared string pool (or NULL for private pool) + * @param h header + * @param tagN unused + * @param flags Flags to control what information is loaded. + * @return new file info set + */ +RPM_GNUC_INTERNAL +rpmfi rpmfiNewPool(rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags); + +/** \ingroup rpmfi + * Return file info set string pool handle + * @param fi file info + * @return string pool handle (weak reference) + */ +RPM_GNUC_INTERNAL +rpmstrPool rpmfiPool(rpmfi fi); + +/** \ingroup rpmfi + * Return current base name pool id from file info set. + * @param fi file info set + * @return current base name id, 0 on invalid + */ +RPM_GNUC_INTERNAL +rpmsid rpmfiBNId(rpmfi fi); + +/** \ingroup rpmfi + * Return current directory name pool id from file info set. + * @param fi file info set + * @return current base name id, 0 on invalid + */ +RPM_GNUC_INTERNAL +rpmsid rpmfiDNId(rpmfi fi); + RPM_GNUC_INTERNAL int rpmfiDIIndex(rpmfi fi, int dx); diff --git a/lib/rpmte.c b/lib/rpmte.c index 35b8e3e8be..6afd69e97f 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -15,6 +15,10 @@ #include "lib/rpmplugins.h" #include "lib/rpmte_internal.h" +/* strpool-related interfaces */ +#include "lib/rpmfi_internal.h" +#include "lib/rpmds_internal.h" +#include "lib/rpmts_internal.h" #include "debug.h" diff --git a/lib/rpmts.h b/lib/rpmts.h index 2f0dcaff83..0b8d970e79 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -526,13 +526,6 @@ int rpmtsSetNotifyCallback(rpmts ts, */ rpmts rpmtsCreate(void); -/** \ingroup rpmts - * Return transaction global string pool handle - * @param ts transaction set - * @return string pool handle (weak ref) - */ -rpmstrPool rpmtsPool(rpmts ts); - /** \ingroup rpmts * Add package to be installed to transaction set. * diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h index 39511d0e3d..a22c892672 100644 --- a/lib/rpmts_internal.h +++ b/lib/rpmts_internal.h @@ -75,6 +75,14 @@ struct rpmts_s { extern "C" { #endif +/** \ingroup rpmts + * Return transaction global string pool handle + * @param ts transaction set + * @return string pool handle (weak ref) + */ +RPM_GNUC_INTERNAL +rpmstrPool rpmtsPool(rpmts ts); + RPM_GNUC_INTERNAL tsMembers rpmtsMembers(rpmts ts); diff --git a/lib/transaction.c b/lib/transaction.c index c05d3af3b4..facc36a7b5 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -16,6 +16,7 @@ #include "lib/misc.h" #include "lib/rpmchroot.h" #include "lib/rpmlock.h" +#include "lib/rpmds_internal.h" #include "lib/rpmfi_internal.h" /* only internal apis */ #include "lib/rpmte_internal.h" /* only internal apis */ #include "lib/rpmts_internal.h"