RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 26-Jul-2007 02:58:57
Branch: HEAD Handle: 2007072601585601
Modified files:
rpm CHANGES
rpm/lib formats.c rpmlib.h
Log:
- add RPMTAG_DBINSTANCE header extension.
Summary:
Revision Changes Path
1.1523 +1 -0 rpm/CHANGES
2.102 +32 -0 rpm/lib/formats.c
2.427 +1 -0 rpm/lib/rpmlib.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1522 -r1.1523 CHANGES
--- rpm/CHANGES 25 Jul 2007 17:02:34 -0000 1.1522
+++ rpm/CHANGES 26 Jul 2007 00:58:56 -0000 1.1523
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: add RPMTAG_DBINSTANCE header extension.
- jbj: rip deep ia64 emulated triarch multilib hacks. worth millions to vendor, not me.
- jbj: rip Depends index and dependency result caching.
- rse: ported to DragonFly BSD (1.8.1)
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/formats.c
============================================================================
$ cvs diff -u -r2.101 -r2.102 formats.c
--- rpm/lib/formats.c 20 Jul 2007 00:57:43 -0000 2.101
+++ rpm/lib/formats.c 26 Jul 2007 00:58:57 -0000 2.102
@@ -1571,6 +1571,37 @@
return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData);
}
+/**
+ * Retrieve db instance from header.
+ * @param h header
+ * @retval *type tag type
+ * @retval *data tag value
+ * @retval *count no. of data items
+ * @retval *freeData data-was-malloc'ed indicator
+ * @return 0 on success
+ */
+static int dbinstanceTag(Header h, /*@out@*/ rpmTagType * type,
+ /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
+ /*@out@*/ int * freeData)
+ /*@globals rpmGlobalMacroContext, h_errno,
+ fileSystem, internalState @*/
+ /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext,
+ fileSystem, internalState @*/
+ /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
+ /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+{
+ int_32 * valuep = xcalloc(1, sizeof(*valuep));
+
+ *valuep = headerGetInstance(h);
+
+ *type = RPM_INT32_TYPE;
+ *data = valuep;
+ *count = 1;
+ *freeData = 1;
+
+ return 0;
+}
+
/*@-type@*/ /* FIX: cast? */
const struct headerSprintfExtension_s rpmHeaderFormats[] = {
{ HEADER_EXT_TAG, "RPMTAG_CHANGELOGNAME", { changelognameTag } },
@@ -1592,6 +1623,7 @@
{ HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } },
{ HEADER_EXT_TAG, "RPMTAG_TRIGGERCONDS", { triggercondsTag } },
{ HEADER_EXT_TAG, "RPMTAG_TRIGGERTYPE", { triggertypeTag } },
+ { HEADER_EXT_TAG, "RPMTAG_DBINSTANCE", { dbinstanceTag } },
{ HEADER_EXT_FORMAT, "armor", { armorFormat } },
{ HEADER_EXT_FORMAT, "base64", { base64Format } },
{ HEADER_EXT_FORMAT, "depflags", { depflagsFormat } },
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmlib.h
============================================================================
$ cvs diff -u -r2.426 -r2.427 rpmlib.h
--- rpm/lib/rpmlib.h 16 Jul 2007 01:32:28 -0000 2.426
+++ rpm/lib/rpmlib.h 26 Jul 2007 00:58:57 -0000 2.427
@@ -426,6 +426,7 @@
RPMTAG_REQUIREATTRSX = 1192, /* i[] (unimplemented) */
RPMTAG_BUILDPROVIDES = 1193, /* internal */
RPMTAG_BUILDOBSOLETES = 1194, /* internal */
+ RPMTAG_DBINSTANCE = 1195, /* i */
/*@-enummemuse@*/
RPMTAG_FIRSTFREE_TAG /*!< internal */
@@ .
Received on Thu Jul 26 02:58:57 2007