Hide the strpool-related rpmts/rpmfi/rpmds interfaces out of sight for now
- In the package/transaction related things the strpool is more of an internal implementation detail than an end-goal in itself, move string pool related interfaces of rpmts, rpmfi and rpmds to internal-only APIs for now. The kind interfaces we'll want to eventually export a) dont exist yet and b) are likely to be something very different. - The string pool itself remains exported however, its a handy data structure for all sorts of things and both librpm and librpmbuild heavily use it already.
This commit is contained in:
parent
5ecfdcea4e
commit
3ff6fdd688
|
@ -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"
|
||||
|
|
75
lib/rpmds.h
75
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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
31
lib/rpmfi.h
31
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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue