RPM Package Manager, CVS Repository
/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 12-Aug-2010 15:39:55
Branch: HEAD Handle: 2010081213395401
Added files:
rpm/rpmio rpmbag.c rpmbag.h rpmcvs.c rpmcvs.h rpmgit.c
rpmgit.h rpmsvn.c rpmsvn.h
Modified files:
rpm CHANGES
rpm/rpmio .cvsignore Makefile.am librpmio.vers poptIO.c
rpmio.c
Log:
- stub in bag/svn/cvs/git objects.
Summary:
Revision Changes Path
1.3408 +1 -0 rpm/CHANGES
1.41 +1 -0 rpm/rpmio/.cvsignore
1.283 +7 -7 rpm/rpmio/Makefile.am
2.189 +8 -0 rpm/rpmio/librpmio.vers
1.91 +10 -0 rpm/rpmio/poptIO.c
2.1 +56 -0 rpm/rpmio/rpmbag.c
2.1 +84 -0 rpm/rpmio/rpmbag.h
2.1 +56 -0 rpm/rpmio/rpmcvs.c
2.1 +84 -0 rpm/rpmio/rpmcvs.h
2.1 +56 -0 rpm/rpmio/rpmgit.c
2.1 +84 -0 rpm/rpmio/rpmgit.h
1.227 +7 -0 rpm/rpmio/rpmio.c
2.1 +56 -0 rpm/rpmio/rpmsvn.c
2.1 +84 -0 rpm/rpmio/rpmsvn.h
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.3407 -r1.3408 CHANGES
--- rpm/CHANGES 24 Jul 2010 18:05:48 -0000 1.3407
+++ rpm/CHANGES 12 Aug 2010 13:39:54 -0000 1.3408
@@ -1,4 +1,5 @@
5.3.2 -> 5.4a1:
+ - jbj: stub in bag/svn/cvs/git objects.
- jbj: tpm: stub in client startup code and ttpm executable.
- jbj: tpm: rework the AutoFu through *.pc to set CFLAGS.
- jbj: tpm: glue in an rpmtpm object wrapper.
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/.cvsignore
============================================================================
$ cvs diff -u -r1.40 -r1.41 .cvsignore
--- rpm/rpmio/.cvsignore 30 Jun 2010 22:05:26 -0000 1.40
+++ rpm/rpmio/.cvsignore 12 Aug 2010 13:39:55 -0000 1.41
@@ -55,3 +55,4 @@
tsexp
tsw
ttcl
+ttpm
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/Makefile.am
============================================================================
$ cvs diff -u -r1.282 -r1.283 Makefile.am
--- rpm/rpmio/Makefile.am 9 Aug 2010 11:45:05 -0000 1.282
+++ rpm/rpmio/Makefile.am 12 Aug 2010 13:39:55 -0000 1.283
@@ -80,12 +80,12 @@
arirang.h blake.h bmw.h chi.h cubehash.h echo.h edon-r.h fugue.h \
groestl.h hamsi.h jh.h keccak.h lane.h luffa.h md2.h md6.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
- poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbc.h rpmbf.h rpmbz.h \
- rpmcdsa.h rpmcudf.h rpmdav.h rpmdir.h rpmficl.h rpmgc.h rpmhash.h \
+ poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbf.h rpmbz.h \
+ rpmcdsa.h rpmcudf.h rpmcvs.h rpmdav.h rpmdir.h rpmficl.h rpmgc.h rpmgit.h rpmhash.h \
rpmhkp.h rpmhook.h rpmio_internal.h rpmjs.h rpmjsio.h rpmkeyring.h \
rpmku.h rpmltc.h rpmlua.h rpmmg.h rpmnix.h rpmnss.h \
rpmperl.h rpmpython.h rpmruby.h rpmsm.h rpmsp.h \
- rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h rpmsx.h rpmsyck.h \
+ rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h rpmsvn.h rpmsx.h rpmsyck.h \
rpmtcl.h rpmtpm.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \
tar.h ugid.h rpmio-stub.h
@@ -98,14 +98,14 @@
arirang.c blake.c bmw.c chi.c cubehash.c echo.c edon-r.c fugue.c \
groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c \
salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
- rpmacl.c rpmasn.c rpmaug.c rpmbc.c rpmbf.c rpmcdsa.c rpmcudf.c \
- rpmdav.c rpmdir.c rpmficl.c rpmgc.c \
+ rpmacl.c rpmasn.c rpmaug.c rpmbag.c rpmbc.c rpmbf.c rpmcdsa.c \
+ rpmcudf.c rpmcvs.c rpmdav.c rpmdir.c rpmficl.c rpmgc.c rpmgit.c \
rpmhash.c rpmhkp.c rpmhook.c rpmio.c rpmiob.c rpmio-stub.c \
rpmjs.c rpmjsio.c rpmkeyring.c rpmku.c \
rpmlog.c rpmltc.c rpmlua.c rpmmalloc.c rpmmg.c rpmnix.c rpmnss.c \
rpmperl.c rpmpgp.c rpmpython.c rpmrpc.c rpmruby.c rpmsm.c rpmsp.c \
- rpmsq.c rpmsql.c rpmsquirrel.c rpmssl.c rpmsw.c rpmsx.c rpmsyck.c \
- rpmtcl.c rpmtpm.c rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \
+ rpmsq.c rpmsql.c rpmsquirrel.c rpmssl.c rpmsvn.c rpmsw.c rpmsx.c \
+ rpmsyck.c rpmtcl.c rpmtpm.c rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \
strcasecmp.c strtolocale.c tar.c url.c ugid.c xzdio.c yarn.c
librpmio_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
if HAVE_LD_VERSION_SCRIPT
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/librpmio.vers
============================================================================
$ cvs diff -u -r2.188 -r2.189 librpmio.vers
--- rpm/rpmio/librpmio.vers 12 Aug 2010 12:44:44 -0000 2.188
+++ rpm/rpmio/librpmio.vers 12 Aug 2010 13:39:55 -0000 2.189
@@ -304,6 +304,8 @@
rpmaugRun;
rpmaugSave;
rpmaugSet;
+ _rpmbag_debug;
+ rpmbagNew;
rpmbcImplVecs;
_rpmbf_debug;
rpmbfFree;
@@ -330,6 +332,8 @@
rpmcudfUniverseSize;
rpmCleanPath;
rpmCLIMacroContext;
+ _rpmcvs_debug;
+ rpmcvsNew;
rpmDefineMacro;
rpmDigestAlgo;
rpmDigestASN1;
@@ -353,6 +357,8 @@
rpmGenPath;
rpmGetMacroEntries;
rpmGetPath;
+ _rpmgit_debug;
+ rpmgitNew;
rpmGlob;
rpmGlobalMacroContext;
_rpmhkpI;
@@ -575,6 +581,8 @@
rpmsquirrelRun;
rpmsquirrelRunFile;
rpmsslImplVecs;
+ _rpmsvn_debug;
+ rpmsvnNew;
_rpmsw_stats;
rpmswAdd;
rpmswDiff;
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/poptIO.c
============================================================================
$ cvs diff -u -r1.90 -r1.91 poptIO.c
--- rpm/rpmio/poptIO.c 24 Jul 2010 14:12:18 -0000 1.90
+++ rpm/rpmio/poptIO.c 12 Aug 2010 13:39:55 -0000 1.91
@@ -30,8 +30,10 @@
#include <rpmtpm.h>
#include <rpmaug.h>
+#include <rpmbag.h>
#include <rpmbf.h>
#include <rpmcudf.h>
+#include <rpmcvs.h>
#include <rpmficl.h>
#include <rpmhkp.h>
#include <rpmjs.h>
@@ -41,6 +43,8 @@
#include <rpmruby.h>
#include <rpmsql.h>
#include <rpmsquirrel.h>
+#include <rpmsvn.h>
+extern int _rpmsvn_debug;
#include <rpmtcl.h>
#include <rpmsm.h>
@@ -624,6 +628,12 @@
{ "rpmasndebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmasn_debug, -1,
N_("Debug embedded ASN.1 interpreter"), NULL},
+ { "rpmbagdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbag_debug, -1,
+ N_("Debug depsolver wrappers "), NULL},
+ { "rpmcvsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmcvs_debug, -1,
+ N_("Debug CVS wrappers "), NULL},
+ { "rpmsvndebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmsvn_debug, -1,
+ N_("Debug Subversion wrappers "), NULL},
{ "rpmtpmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmtpm_debug, -1,
N_("Debug TPM emulator"), NULL},
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmbag.c
============================================================================
$ cvs diff -u -r0 -r2.1 rpmbag.c
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmbag.c 2010-08-12 15:39:55.628126729 +0200
@@ -0,0 +1,56 @@
+/** \ingroup rpmio
+ * \file rpmio/rpmbag.c
+ */
+
+#include "system.h"
+
+#include <rpmiotypes.h>
+#include <rpmio.h> /* for *Pool methods */
+#include <rpmlog.h>
+#include <rpmurl.h>
+#define _RPMBAG_INTERNAL
+#include <rpmbag.h>
+
+#include "debug.h"
+
+/*@unchecked@*/
+int _rpmbag_debug = 0;
+
+static void rpmbagFini(void * _bag)
+ /*@globals fileSystem @*/
+ /*@modifies *_bag, fileSystem @*/
+{
+ rpmbag bag = _bag;
+
+ bag->fn = _free(bag->fn);
+}
+
+/*@unchecked@*/ /*@only@*/ /*@null@*/
+rpmioPool _rpmbagPool = NULL;
+
+static rpmbag rpmbagGetPool(/*@null@*/ rpmioPool pool)
+ /*@globals _rpmbagPool, fileSystem @*/
+ /*@modifies pool, _rpmbagPool, fileSystem @*/
+{
+ rpmbag bag;
+
+ if (_rpmbagPool == NULL) {
+ _rpmbagPool = rpmioNewPool("bag", sizeof(*bag), -1, _rpmbag_debug,
+ NULL, NULL, rpmbagFini);
+ pool = _rpmbagPool;
+ }
+ bag = (rpmbag) rpmioGetPool(pool, sizeof(*bag));
+ memset(((char *)bag)+sizeof(bag->_item), 0, sizeof(*bag)-sizeof(bag->_item));
+ return bag;
+}
+
+rpmbag rpmbagNew(const char * fn, int flags)
+{
+ rpmbag bag = rpmbagGetPool(_rpmbagPool);
+ int xx;
+
+ if (fn)
+ bag->fn = xstrdup(fn);
+
+ return rpmbagLink(bag);
+}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmbag.h
============================================================================
$ cvs diff -u -r0 -r2.1 rpmbag.h
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmbag.h 2010-08-12 15:39:55.658128864 +0200
@@ -0,0 +1,84 @@
+#ifndef H_RPMBAG
+#define H_RPMBAG
+
+/** \ingroup rpmio
+ * \file rpmio/rpmbag.h
+ */
+
+/** \ingroup rpmio
+ */
+/*@unchecked@*/
+extern int _rpmbag_debug;
+
+/** \ingroup rpmio
+ */
+typedef /*@refcounted@*/ struct rpmbag_s * rpmbag;
+
+#if defined(_RPMBAG_INTERNAL)
+
+/** \ingroup rpmio
+ */
+struct rpmbag_s {
+ struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
+ const char * fn;
+#if defined(__LCLINT__)
+/*@refs@*/
+ int nrefs; /*!< (unused) keep splint happy */
+#endif
+};
+#endif /* _RPMBAG_INTERNAL */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Unreference a bag wrapper instance.
+ * @param bag bag wrapper
+ * @return NULL on last dereference
+ */
+/*@unused@*/ /*@null@*/
+rpmbag rpmbagUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmbag bag)
+ /*@modifies bag @*/;
+#define rpmbagUnlink(_bag) \
+ ((rpmbag)rpmioUnlinkPoolItem((rpmioItem)(_bag), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Reference a bag wrapper instance.
+ * @param bag bag wrapper
+ * @return new bag wrapper reference
+ */
+/*@unused@*/ /*@newref@*/ /*@null@*/
+rpmbag rpmbagLink (/*@null@*/ rpmbag bag)
+ /*@modifies bag @*/;
+#define rpmbagLink(_bag) \
+ ((rpmbag)rpmioLinkPoolItem((rpmioItem)(_bag), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Destroy a bag wrapper.
+ * @param bag bag wrapper
+ * @return NULL on last dereference
+ */
+/*@null@*/
+rpmbag rpmbagFree(/*@killref@*/ /*@null@*/rpmbag bag)
+ /*@globals fileSystem @*/
+ /*@modifies bag, fileSystem @*/;
+#define rpmbagFree(_bag) \
+ ((rpmbag)rpmioFreePoolItem((rpmioItem)(_bag), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Create and load a bag wrapper.
+ * @param fn bag file
+ * @param flags bag flags
+ * @return new bag wrapper
+ */
+/*@newref@*/ /*@null@*/
+rpmbag rpmbagNew(const char * fn, int flags)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_RPMBAG */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmcvs.c
============================================================================
$ cvs diff -u -r0 -r2.1 rpmcvs.c
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmcvs.c 2010-08-12 15:39:55.688129602 +0200
@@ -0,0 +1,56 @@
+/** \ingroup rpmio
+ * \file rpmio/rpmcvs.c
+ */
+
+#include "system.h"
+
+#include <rpmiotypes.h>
+#include <rpmio.h> /* for *Pool methods */
+#include <rpmlog.h>
+#include <rpmurl.h>
+#define _RPMCVS_INTERNAL
+#include <rpmcvs.h>
+
+#include "debug.h"
+
+/*@unchecked@*/
+int _rpmcvs_debug = 0;
+
+static void rpmcvsFini(void * _cvs)
+ /*@globals fileSystem @*/
+ /*@modifies *_cvs, fileSystem @*/
+{
+ rpmcvs cvs = _cvs;
+
+ cvs->fn = _free(cvs->fn);
+}
+
+/*@unchecked@*/ /*@only@*/ /*@null@*/
+rpmioPool _rpmcvsPool = NULL;
+
+static rpmcvs rpmcvsGetPool(/*@null@*/ rpmioPool pool)
+ /*@globals _rpmcvsPool, fileSystem @*/
+ /*@modifies pool, _rpmcvsPool, fileSystem @*/
+{
+ rpmcvs cvs;
+
+ if (_rpmcvsPool == NULL) {
+ _rpmcvsPool = rpmioNewPool("cvs", sizeof(*cvs), -1, _rpmcvs_debug,
+ NULL, NULL, rpmcvsFini);
+ pool = _rpmcvsPool;
+ }
+ cvs = (rpmcvs) rpmioGetPool(pool, sizeof(*cvs));
+ memset(((char *)cvs)+sizeof(cvs->_item), 0, sizeof(*cvs)-sizeof(cvs->_item));
+ return cvs;
+}
+
+rpmcvs rpmcvsNew(const char * fn, int flags)
+{
+ rpmcvs cvs = rpmcvsGetPool(_rpmcvsPool);
+ int xx;
+
+ if (fn)
+ cvs->fn = xstrdup(fn);
+
+ return rpmcvsLink(cvs);
+}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmcvs.h
============================================================================
$ cvs diff -u -r0 -r2.1 rpmcvs.h
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmcvs.h 2010-08-12 15:39:55.728132356 +0200
@@ -0,0 +1,84 @@
+#ifndef H_RPMCVS
+#define H_RPMCVS
+
+/** \ingroup rpmio
+ * \file rpmio/rpmcvs.h
+ */
+
+/** \ingroup rpmio
+ */
+/*@unchecked@*/
+extern int _rpmcvs_debug;
+
+/** \ingroup rpmio
+ */
+typedef /*@refcounted@*/ struct rpmcvs_s * rpmcvs;
+
+#if defined(_RPMCVS_INTERNAL)
+
+/** \ingroup rpmio
+ */
+struct rpmcvs_s {
+ struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
+ const char * fn;
+#if defined(__LCLINT__)
+/*@refs@*/
+ int nrefs; /*!< (unused) keep splint happy */
+#endif
+};
+#endif /* _RPMCVS_INTERNAL */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Unreference a cvs wrapper instance.
+ * @param cvs cvs wrapper
+ * @return NULL on last dereference
+ */
+/*@unused@*/ /*@null@*/
+rpmcvs rpmcvsUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmcvs cvs)
+ /*@modifies cvs @*/;
+#define rpmcvsUnlink(_cvs) \
+ ((rpmcvs)rpmioUnlinkPoolItem((rpmioItem)(_cvs), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Reference a cvs wrapper instance.
+ * @param cvs cvs wrapper
+ * @return new cvs wrapper reference
+ */
+/*@unused@*/ /*@newref@*/ /*@null@*/
+rpmcvs rpmcvsLink (/*@null@*/ rpmcvs cvs)
+ /*@modifies cvs @*/;
+#define rpmcvsLink(_cvs) \
+ ((rpmcvs)rpmioLinkPoolItem((rpmioItem)(_cvs), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Destroy a cvs wrapper.
+ * @param cvs cvs wrapper
+ * @return NULL on last dereference
+ */
+/*@null@*/
+rpmcvs rpmcvsFree(/*@killref@*/ /*@null@*/rpmcvs cvs)
+ /*@globals fileSystem @*/
+ /*@modifies cvs, fileSystem @*/;
+#define rpmcvsFree(_cvs) \
+ ((rpmcvs)rpmioFreePoolItem((rpmioItem)(_cvs), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Create and load a cvs wrapper.
+ * @param fn cvs file
+ * @param flags cvs flags
+ * @return new cvs wrapper
+ */
+/*@newref@*/ /*@null@*/
+rpmcvs rpmcvsNew(const char * fn, int flags)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_RPMCVS */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmgit.c
============================================================================
$ cvs diff -u -r0 -r2.1 rpmgit.c
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmgit.c 2010-08-12 15:39:55.758133653 +0200
@@ -0,0 +1,56 @@
+/** \ingroup rpmio
+ * \file rpmio/rpmgit.c
+ */
+
+#include "system.h"
+
+#include <rpmiotypes.h>
+#include <rpmio.h> /* for *Pool methods */
+#include <rpmlog.h>
+#include <rpmurl.h>
+#define _RPMGIT_INTERNAL
+#include <rpmgit.h>
+
+#include "debug.h"
+
+/*@unchecked@*/
+int _rpmgit_debug = 0;
+
+static void rpmgitFini(void * _git)
+ /*@globals fileSystem @*/
+ /*@modifies *_git, fileSystem @*/
+{
+ rpmgit git = _git;
+
+ git->fn = _free(git->fn);
+}
+
+/*@unchecked@*/ /*@only@*/ /*@null@*/
+rpmioPool _rpmgitPool = NULL;
+
+static rpmgit rpmgitGetPool(/*@null@*/ rpmioPool pool)
+ /*@globals _rpmgitPool, fileSystem @*/
+ /*@modifies pool, _rpmgitPool, fileSystem @*/
+{
+ rpmgit git;
+
+ if (_rpmgitPool == NULL) {
+ _rpmgitPool = rpmioNewPool("git", sizeof(*git), -1, _rpmgit_debug,
+ NULL, NULL, rpmgitFini);
+ pool = _rpmgitPool;
+ }
+ git = (rpmgit) rpmioGetPool(pool, sizeof(*git));
+ memset(((char *)git)+sizeof(git->_item), 0, sizeof(*git)-sizeof(git->_item));
+ return git;
+}
+
+rpmgit rpmgitNew(const char * fn, int flags)
+{
+ rpmgit git = rpmgitGetPool(_rpmgitPool);
+ int xx;
+
+ if (fn)
+ git->fn = xstrdup(fn);
+
+ return rpmgitLink(git);
+}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmgit.h
============================================================================
$ cvs diff -u -r0 -r2.1 rpmgit.h
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmgit.h 2010-08-12 15:39:55.788134671 +0200
@@ -0,0 +1,84 @@
+#ifndef H_RPMGIT
+#define H_RPMGIT
+
+/** \ingroup rpmio
+ * \file rpmio/rpmgit.h
+ */
+
+/** \ingroup rpmio
+ */
+/*@unchecked@*/
+extern int _rpmgit_debug;
+
+/** \ingroup rpmio
+ */
+typedef /*@refcounted@*/ struct rpmgit_s * rpmgit;
+
+#if defined(_RPMGIT_INTERNAL)
+
+/** \ingroup rpmio
+ */
+struct rpmgit_s {
+ struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
+ const char * fn;
+#if defined(__LCLINT__)
+/*@refs@*/
+ int nrefs; /*!< (unused) keep splint happy */
+#endif
+};
+#endif /* _RPMGIT_INTERNAL */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Unreference a git wrapper instance.
+ * @param git git wrapper
+ * @return NULL on last dereference
+ */
+/*@unused@*/ /*@null@*/
+rpmgit rpmgitUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgit git)
+ /*@modifies git @*/;
+#define rpmgitUnlink(_git) \
+ ((rpmgit)rpmioUnlinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Reference a git wrapper instance.
+ * @param git git wrapper
+ * @return new git wrapper reference
+ */
+/*@unused@*/ /*@newref@*/ /*@null@*/
+rpmgit rpmgitLink (/*@null@*/ rpmgit git)
+ /*@modifies git @*/;
+#define rpmgitLink(_git) \
+ ((rpmgit)rpmioLinkPoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Destroy a git wrapper.
+ * @param git git wrapper
+ * @return NULL on last dereference
+ */
+/*@null@*/
+rpmgit rpmgitFree(/*@killref@*/ /*@null@*/rpmgit git)
+ /*@globals fileSystem @*/
+ /*@modifies git, fileSystem @*/;
+#define rpmgitFree(_git) \
+ ((rpmgit)rpmioFreePoolItem((rpmioItem)(_git), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Create and load a git wrapper.
+ * @param fn git file
+ * @param flags git flags
+ * @return new git wrapper
+ */
+/*@newref@*/ /*@null@*/
+rpmgit rpmgitNew(const char * fn, int flags)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_RPMGIT */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmio.c
============================================================================
$ cvs diff -u -r1.226 -r1.227 rpmio.c
--- rpm/rpmio/rpmio.c 24 Jul 2010 14:12:18 -0000 1.226
+++ rpm/rpmio/rpmio.c 12 Aug 2010 13:39:55 -0000 1.227
@@ -66,6 +66,7 @@
#include <rpmmacro.h> /* XXX rpmioAccess needs rpmCleanPath() */
#include <rpmaug.h>
+#include <rpmaug.h>
#include <rpmficl.h>
#include <rpmjs.h>
#include <rpmlua.h> /* XXX rpmioClean() calls rpmluaFree() */
@@ -3219,6 +3220,9 @@
/*@=shadow@*/
extern rpmioPool _rpmasnPool;
+ extern rpmioPool _rpmbagPool;
+ extern rpmioPool _rpmcvsPool;
+ extern rpmioPool _rpmsvnPool;
extern rpmioPool _rpmtpmPool;
extern rpmioPool _rpmaugPool;
@@ -3274,6 +3278,9 @@
_rpmaugPool = rpmioFreePool(_rpmaugPool);
_rpmasnPool = rpmioFreePool(_rpmasnPool);
+ _rpmbagPool = rpmioFreePool(_rpmbagPool);
+ _rpmcvsPool = rpmioFreePool(_rpmcvsPool);
+ _rpmsvnPool = rpmioFreePool(_rpmsvnPool);
_rpmtpmPool = rpmioFreePool(_rpmtpmPool);
#ifdef NOTYET /* XXX FIXME: dig out the recursion deadlock. */
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmsvn.c
============================================================================
$ cvs diff -u -r0 -r2.1 rpmsvn.c
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmsvn.c 2010-08-12 15:39:55.878139401 +0200
@@ -0,0 +1,56 @@
+/** \ingroup rpmio
+ * \file rpmio/rpmsvn.c
+ */
+
+#include "system.h"
+
+#include <rpmiotypes.h>
+#include <rpmio.h> /* for *Pool methods */
+#include <rpmlog.h>
+#include <rpmurl.h>
+#define _RPMSVN_INTERNAL
+#include <rpmsvn.h>
+
+#include "debug.h"
+
+/*@unchecked@*/
+int _rpmsvn_debug = 0;
+
+static void rpmsvnFini(void * _svn)
+ /*@globals fileSystem @*/
+ /*@modifies *_svn, fileSystem @*/
+{
+ rpmsvn svn = _svn;
+
+ svn->fn = _free(svn->fn);
+}
+
+/*@unchecked@*/ /*@only@*/ /*@null@*/
+rpmioPool _rpmsvnPool = NULL;
+
+static rpmsvn rpmsvnGetPool(/*@null@*/ rpmioPool pool)
+ /*@globals _rpmsvnPool, fileSystem @*/
+ /*@modifies pool, _rpmsvnPool, fileSystem @*/
+{
+ rpmsvn svn;
+
+ if (_rpmsvnPool == NULL) {
+ _rpmsvnPool = rpmioNewPool("svn", sizeof(*svn), -1, _rpmsvn_debug,
+ NULL, NULL, rpmsvnFini);
+ pool = _rpmsvnPool;
+ }
+ svn = (rpmsvn) rpmioGetPool(pool, sizeof(*svn));
+ memset(((char *)svn)+sizeof(svn->_item), 0, sizeof(*svn)-sizeof(svn->_item));
+ return svn;
+}
+
+rpmsvn rpmsvnNew(const char * fn, int flags)
+{
+ rpmsvn svn = rpmsvnGetPool(_rpmsvnPool);
+ int xx;
+
+ if (fn)
+ svn->fn = xstrdup(fn);
+
+ return rpmsvnLink(svn);
+}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/rpmsvn.h
============================================================================
$ cvs diff -u -r0 -r2.1 rpmsvn.h
--- /dev/null 2010-08-12 15:39:46.000000000 +0200
+++ rpmsvn.h 2010-08-12 15:39:55.908140977 +0200
@@ -0,0 +1,84 @@
+#ifndef H_RPMSVN
+#define H_RPMSVN
+
+/** \ingroup rpmio
+ * \file rpmio/rpmsvn.h
+ */
+
+/** \ingroup rpmio
+ */
+/*@unchecked@*/
+extern int _rpmsvn_debug;
+
+/** \ingroup rpmio
+ */
+typedef /*@refcounted@*/ struct rpmsvn_s * rpmsvn;
+
+#if defined(_RPMSVN_INTERNAL)
+
+/** \ingroup rpmio
+ */
+struct rpmsvn_s {
+ struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */
+ const char * fn;
+#if defined(__LCLINT__)
+/*@refs@*/
+ int nrefs; /*!< (unused) keep splint happy */
+#endif
+};
+#endif /* _RPMSVN_INTERNAL */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Unreference a svn wrapper instance.
+ * @param svn svn wrapper
+ * @return NULL on last dereference
+ */
+/*@unused@*/ /*@null@*/
+rpmsvn rpmsvnUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsvn svn)
+ /*@modifies svn @*/;
+#define rpmsvnUnlink(_svn) \
+ ((rpmsvn)rpmioUnlinkPoolItem((rpmioItem)(_svn), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Reference a svn wrapper instance.
+ * @param svn svn wrapper
+ * @return new svn wrapper reference
+ */
+/*@unused@*/ /*@newref@*/ /*@null@*/
+rpmsvn rpmsvnLink (/*@null@*/ rpmsvn svn)
+ /*@modifies svn @*/;
+#define rpmsvnLink(_svn) \
+ ((rpmsvn)rpmioLinkPoolItem((rpmioItem)(_svn), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Destroy a svn wrapper.
+ * @param svn svn wrapper
+ * @return NULL on last dereference
+ */
+/*@null@*/
+rpmsvn rpmsvnFree(/*@killref@*/ /*@null@*/rpmsvn svn)
+ /*@globals fileSystem @*/
+ /*@modifies svn, fileSystem @*/;
+#define rpmsvnFree(_svn) \
+ ((rpmsvn)rpmioFreePoolItem((rpmioItem)(_svn), __FUNCTION__, __FILE__, __LINE__))
+
+/**
+ * Create and load a svn wrapper.
+ * @param fn svn file
+ * @param flags svn flags
+ * @return new svn wrapper
+ */
+/*@newref@*/ /*@null@*/
+rpmsvn rpmsvnNew(const char * fn, int flags)
+ /*@globals fileSystem, internalState @*/
+ /*@modifies fileSystem, internalState @*/;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_RPMSVN */
@@ .
Received on Thu Aug 12 15:39:56 2010