[CVS] RPM: rpm/build/ files.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 16:25:45
  Branch: HEAD Handle: 2009031815254500

  Modified files:
rpm/build   files.c

  Log:
- jbj: hmmm, the typo indicates no testing whatsoever. caveat emptor.

  Summary:
RevisionChanges Path
1.354   +0  -1  rpm/build/files.c
  

  patch -p0 '@@ .'
  Index: rpm/build/files.c
  
  $ cvs diff -u -r1.353 -r1.354 files.c
  --- rpm/build/files.c 16 Mar 2009 21:06:44 -  1.353
  +++ rpm/build/files.c 18 Mar 2009 15:25:45 -  1.354
  @@ -2083,7 +2083,6 @@
absolute = 1;
   } else
fn = rpmGenPath(buildURL, NULL, fn);
  -rc = rpmioMkpath(bildURL, 0755, -1, -1);
   
   switch (tag) {
   default:
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmio/ yarn.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 16:50:07
  Branch: HEAD Handle: 2009031815500601

  Modified files:
rpm CHANGES
rpm/rpmio   yarn.c

  Log:
- yarn: glibc pthreads (at least) returns errno's, strrerror decodes.
- yarn: fix: assert fail instead of exit on error.

  Summary:
RevisionChanges Path
1.2831  +2  -0  rpm/CHANGES
2.8 +3  -2  rpm/rpmio/yarn.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2830 -r1.2831 CHANGES
  --- rpm/CHANGES   17 Mar 2009 23:59:01 -  1.2830
  +++ rpm/CHANGES   18 Mar 2009 15:50:06 -  1.2831
  @@ -1,5 +1,7 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: glibc pthreads (at least) returns errno's, strrerror 
decodes.
  +- jbj: yarn: fix: assert fail instead of exit on error.
   - jbj: yarn: use the pool allocator.
   - jbj: yarn: add a pool allocator.
   - devzero2000: add mkdtemp portability function to -lrpmmisc 
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/yarn.c
  
  $ cvs diff -u -r2.7 -r2.8 yarn.c
  --- rpm/rpmio/yarn.c  12 Mar 2009 18:19:49 -  2.7
  +++ rpm/rpmio/yarn.c  18 Mar 2009 15:50:07 -  2.8
  @@ -187,10 +187,11 @@
/*...@globals fileSystem, internalState @*/
/*...@modifies fileSystem, internalState @*/
   {
  -fprintf(stderr, %s: %s (%d) -- aborting\n, yarnPrefix,
  -err == ENOMEM ? out of memory : internal pthread error, err);
  +fprintf(stderr, %s: pthread error: %s(%d) -- aborting\n, yarnPrefix,
  +strerror(err), err);
   if (yarnAbort != NULL)
   yarnAbort(err);
  +assert(0);
   exit(err == ENOMEM || err == EAGAIN ? err : EINVAL);
   }
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmio/ yarn.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 17:07:40
  Branch: HEAD Handle: 2009031816074000

  Modified files:
rpm CHANGES
rpm/rpmio   yarn.c

  Log:
- yarn: trick up a __FILE__:__LINE__ from caller when failing too.

  Summary:
RevisionChanges Path
1.2833  +1  -0  rpm/CHANGES
2.10+4  -3  rpm/rpmio/yarn.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2832 -r1.2833 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:00:18 -  1.2832
  +++ rpm/CHANGES   18 Mar 2009 16:07:40 -  1.2833
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
   - jbj: yarn: use EINVAL, not -1, for --without-pthreads portability.
   - jbj: yarn: glibc pthreads (at least) returns errno's, strrerror 
decodes.
   - jbj: yarn: fix: assert fail instead of exit on error.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/yarn.c
  
  $ cvs diff -u -r2.9 -r2.10 yarn.c
  --- rpm/rpmio/yarn.c  18 Mar 2009 16:00:19 -  2.9
  +++ rpm/rpmio/yarn.c  18 Mar 2009 16:07:40 -  2.10
  @@ -183,17 +183,18 @@
   
   /* immediately exit -- use for errors that shouldn't ever happen */
   /*...@exits@*/
  -static void fail(int err)
  +static void _fail(int err, const char * fn, unsigned ln)
/*...@globals fileSystem, internalState @*/
/*...@modifies fileSystem, internalState @*/
   {
  -fprintf(stderr, %s: pthread error: %s(%d) -- aborting\n, yarnPrefix,
  -strerror(err), err);
  +fprintf(stderr, %s: pthread error: %s(%d) -- aborting at %s:%u\n, 
yarnPrefix,
  +strerror(err), err, fn, ln);
   if (yarnAbort != NULL)
   yarnAbort(err);
   assert(0);
   exit(err == ENOMEM || err == EAGAIN ? err : EINVAL);
   }
  +#define  fail(_err)  _fail((_err), __FILE__, __LINE__)
   
   /* memory handling routines provided by user -- if none are provided, 
malloc()
  and free() are used, which are therefore assumed to be thread-safe */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ yarn.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 17:08:13
  Branch: rpm-5_1  Handle: 2009031816081201

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   yarn.c

  Log:
- yarn: trick up a __FILE__:__LINE__ from caller when failing too.

  Summary:
RevisionChanges Path
1.2288.2.206+1  -0  rpm/CHANGES
2.7.2.5 +4  -3  rpm/rpmio/yarn.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.205 -r1.2288.2.206 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:01:01 -  1.2288.2.205
  +++ rpm/CHANGES   18 Mar 2009 16:08:12 -  1.2288.2.206
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
   - jbj: yarn: use EINVAL, not -1, for --without-pthreads portability.
   - jbj: yarn: glibc pthreads (at least) returns errno's, strrerror 
decodes.
   - jbj: yarn: fix: assert fail instead of exit on error.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/yarn.c
  
  $ cvs diff -u -r2.7.2.4 -r2.7.2.5 yarn.c
  --- rpm/rpmio/yarn.c  18 Mar 2009 16:01:01 -  2.7.2.4
  +++ rpm/rpmio/yarn.c  18 Mar 2009 16:08:13 -  2.7.2.5
  @@ -187,17 +187,18 @@
   
   /* immediately exit -- use for errors that shouldn't ever happen */
   /*...@exits@*/
  -static void fail(int err)
  +static void _fail(int err, const char * fn, unsigned ln)
/*...@globals fileSystem, internalState @*/
/*...@modifies fileSystem, internalState @*/
   {
  -fprintf(stderr, %s: pthread error: %s(%d) -- aborting\n, yarnPrefix,
  -strerror(err), err);
  +fprintf(stderr, %s: pthread error: %s(%d) -- aborting at %s:%u\n, 
yarnPrefix,
  +strerror(err), err, fn, ln);
   if (yarnAbort != NULL)
   yarnAbort(err);
   assert(0);
   exit(err == ENOMEM || err == EAGAIN ? err : EINVAL);
   }
  +#define  fail(_err)  _fail((_err), __FILE__, __LINE__)
   
   /* memory handling routines provided by user -- if none are provided, 
malloc()
  and free() are used, which are therefore assumed to be thread-safe */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmio/ rpmio.h rpmmalloc.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 17:47:00
  Branch: HEAD Handle: 2009031816465901

  Modified files:
rpm CHANGES
rpm/rpmio   rpmio.h rpmmalloc.c

  Log:
- yarn: add generic Link/Unlink refcount diddlers.
- yarn: add debugging, reuse counter, and zlog to rpmioPool.

  Summary:
RevisionChanges Path
1.2834  +2  -0  rpm/CHANGES
1.84+28 -1  rpm/rpmio/rpmio.h
1.16+44 -3  rpm/rpmio/rpmmalloc.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2833 -r1.2834 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:07:40 -  1.2833
  +++ rpm/CHANGES   18 Mar 2009 16:46:59 -  1.2834
  @@ -1,5 +1,7 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: add generic Link/Unlink refcount diddlers.
  +- jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
   - jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
   - jbj: yarn: use EINVAL, not -1, for --without-pthreads portability.
   - jbj: yarn: glibc pthreads (at least) returns errno's, strrerror 
decodes.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.h
  
  $ cvs diff -u -r1.83 -r1.84 rpmio.h
  --- rpm/rpmio/rpmio.h 17 Mar 2009 22:48:56 -  1.83
  +++ rpm/rpmio/rpmio.h 18 Mar 2009 16:47:00 -  1.84
  @@ -760,12 +760,39 @@
* @param name   pool name
* @param size   item size
* @param limit  no. of items permitted (-1 for unlimited)
  + * @param flags  debugging flags
* @return   memory pool
*/
  -rpmioPool rpmioNewPool(const char * name, size_t size, int limit)
  +rpmioPool rpmioNewPool(const char * name, size_t size, int limit, int flags)
   /*...@*/;
   
   /**
  + * Decrement a pool item refcount.
  + * @param item   pool item
  + * @param msgdebugging msg (NULL disables debugging)
  + * @param fn usually __FILE__
  + * @param ln usually __LINE__
  + * @return   pool item
  + */
  +/*...@null@*/
  +rpmioItem rpmioUnlinkPoolItem(/*...@killref@*/ /*...@null@*/ rpmioItem item,
  + const char * msg, const char * fn, unsigned ln)
  + /*...@modifies item @*/;
  +
  +/**
  + * Increment a pool item refcount.
  + * @param item   pool item
  + * @param msgdebugging msg (NULL disables debugging)
  + * @param fn usually __FILE__
  + * @param ln usually __LINE__
  + * @return   pool item
  + */
  +/*...@newref@*/ /*...@null@*/
  +rpmioItem rpmioLinkPoolItem(/*...@returned@*/ /*...@null@*/ rpmioItem item,
  + const char * msg, const char * fn, unsigned ln)
  + /*...@modifies item @*/;
  +
  +/**
* Get unused item from pool, or alloc a new item.
* @param pool   memory pool (NULL will always alloc a new item)
* @param size   item size
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmmalloc.c
  
  $ cvs diff -u -r1.15 -r1.16 rpmmalloc.c
  --- rpm/rpmio/rpmmalloc.c 17 Mar 2009 22:48:56 -  1.15
  +++ rpm/rpmio/rpmmalloc.c 18 Mar 2009 16:47:00 -  1.16
  @@ -41,8 +41,13 @@
   rpmioItem * tail;
   size_t size; /*! size of items in this pool */
   int limit;   /*! number of new items allowed, or -1 
*/
  +int flags;
  +int reused;  /*! number of items reused */
   int made;/*! number of items made */
  +/*...@observer@*/
   const char *name;
  +/*...@null@*/
  +void * zlog;
   };
   
   /*...@unchecked@*/
  @@ -67,14 +72,14 @@
}
yarnRelease(pool-have);
pool-have = yarnFreeLock(pool-have);
  - rpmlog(RPMLOG_DEBUG, (rpm%s: pool alloc'd %d, free'd %d, items.\n), 
pool-name, pool-made, count);
  + rpmlog(RPMLOG_DEBUG, (pool %s:\treused %d, alloc'd %d, free'd %d 
items.\n), pool-name, pool-reused, pool-made, count);
   assert(pool-made == count);
pool = _free(pool);
   }
   return NULL;
   }
   
  -rpmioPool rpmioNewPool(const char * name, size_t size, int limit)
  +rpmioPool rpmioNewPool(const char * name, size_t size, int limit, int flags)
/*...@*/
   {
   rpmioPool pool = xcalloc(1, sizeof(*pool));
  @@ -84,12 +89,47 @@
   pool-tail = pool-head;
  

[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ rpmio.h rpmmalloc.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 17:50:06
  Branch: rpm-5_1  Handle: 2009031816500501

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   rpmio.h rpmmalloc.c

  Log:
- yarn: add generic Link/Unlink refcount diddlers.
- yarn: add debugging, reuse counter, and zlog to rpmioPool.

  Summary:
RevisionChanges Path
1.2288.2.207+2  -0  rpm/CHANGES
1.68.2.8+28 -1  rpm/rpmio/rpmio.h
1.13.4.3+44 -3  rpm/rpmio/rpmmalloc.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.206 -r1.2288.2.207 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:08:12 -  1.2288.2.206
  +++ rpm/CHANGES   18 Mar 2009 16:50:05 -  1.2288.2.207
  @@ -1,4 +1,6 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: add generic Link/Unlink refcount diddlers.
  +- jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
   - jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
   - jbj: yarn: use EINVAL, not -1, for --without-pthreads portability.
   - jbj: yarn: glibc pthreads (at least) returns errno's, strrerror 
decodes.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.h
  
  $ cvs diff -u -r1.68.2.7 -r1.68.2.8 rpmio.h
  --- rpm/rpmio/rpmio.h 17 Mar 2009 22:49:23 -  1.68.2.7
  +++ rpm/rpmio/rpmio.h 18 Mar 2009 16:50:06 -  1.68.2.8
  @@ -835,12 +835,39 @@
* @param name   pool name
* @param size   item size
* @param limit  no. of items permitted (-1 for unlimited)
  + * @param flags  debugging flags
* @return   memory pool
*/
  -rpmioPool rpmioNewPool(const char * name, size_t size, int limit)
  +rpmioPool rpmioNewPool(const char * name, size_t size, int limit, int flags)
   /*...@*/;
   
   /**
  + * Decrement a pool item refcount.
  + * @param item   pool item
  + * @param msgdebugging msg (NULL disables debugging)
  + * @param fn usually __FILE__
  + * @param ln usually __LINE__
  + * @return   pool item
  + */
  +/*...@null@*/
  +rpmioItem rpmioUnlinkPoolItem(/*...@killref@*/ /*...@null@*/ rpmioItem item,
  + const char * msg, const char * fn, unsigned ln)
  + /*...@modifies item @*/;
  +
  +/**
  + * Increment a pool item refcount.
  + * @param item   pool item
  + * @param msgdebugging msg (NULL disables debugging)
  + * @param fn usually __FILE__
  + * @param ln usually __LINE__
  + * @return   pool item
  + */
  +/*...@newref@*/ /*...@null@*/
  +rpmioItem rpmioLinkPoolItem(/*...@returned@*/ /*...@null@*/ rpmioItem item,
  + const char * msg, const char * fn, unsigned ln)
  + /*...@modifies item @*/;
  +
  +/**
* Get unused item from pool, or alloc a new item.
* @param pool   memory pool (NULL will always alloc a new item)
* @param size   item size
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmmalloc.c
  
  $ cvs diff -u -r1.13.4.2 -r1.13.4.3 rpmmalloc.c
  --- rpm/rpmio/rpmmalloc.c 17 Mar 2009 22:49:23 -  1.13.4.2
  +++ rpm/rpmio/rpmmalloc.c 18 Mar 2009 16:50:06 -  1.13.4.3
  @@ -40,8 +40,13 @@
   rpmioItem * tail;
   size_t size; /*! size of items in this pool */
   int limit;   /*! number of new items allowed, or -1 
*/
  +int flags;
  +int reused;  /*! number of items reused */
   int made;/*! number of items made */
  +/*...@observer@*/
   const char *name;
  +/*...@null@*/
  +void * zlog;
   };
   
   /*...@unchecked@*/
  @@ -66,14 +71,14 @@
}
yarnRelease(pool-have);
pool-have = yarnFreeLock(pool-have);
  - rpmlog(RPMLOG_DEBUG, (rpm%s: pool alloc'd %d, free'd %d, items.\n), 
pool-name, pool-made, count);
  + rpmlog(RPMLOG_DEBUG, (pool %s:\treused %d, alloc'd %d, free'd %d 
items.\n), pool-name, pool-reused, pool-made, count);
   assert(pool-made == count);
pool = _free(pool);
   }
   return NULL;
   }
   
  -rpmioPool rpmioNewPool(const char * name, size_t size, int limit)
  +rpmioPool rpmioNewPool(const char * name, size_t size, int limit, int flags)
/*...@*/
   {
   rpmioPool pool = 

[CVS] RPM: rpm/ configure.ac

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 18:12:23
  Branch: HEAD Handle: 2009031817122200

  Modified files:
rpm configure.ac

  Log:
just link perl module against $LIBS if pthread, although it's lazy and links
against more libraries than necessary, it will only link against some of the
same libraries rpm already links against, so even though nicer could be 
done,
it doesn't really matter(tm)
This fixes breakage on systems that doesn't link against libpthread (only)

  Summary:
RevisionChanges Path
2.347   +1  -1  rpm/configure.ac
  

  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.346 -r2.347 configure.ac
  --- rpm/configure.ac  16 Mar 2009 22:30:39 -  2.346
  +++ rpm/configure.ac  18 Mar 2009 17:12:22 -  2.347
  @@ -920,7 +920,7 @@
   WITH_PERL_SUBPACKAGE=0
   WITH_PERL_LIBS=
   if test .$WITH_PTHREADS = .yes; then
  -WITH_PERL_LIBS=-lpthread
  +WITH_PERL_LIBS=$LIBS
   fi
   AC_ARG_WITH(perl, AS_HELP_STRING([--with-perl], [build with RPM Perl 
language bindings]), [
   if test .$withval != .no; then
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmds.c rpmds.h rpmfi.c rpmfi.h rpm/r...

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 19:36:38
  Branch: HEAD Handle: 2009031818363602

  Modified files:
rpm CHANGES
rpm/lib rpmds.c rpmds.h rpmfi.c rpmfi.h
rpm/rpmdb   header.c
rpm/rpmio   rpmio.c rpmurl.h url.c

  Log:
- jbj: yarn: use the pool changes where possible.

  Summary:
RevisionChanges Path
1.2835  +1  -0  rpm/CHANGES
2.131   +1  -26 rpm/lib/rpmds.c
2.77+9  -16 rpm/lib/rpmds.h
2.138   +1  -25 rpm/lib/rpmfi.c
2.70+4  -28 rpm/lib/rpmfi.h
1.171   +1  -1  rpm/rpmdb/header.c
1.166   +9  -9  rpm/rpmio/rpmio.c
1.37+4  -8  rpm/rpmio/rpmurl.h
1.64+15 -9  rpm/rpmio/url.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2834 -r1.2835 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:46:59 -  1.2834
  +++ rpm/CHANGES   18 Mar 2009 18:36:36 -  1.2835
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
   - jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
   - jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.130 -r2.131 rpmds.c
  --- rpm/lib/rpmds.c   17 Mar 2009 23:59:02 -  2.130
  +++ rpm/lib/rpmds.c   18 Mar 2009 18:36:38 -  2.131
  @@ -131,37 +131,12 @@
   rpmds ds;
   
   if (_rpmdsPool == NULL) {
  - _rpmdsPool = rpmioNewPool(ds, sizeof(*ds), -1);
  + _rpmdsPool = rpmioNewPool(ds, sizeof(*ds), -1, _rpmds_debug);
pool = _rpmdsPool;
   }
   return (rpmds) rpmioGetPool(pool, sizeof(*ds));
   }
   
  -rpmds XrpmdsUnlink(rpmds ds, const char * msg, const char * fn, unsigned ln)
  -{
  -if (ds == NULL) return NULL;
  -yarnPossess(ds-use);
  -/*...@-modfilesys@*/
  -if (_rpmds_debug  msg != NULL)
  -fprintf(stderr, -- ds %p -- %ld %s at %s:%u\n, ds, yarnPeekLock(ds-use), 
msg, fn, ln);
  -/*...@=modfilesys@*/
  -yarnTwist(ds-use, BY, -1);
  -return NULL;
  -}
  -
  -rpmds XrpmdsLink(rpmds ds, const char * msg, const char * fn, unsigned ln)
  -{
  -if (ds == NULL) return NULL;
  -yarnPossess(ds-use);
  -/*...@-modfilesys@*/
  -if (_rpmds_debug  msg != NULL)
  -fprintf(stderr, -- ds %p ++ %ld %s at %s:%u\n, ds, 
yarnPeekLock(ds-use)+1, msg, fn, ln);
  -/*...@=modfilesys@*/
  -yarnTwist(ds-use, BY, 1);
  -
  -/*...@-refcounttrans@*/ return ds; /*...@=refcounttrans@*/
  -}
  -
   /**
* Return dependency set type string.
* @param tagN   dependency set tag
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.h
  
  $ cvs diff -u -r2.76 -r2.77 rpmds.h
  --- rpm/lib/rpmds.h   17 Mar 2009 23:59:02 -  2.76
  +++ rpm/lib/rpmds.h   18 Mar 2009 18:36:38 -  2.77
  @@ -40,6 +40,7 @@
   yarnLock use;/*! use count -- return to pool when zero */
   /*...@shared@*/ /*...@null@*/
   void *pool;  /*! pool (or NULL if malloc'd) */
  +
   /*...@observer@*/
   const char * Type;   /*! Tag name. */
   /*...@only@*/ /*...@null@*/
  @@ -85,6 +86,10 @@
* Container for provides/requires/conflicts/obsoletes dependency set(s).
*/
   struct rpmPRCO_s {
  +yarnLock use;/*! use count -- return to pool when zero */
  +/*...@shared@*/ /*...@null@*/
  +void *pool;  /*! pool (or NULL if malloc'd) */
  +
   /*...@dependent@*/ /*...@relnull@*/
   rpmds * Pdsp;/*! Provides: collector. */
   /*...@dependent@*/ /*...@relnull@*/
  @@ -135,15 +140,8 @@
   rpmds rpmdsUnlink (/*...@killref@*/ /*...@only@*/ /*...@null@*/ rpmds ds,
/*...@null@*/ const char * msg)
/*...@modifies ds @*/;
  -
  -/** @todo Remove debugging entry from the ABI. */
  -/*...@-exportlocal@*/
  -/*...@null@*/
  -rpmds XrpmdsUnlink (/*...@killref@*/ /*...@only@*/ /*...@null@*/ rpmds ds,
  - /*...@null@*/ const char * msg, const char * fn, unsigned ln)
  - /*...@modifies ds @*/;
  -/*...@=exportlocal@*/
  -#define  rpmdsUnlink(_ds, _msg)  XrpmdsUnlink(_ds, _msg, __FILE__, 
__LINE__)
  +#define  rpmdsUnlink(_ds, _msg)  \
  +

[CVS] RPM: rpm/rpmio/ librpmio.vers

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 19:47:51
  Branch: HEAD Handle: 2009031818475100

  Modified files:
rpm/rpmio   librpmio.vers

  Log:
- jbj: yarn: use the pool changes where possible.

  Summary:
RevisionChanges Path
2.95+2  -1  rpm/rpmio/librpmio.vers
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.94 -r2.95 librpmio.vers
  --- rpm/rpmio/librpmio.vers   17 Mar 2009 22:48:56 -  2.94
  +++ rpm/rpmio/librpmio.vers   18 Mar 2009 18:47:51 -  2.95
  @@ -315,11 +315,13 @@
   rpmioHttpReadTimeoutSecs;
   rpmioHttpUserAgent;
   rpmioInit;
  +rpmioLinkPoolItem;
   rpmioMkpath;
   rpmioNewPool;
   rpmioPipeOutput;
   rpmioPutPool;
   rpmioRootDir;
  +rpmioUnlinkPoolItem;
   rpmKeyringAddKey;
   rpmKeyringFindKeyid;
   rpmKeyringFree;
  @@ -505,7 +507,6 @@
   XfdLink;
   XfdNew;
   XurlFree;
  -XurlLink;
   XurlNew;
   xzdio;
   yarnAbort;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/lib/ librpm.vers

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 19:52:34
  Branch: HEAD Handle: 2009031818523400

  Modified files:
rpm/lib librpm.vers

  Log:
- yarn: use the pool changes where possible.

  Summary:
RevisionChanges Path
1.56+0  -4  rpm/lib/librpm.vers
  

  patch -p0 '@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.55 -r1.56 librpm.vers
  --- rpm/lib/librpm.vers   3 Feb 2009 18:16:07 -   1.55
  +++ rpm/lib/librpm.vers   18 Mar 2009 18:52:34 -  1.56
  @@ -408,10 +408,6 @@
   tarHeaderRead;
   tarHeaderWrite;
   tarTrailerWrite;
  -XrpmdsLink;
  -XrpmdsUnlink;
  -XrpmfiLink;
  -XrpmfiUnlink;
   XrpmgiLink;
   XrpmgiUnlink;
   XrpmpsLink;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-4_5: rpm/ CHANGES configure.ac rpm/rpmio/ Makefile.am r...

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 20:29:31
  Branch: rpm-4_5  Handle: 2009031819292901

  Modified files:   (Branch: rpm-4_5)
rpm CHANGES configure.ac
rpm/rpmio   Makefile.am rpmuuid.c

  Log:
make OSSP uuid support optional

  Summary:
RevisionChanges Path
1.1360.2.122+1  -0  rpm/CHANGES
2.70.2.28   +8  -1  rpm/configure.ac
1.77.2.6+1  -1  rpm/rpmio/Makefile.am
2.5.4.3 +0  -1  rpm/rpmio/rpmuuid.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.1360.2.121 -r1.1360.2.122 CHANGES
  --- rpm/CHANGES   3 Mar 2009 21:27:00 -   1.1360.2.121
  +++ rpm/CHANGES   18 Mar 2009 19:29:30 -  1.1360.2.122
  @@ -1,4 +1,5 @@
   4.4.9 - 4.5:
  + - proyvind: make OSSP uuid support optional.
- glen: set failed state on upgrade if package reopen failed to avoid 
losing pkg info from db
- glen: scripts/rpm2cpio: avoid awk, use pure echo (from PLD)
- glen: use modern chown syntax in setugids popt macro
  @@ .
  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.70.2.27 -r2.70.2.28 configure.ac
  --- rpm/configure.ac  29 May 2008 19:45:39 -  2.70.2.27
  +++ rpm/configure.ac  18 Mar 2009 19:29:29 -  2.70.2.28
  @@ -1193,6 +1193,13 @@
   AC_SUBST(WITH_SYCK_INCLUDE)
   
   withval=no
  +AC_ARG_WITH(dmalloc, [  --with-uuid build with OSSP uuid support 
])
  +if test $withval = yes ; then
  +  AC_DEFINE(UUID, 1, [Build with OSSP uuid support?])
  +  LIBS=$LIBS -lossp-uuid
  +fi
  +
  +withval=no
   AC_ARG_WITH(dmalloc, [  --with-dmalloc  build with dmalloc debugging 
support ])
   if test $withval = yes ; then
 AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
  @@ -1520,7 +1527,7 @@
   
   AC_CONFIG_SUBDIRS(popt zlib file sqlite db3)
   
  -AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec 
rpm5.spec po/Makefile.in
  +AC_CONFIG_FILES([ Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec 
rpm5.spec po/Makefile.in   
rpmio/Makefile rpmdb/Makefile lib/Makefile build/Makefile
scripts/Makefile
scripts/macros.perl scripts/macros.php scripts/macros.python
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.77.2.5 -r1.77.2.6 Makefile.am
  --- rpm/rpmio/Makefile.am 10 Jun 2008 21:33:45 -  1.77.2.5
  +++ rpm/rpmio/Makefile.am 18 Mar 2009 19:29:30 -  1.77.2.6
  @@ -50,7 +50,7 @@
@WITH_KEYUTILS_LIB@ \
@WITH_ZLIB_LIB@ \
@LTLIBINTL@
  -librpmio_la_LIBADD = -lossp-uuid # $(BEECRYPTLOBJS)
  +librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
   librpmio_la_DEPENDENCIES = # .created
   
   if HAVE_LD_VERSION_SCRIPT
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmuuid.c
  
  $ cvs diff -u -r2.5.4.2 -r2.5.4.3 rpmuuid.c
  --- rpm/rpmio/rpmuuid.c   10 Jun 2008 19:02:09 -  2.5.4.2
  +++ rpm/rpmio/rpmuuid.c   18 Mar 2009 19:29:30 -  2.5.4.3
  @@ -1,7 +1,6 @@
   /** \ingroup rpmio
* \file rpmio/rpmuuid.c
*/
  -#define  WITH_UUID
   
   #if defined(__APPLE__)
   /* workaround for uuid_t type conflict, between unistd.h and uuid.h */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ librpm.vers rpmds.c rpmds.h ...

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 20:29:53
  Branch: rpm-5_1  Handle: 2009031819295101

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib librpm.vers rpmds.c rpmds.h rpmfi.c rpmfi.h
rpm/rpmdb   header.c
rpm/rpmio   librpmio.vers rpmio.c rpmurl.h url.c

  Log:
- yarn: use the pool changes where possible.

  Summary:
RevisionChanges Path
1.2288.2.208+1  -0  rpm/CHANGES
1.39.2.8+0  -4  rpm/lib/librpm.vers
2.94.2.10   +1  -26 rpm/lib/rpmds.c
2.66.2.6+8  -16 rpm/lib/rpmds.h
2.123.2.4   +1  -25 rpm/lib/rpmfi.c
2.54.2.7+4  -28 rpm/lib/rpmfi.h
1.153.2.7   +1  -1  rpm/rpmdb/header.c
2.63.2.10   +2  -1  rpm/rpmio/librpmio.vers
1.127.2.9   +9  -9  rpm/rpmio/rpmio.c
1.25.2.5+4  -8  rpm/rpmio/rpmurl.h
1.51.2.4+15 -9  rpm/rpmio/url.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.207 -r1.2288.2.208 CHANGES
  --- rpm/CHANGES   18 Mar 2009 16:50:05 -  1.2288.2.207
  +++ rpm/CHANGES   18 Mar 2009 19:29:51 -  1.2288.2.208
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
   - jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
   - jbj: yarn: trick up a __FILE__:__LINE__ from caller when failing too.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.39.2.7 -r1.39.2.8 librpm.vers
  --- rpm/lib/librpm.vers   6 Mar 2009 23:19:13 -   1.39.2.7
  +++ rpm/lib/librpm.vers   18 Mar 2009 19:29:51 -  1.39.2.8
  @@ -407,10 +407,6 @@
   tarHeaderRead;
   tarHeaderWrite;
   tarTrailerWrite;
  -XrpmdsLink;
  -XrpmdsUnlink;
  -XrpmfiLink;
  -XrpmfiUnlink;
   XrpmgiLink;
   XrpmgiUnlink;
   XrpmpsLink;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.94.2.9 -r2.94.2.10 rpmds.c
  --- rpm/lib/rpmds.c   18 Mar 2009 00:00:02 -  2.94.2.9
  +++ rpm/lib/rpmds.c   18 Mar 2009 19:29:51 -  2.94.2.10
  @@ -125,37 +125,12 @@
   rpmds ds;
   
   if (_rpmdsPool == NULL) {
  - _rpmdsPool = rpmioNewPool(ds, sizeof(*ds), -1);
  + _rpmdsPool = rpmioNewPool(ds, sizeof(*ds), -1, _rpmds_debug);
pool = _rpmdsPool;
   }
   return (rpmds) rpmioGetPool(pool, sizeof(*ds));
   }
   
  -rpmds XrpmdsUnlink(rpmds ds, const char * msg, const char * fn, unsigned ln)
  -{
  -if (ds == NULL) return NULL;
  -yarnPossess(ds-use);
  -/*...@-modfilesys@*/
  -if (_rpmds_debug  msg != NULL)
  -fprintf(stderr, -- ds %p -- %ld %s at %s:%u\n, ds, yarnPeekLock(ds-use), 
msg, fn, ln);
  -/*...@=modfilesys@*/
  -yarnTwist(ds-use, BY, -1);
  -return NULL;
  -}
  -
  -rpmds XrpmdsLink(rpmds ds, const char * msg, const char * fn, unsigned ln)
  -{
  -if (ds == NULL) return NULL;
  -yarnPossess(ds-use);
  -/*...@-modfilesys@*/
  -if (_rpmds_debug  msg != NULL)
  -fprintf(stderr, -- ds %p ++ %ld %s at %s:%u\n, ds, 
yarnPeekLock(ds-use)+1, msg, fn, ln);
  -/*...@=modfilesys@*/
  -yarnTwist(ds-use, BY, 1);
  -
  -/*...@-refcounttrans@*/ return ds; /*...@=refcounttrans@*/
  -}
  -
   /**
* Return dependency set type string.
* @param tagN   dependency set tag
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.h
  
  $ cvs diff -u -r2.66.2.5 -r2.66.2.6 rpmds.h
  --- rpm/lib/rpmds.h   18 Mar 2009 00:00:02 -  2.66.2.5
  +++ rpm/lib/rpmds.h   18 Mar 2009 19:29:51 -  2.66.2.6
  @@ -85,6 +85,10 @@
* Container for provides/requires/conflicts/obsoletes dependency set(s).
*/
   struct rpmPRCO_s {
  +yarnLock use;/*! use count -- return to pool when zero */
  +/*...@shared@*/ /*...@null@*/
  +void *pool;  /*! pool (or NULL if malloc'd) */
  +
   /*...@dependent@*/ /*...@relnull@*/
   rpmds * Pdsp;/*! Provides: collector. */
   /*...@dependent@*/ /*...@relnull@*/
  @@ -134,15 +138,8 @@
   rpmds rpmdsUnlink (/*...@killref@*/ /*...@only@*/ /*...@null@*/ rpmds ds,
/*...@null@*/ const char * msg)
/*...@modifies ds @*/;
  

[CVS] RPM: rpm/ CHANGES rpm/lib/ librpm.vers poptALL.c rpmgi.c rpmgi.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 20:59:50
  Branch: HEAD Handle: 2009031819595000

  Modified files:
rpm CHANGES
rpm/lib librpm.vers poptALL.c rpmgi.c rpmgi.h

  Log:
- yarn: convert rpmgi refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2836  +1  -0  rpm/CHANGES
1.57+0  -2  rpm/lib/librpm.vers
2.107   +5  -2  rpm/lib/poptALL.c
2.57+42 -53 rpm/lib/rpmgi.c
2.28+8  -20 rpm/lib/rpmgi.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2835 -r1.2836 CHANGES
  --- rpm/CHANGES   18 Mar 2009 18:36:36 -  1.2835
  +++ rpm/CHANGES   18 Mar 2009 19:59:50 -  1.2836
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
   - jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.56 -r1.57 librpm.vers
  --- rpm/lib/librpm.vers   18 Mar 2009 18:52:34 -  1.56
  +++ rpm/lib/librpm.vers   18 Mar 2009 19:59:50 -  1.57
  @@ -408,8 +408,6 @@
   tarHeaderRead;
   tarHeaderWrite;
   tarTrailerWrite;
  -XrpmgiLink;
  -XrpmgiUnlink;
   XrpmpsLink;
   XrpmpsmLink;
   XrpmpsmUnlink;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.106 -r2.107 poptALL.c
  --- rpm/lib/poptALL.c 17 Mar 2009 23:59:02 -  2.106
  +++ rpm/lib/poptALL.c 18 Mar 2009 19:59:50 -  2.107
  @@ -102,9 +102,10 @@
   /*...@unchecked@*/
   extern rpmioPool _rpmfiPool;
   
  -
   /*...@unchecked@*/
   extern int _rpmgi_debug;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmgiPool;
   
   /*...@unchecked@*/
   extern int _rpmps_debug;
  @@ -453,9 +454,11 @@
   {
   extern rpmioPool _headerPool;
   
  -_headerPool = rpmioFreePool(_headerPool);
  +_rpmgiPool = rpmioFreePool(_rpmgiPool);
  +
   _rpmdsPool = rpmioFreePool(_rpmdsPool);
   _rpmfiPool = rpmioFreePool(_rpmfiPool);
  +_headerPool = rpmioFreePool(_headerPool);
   
   /* XXX this should be done in the rpmioClean() wrapper. */
   /* keeps memory leak checkers quiet */
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmgi.c
  
  $ cvs diff -u -r2.56 -r2.57 rpmgi.c
  --- rpm/lib/rpmgi.c   8 Dec 2008 07:51:02 -   2.56
  +++ rpm/lib/rpmgi.c   18 Mar 2009 19:59:50 -  2.57
  @@ -41,6 +41,21 @@
   /*...@unchecked@*/
   rpmgiFlags giFlags = RPMGI_NONE;
   
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmgiPool;
  +
  +static rpmgi rpmgiGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmgi gi;
  +
  +if (_rpmgiPool == NULL) {
  + _rpmgiPool = rpmioNewPool(gi, sizeof(*gi), -1, _rpmgi_debug);
  + pool = _rpmgiPool;
  +}
  +return (rpmgi) rpmioGetPool(pool, sizeof(*gi));
  +}
  +
   /**
*/
   /*...@unchecked@*/
  @@ -452,72 +467,46 @@
   return rpmrc;
   }
   
  -rpmgi XrpmgiUnlink(rpmgi gi, const char * msg, const char * fn, unsigned ln)
  -{
  -if (gi == NULL) return NULL;
  -
  -if (_rpmgi_debug  msg != NULL)
  -fprintf(stderr, -- gi %p -- %d %s(%s) at %s:%u\n, gi, gi-nrefs, msg, 
tagName(gi-tag), fn, ln);
  -
  -gi-nrefs--;
  -return NULL;
  -}
  -
  -rpmgi XrpmgiLink(rpmgi gi, const char * msg, const char * fn, unsigned ln)
  -{
  -if (gi == NULL) return NULL;
  -gi-nrefs++;
  -
  -if (_rpmgi_debug  msg != NULL)
  -fprintf(stderr, -- gi %p ++ %d %s(%s) at %s:%u\n, gi, gi-nrefs, msg, 
tagName(gi-tag), fn, ln);
  -
  -/*...@-refcounttrans@*/ return gi; /*...@=refcounttrans@*/
  -}
  -
   rpmgi rpmgiFree(rpmgi gi)
   {
  -if (gi == NULL)
  - return NULL;
  +int xx;
   
  -if (gi-nrefs  1)
  - return rpmgiUnlink(gi, rpmgiFree);
  +if (gi == NULL) return NULL;
   
  -(void) rpmgiUnlink(gi, rpmgiFree);
  +yarnPossess(gi-use);
  +if (_rpmgi_debug)
  +fprintf(stderr, -- gi %p -- %ld %s(%s) at %s:%u\n, gi, 
yarnPeekLock(gi-use), rpmgiFree, tagName(gi-tag), __FILE__, __LINE__);
  +if (yarnPeekLock(gi-use) = 1L) {
  + gi-hdrPath = 

[CVS] RPM: rpm-4_5: rpm/ configure.ac

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 21:01:21
  Branch: rpm-4_5  Handle: 2009031820012100

  Modified files:   (Branch: rpm-4_5)
rpm configure.ac

  Log:
fix blind copy/paste typo

  Summary:
RevisionChanges Path
2.70.2.29   +1  -1  rpm/configure.ac
  

  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.70.2.28 -r2.70.2.29 configure.ac
  --- rpm/configure.ac  18 Mar 2009 19:29:29 -  2.70.2.28
  +++ rpm/configure.ac  18 Mar 2009 20:01:21 -  2.70.2.29
  @@ -1193,7 +1193,7 @@
   AC_SUBST(WITH_SYCK_INCLUDE)
   
   withval=no
  -AC_ARG_WITH(dmalloc, [  --with-uuid build with OSSP uuid support 
])
  +AC_ARG_WITH(uuid, [  --with-uuidbuild with OSSP uuid support 
])
   if test $withval = yes ; then
 AC_DEFINE(UUID, 1, [Build with OSSP uuid support?])
 LIBS=$LIBS -lossp-uuid
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ librpm.vers poptALL.c rpmgi....

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 21:08:02
  Branch: rpm-5_1  Handle: 2009031820080101

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib librpm.vers poptALL.c rpmgi.c rpmgi.h

  Log:
- jbj: yarn: convert rpmgi refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2288.2.209+1  -0  rpm/CHANGES
1.39.2.9+0  -2  rpm/lib/librpm.vers
2.90.2.7+5  -2  rpm/lib/poptALL.c
2.52.2.1+28 -39 rpm/lib/rpmgi.c
2.26.2.1+8  -20 rpm/lib/rpmgi.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.208 -r1.2288.2.209 CHANGES
  --- rpm/CHANGES   18 Mar 2009 19:29:51 -  1.2288.2.208
  +++ rpm/CHANGES   18 Mar 2009 20:08:01 -  1.2288.2.209
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
   - jbj: yarn: add debugging, reuse counter, and zlog to rpmioPool.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.39.2.8 -r1.39.2.9 librpm.vers
  --- rpm/lib/librpm.vers   18 Mar 2009 19:29:51 -  1.39.2.8
  +++ rpm/lib/librpm.vers   18 Mar 2009 20:08:02 -  1.39.2.9
  @@ -407,8 +407,6 @@
   tarHeaderRead;
   tarHeaderWrite;
   tarTrailerWrite;
  -XrpmgiLink;
  -XrpmgiUnlink;
   XrpmpsLink;
   XrpmpsmLink;
   XrpmpsmUnlink;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.90.2.6 -r2.90.2.7 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 00:00:02 -  2.90.2.6
  +++ rpm/lib/poptALL.c 18 Mar 2009 20:08:02 -  2.90.2.7
  @@ -90,9 +90,10 @@
   /*...@unchecked@*/
   extern rpmioPool _rpmfiPool;
   
  -
   /*...@unchecked@*/
   extern int _rpmgi_debug;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmgiPool;
   
   /*...@unchecked@*/
   extern int _rpmps_debug;
  @@ -439,9 +440,11 @@
   {
   extern rpmioPool _headerPool;
   
  -_headerPool = rpmioFreePool(_headerPool);
  +_rpmgiPool = rpmioFreePool(_rpmgiPool);
  +
   _rpmdsPool = rpmioFreePool(_rpmdsPool);
   _rpmfiPool = rpmioFreePool(_rpmfiPool);
  +_headerPool = rpmioFreePool(_headerPool);
   
   /* XXX this should be done in the rpmioClean() wrapper. */
   /* keeps memory leak checkers quiet */
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmgi.c
  
  $ cvs diff -u -r2.52 -r2.52.2.1 rpmgi.c
  --- rpm/lib/rpmgi.c   9 Feb 2008 16:35:48 -   2.52
  +++ rpm/lib/rpmgi.c   18 Mar 2009 20:08:02 -  2.52.2.1
  @@ -36,6 +36,21 @@
   /*...@unchecked@*/
   rpmgiFlags giFlags = RPMGI_NONE;
   
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmgiPool;
  +
  +static rpmgi rpmgiGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmgi gi;
  +
  +if (_rpmgiPool == NULL) {
  + _rpmgiPool = rpmioNewPool(gi, sizeof(*gi), -1, _rpmgi_debug);
  + pool = _rpmgiPool;
  +}
  +return (rpmgi) rpmioGetPool(pool, sizeof(*gi));
  +}
  +
   /**
*/
   /*...@unchecked@*/
  @@ -446,72 +461,46 @@
   return rpmrc;
   }
   
  -rpmgi XrpmgiUnlink(rpmgi gi, const char * msg, const char * fn, unsigned ln)
  -{
  -if (gi == NULL) return NULL;
  -
  -if (_rpmgi_debug  msg != NULL)
  -fprintf(stderr, -- gi %p -- %d %s(%s) at %s:%u\n, gi, gi-nrefs, msg, 
tagName(gi-tag), fn, ln);
  -
  -gi-nrefs--;
  -return NULL;
  -}
  -
  -rpmgi XrpmgiLink(rpmgi gi, const char * msg, const char * fn, unsigned ln)
  -{
  -if (gi == NULL) return NULL;
  -gi-nrefs++;
  -
  -if (_rpmgi_debug  msg != NULL)
  -fprintf(stderr, -- gi %p ++ %d %s(%s) at %s:%u\n, gi, gi-nrefs, msg, 
tagName(gi-tag), fn, ln);
  -
  -/*...@-refcounttrans@*/ return gi; /*...@=refcounttrans@*/
  -}
  -
   rpmgi rpmgiFree(rpmgi gi)
   {
  -if (gi == NULL)
  - return NULL;
  -
  -if (gi-nrefs  1)
  - return rpmgiUnlink(gi, rpmgiFree);
  -
  -(void) rpmgiUnlink(gi, rpmgiFree);
  +int xx;
   
  -/*...@-usereleased@*/
  +if (gi == NULL) return NULL;
   
  +yarnPossess(gi-use);
  +if (_rpmgi_debug)
  +fprintf(stderr, -- gi %p -- %ld %s(%s) at %s:%u\n, gi, 
yarnPeekLock(gi-use), 

[CVS] RPM: rpm-4_5: rpm/scripts/ rpm2cpio

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 21:15:26
  Branch: rpm-4_5  Handle: 2009031820152600

  Modified files:   (Branch: rpm-4_5)
rpm/scripts rpm2cpio

  Log:
don't use outdated lzma tool

  Summary:
RevisionChanges Path
1.2.2.4 +1  -1  rpm/scripts/rpm2cpio
  

  patch -p0 '@@ .'
  Index: rpm/scripts/rpm2cpio
  
  $ cvs diff -u -r1.2.2.3 -r1.2.2.4 rpm2cpio
  --- rpm/scripts/rpm2cpio  27 Oct 2008 07:50:27 -  1.2.2.3
  +++ rpm/scripts/rpm2cpio  18 Mar 2009 20:15:26 -  1.2.2.4
  @@ -31,6 +31,6 @@
   BZh)  dd if=$pkg ibs=$o skip=1 2/dev/null | bunzip2 ;;
   $gz*)   dd if=$pkg ibs=$o skip=1 2/dev/null | gunzip ;;
   # no magic in old lzma format, if unknown we assume that's lzma for now
  -*)dd if=$pkg ibs=$o skip=1 2/dev/null | lzma d -si -so ;;
  +*)dd if=$pkg ibs=$o skip=1 2/dev/null | unlzma ;;
   #*)echo Unrecognized rpm file: $pkg; return 1 ;;
   esac
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ poptALL.c rpmte.c rpmte.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 22:02:43
  Branch: HEAD Handle: 2009031821024201

  Modified files:
rpm CHANGES
rpm/lib poptALL.c rpmte.c rpmte.h

  Log:
- yarn: convert rpmte to a usage mutex (no refcounts).

  Summary:
RevisionChanges Path
1.2837  +1  -0  rpm/CHANGES
2.108   +3  -0  rpm/lib/poptALL.c
2.91+18 -4  rpm/lib/rpmte.c
2.58+4  -0  rpm/lib/rpmte.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2836 -r1.2837 CHANGES
  --- rpm/CHANGES   18 Mar 2009 19:59:50 -  1.2836
  +++ rpm/CHANGES   18 Mar 2009 21:02:42 -  1.2837
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.107 -r2.108 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 19:59:50 -  2.107
  +++ rpm/lib/poptALL.c 18 Mar 2009 21:02:43 -  2.108
  @@ -118,6 +118,8 @@
   
   /*...@unchecked@*/
   extern int _rpmte_debug;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmtePool;
   
   /*...@unchecked@*/
   extern int _rpmts_debug;
  @@ -455,6 +457,7 @@
   extern rpmioPool _headerPool;
   
   _rpmgiPool = rpmioFreePool(_rpmgiPool);
  +_rpmtePool = rpmioFreePool(_rpmtePool);
   
   _rpmdsPool = rpmioFreePool(_rpmdsPool);
   _rpmfiPool = rpmioFreePool(_rpmfiPool);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.c
  
  $ cvs diff -u -r2.90 -r2.91 rpmte.c
  --- rpm/lib/rpmte.c   29 Dec 2008 22:42:25 -  2.90
  +++ rpm/lib/rpmte.c   18 Mar 2009 21:02:43 -  2.91
  @@ -26,6 +26,21 @@
   /*...@access rpmts @*/   /* XXX cast */
   /*...@access rpmtsi @*/
   
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmtePool;
  +
  +static rpmte rpmteGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmte te;
  +
  +if (_rpmtePool == NULL) {
  + _rpmtePool = rpmioNewPool(te, sizeof(*te), -1, _rpmte_debug);
  + pool = _rpmtePool;
  +}
  +return (rpmte) rpmioGetPool(pool, sizeof(*te));
  +}
  +
   void rpmteCleanDS(rpmte te)
   {
   te-PRCO = rpmdsFreePRCO(te-PRCO);
  @@ -77,7 +92,6 @@
   
   p-h = headerFree(p-h);
   
  -memset(p, 0, sizeof(*p));/* XXX trash and burn */
   /*...@-nullstate@*/ /* FIX: p-{NEVR,name} annotations */
   return;
   /*...@=nullstate@*/
  @@ -207,9 +221,9 @@
   rpmte rpmteFree(rpmte te)
   {
   if (te != NULL) {
  + yarnPossess(te-use); /* XXX no refcounts, rpioPutPool expects locked. 
*/
delTE(te);
  - memset(te, 0, sizeof(*te)); /* XXX trash and burn */
  - te = _free(te);
  + te = (rpmte)rpmioPutPool((rpmioItem)te);
   }
   return NULL;
   }
  @@ -222,7 +236,7 @@
alKey pkgKey)
   {
   HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  -rpmte p = xcalloc(1, sizeof(*p));
  +rpmte p = rpmteGetPool(_rpmtePool);
   int xx;
   
   p-type = type;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.h
  
  $ cvs diff -u -r2.57 -r2.58 rpmte.h
  --- rpm/lib/rpmte.h   29 Dec 2008 22:42:25 -  2.57
  +++ rpm/lib/rpmte.h   18 Mar 2009 21:02:43 -  2.58
  @@ -89,6 +89,10 @@
* A single package instance to be installed/removed atomically.
*/
   struct rpmte_s {
  +yarnLock use;/*! use count -- return to pool when zero */
  +/*...@shared@*/ /*...@null@*/
  +void *pool;  /*! pool (or NULL if malloc'd) */
  +
   rpmElementType type; /*! Package disposition (installed/removed). */
   
   /*...@refcounted@*/ /*...@relnull@*/
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ poptALL.c rpmte.c rpmte.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 22:19:56
  Branch: rpm-5_1  Handle: 2009031821195501

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib poptALL.c rpmte.c rpmte.h

  Log:
- jbj: yarn: convert rpmte to a usage mutex (no refcounts).

  Summary:
RevisionChanges Path
1.2288.2.210+1  -0  rpm/CHANGES
2.90.2.8+3  -0  rpm/lib/poptALL.c
2.79.2.4+18 -4  rpm/lib/rpmte.c
2.47.2.1+4  -0  rpm/lib/rpmte.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.209 -r1.2288.2.210 CHANGES
  --- rpm/CHANGES   18 Mar 2009 20:08:01 -  1.2288.2.209
  +++ rpm/CHANGES   18 Mar 2009 21:19:55 -  1.2288.2.210
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
   - jbj: yarn: add generic Link/Unlink refcount diddlers.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.90.2.7 -r2.90.2.8 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 20:08:02 -  2.90.2.7
  +++ rpm/lib/poptALL.c 18 Mar 2009 21:19:56 -  2.90.2.8
  @@ -106,6 +106,8 @@
   
   /*...@unchecked@*/
   extern int _rpmte_debug;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmtePool;
   
   /*...@unchecked@*/
   extern int _rpmts_debug;
  @@ -441,6 +443,7 @@
   extern rpmioPool _headerPool;
   
   _rpmgiPool = rpmioFreePool(_rpmgiPool);
  +_rpmtePool = rpmioFreePool(_rpmtePool);
   
   _rpmdsPool = rpmioFreePool(_rpmdsPool);
   _rpmfiPool = rpmioFreePool(_rpmfiPool);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.c
  
  $ cvs diff -u -r2.79.2.3 -r2.79.2.4 rpmte.c
  --- rpm/lib/rpmte.c   22 May 2008 20:50:15 -  2.79.2.3
  +++ rpm/lib/rpmte.c   18 Mar 2009 21:19:56 -  2.79.2.4
  @@ -23,6 +23,21 @@
   /*...@access alKey @*/
   /*...@access rpmtsi @*/
   
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmtePool;
  +
  +static rpmte rpmteGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmte te;
  +
  +if (_rpmtePool == NULL) {
  + _rpmtePool = rpmioNewPool(te, sizeof(*te), -1, _rpmte_debug);
  + pool = _rpmtePool;
  +}
  +return (rpmte) rpmioGetPool(pool, sizeof(*te));
  +}
  +
   void rpmteCleanDS(rpmte te)
   {
   te-PRCO = rpmdsFreePRCO(te-PRCO);
  @@ -75,7 +90,6 @@
   
   p-h = headerFree(p-h);
   
  -memset(p, 0, sizeof(*p));/* XXX trash and burn */
   /*...@-nullstate@*/ /* FIX: p-{NEVR,name} annotations */
   return;
   /*...@=nullstate@*/
  @@ -208,9 +222,9 @@
   rpmte rpmteFree(rpmte te)
   {
   if (te != NULL) {
  + yarnPossess(te-use); /* XXX no refcounts, rpioPutPool expects locked. 
*/
delTE(te);
  - memset(te, 0, sizeof(*te)); /* XXX trash and burn */
  - te = _free(te);
  + te = (rpmte)rpmioPutPool((rpmioItem)te);
   }
   return NULL;
   }
  @@ -223,7 +237,7 @@
alKey pkgKey)
   {
   HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  -rpmte p = xcalloc(1, sizeof(*p));
  +rpmte p = rpmteGetPool(_rpmtePool);
   int xx;
   
   p-type = type;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.h
  
  $ cvs diff -u -r2.47 -r2.47.2.1 rpmte.h
  --- rpm/lib/rpmte.h   12 Mar 2008 18:11:08 -  2.47
  +++ rpm/lib/rpmte.h   18 Mar 2009 21:19:56 -  2.47.2.1
  @@ -87,6 +87,10 @@
* A single package instance to be installed/removed atomically.
*/
   struct rpmte_s {
  +yarnLock use;/*! use count -- return to pool when zero */
  +/*...@shared@*/ /*...@null@*/
  +void *pool;  /*! pool (or NULL if malloc'd) */
  +
   rpmElementType type; /*! Package disposition (installed/removed). */
   
   /*...@refcounted@*/ /*...@relnull@*/
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmdb/ header.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 23:02:18
  Branch: rpm-5_1  Handle: 2009031822021701

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmdb   header.c

  Log:
- headerReload: fix: don't free the header blob.

  Summary:
RevisionChanges Path
1.2288.2.211+1  -0  rpm/CHANGES
1.153.2.8   +0  -2  rpm/rpmdb/header.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.210 -r1.2288.2.211 CHANGES
  --- rpm/CHANGES   18 Mar 2009 21:19:55 -  1.2288.2.210
  +++ rpm/CHANGES   18 Mar 2009 22:02:17 -  1.2288.2.211
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: headerReload: fix: don't free the header blob.
   - jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmdb/header.c
  
  $ cvs diff -u -r1.153.2.7 -r1.153.2.8 header.c
  --- rpm/rpmdb/header.c18 Mar 2009 19:29:52 -  1.153.2.7
  +++ rpm/rpmdb/header.c18 Mar 2009 22:02:18 -  1.153.2.8
  @@ -1360,8 +1360,6 @@
uh = _free(uh);
return NULL;
   }
  -if (nh-flags  HEADERFLAG_ALLOCATED)
  - uh = _free(uh);
   nh-flags |= HEADERFLAG_ALLOCATED;
   if (ENTRY_IS_REGION(nh-index)) {
if (tag == HEADER_SIGNATURES || tag == HEADER_IMMUTABLE)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ rpmds.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 23:10:36
  Branch: rpm-5_1  Handle: 2009031822103500

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib rpmds.c

  Log:
- jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...

  Summary:
RevisionChanges Path
1.2288.2.212+1  -0  rpm/CHANGES
2.94.2.11   +8  -0  rpm/lib/rpmds.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.211 -r1.2288.2.212 CHANGES
  --- rpm/CHANGES   18 Mar 2009 22:02:17 -  1.2288.2.211
  +++ rpm/CHANGES   18 Mar 2009 22:10:35 -  1.2288.2.212
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...
   - jbj: headerReload: fix: don't free the header blob.
   - jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.94.2.10 -r2.94.2.11 rpmds.c
  --- rpm/lib/rpmds.c   18 Mar 2009 19:29:51 -  2.94.2.10
  +++ rpm/lib/rpmds.c   18 Mar 2009 22:10:35 -  2.94.2.11
  @@ -555,7 +555,11 @@
   V = _free(V);
   R = _free(R);
   
  +#ifdef   BUGGY
  +ds = rpmdsGetPool(_rpmdsPool);
  +#else
   ds = rpmdsGetPool(NULL);
  +#endif
   ds-Type = Type;
   ds-tagN = tagN;
   ds-Count = 1;
  @@ -590,7 +594,11 @@
   
   Type = rpmdsTagName(tagN);
   
  +#ifdef   BUGGY
   ds = rpmdsGetPool(_rpmdsPool);
  +#else
  +ds = rpmdsGetPool(NULL);
  +#endif
   ds-Type = Type;
   ds-tagN = tagN;
   ds-A = NULL;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmds.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 23:11:21
  Branch: HEAD Handle: 2009031822112100

  Modified files:
rpm CHANGES
rpm/lib rpmds.c

  Log:
- rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...

  Summary:
RevisionChanges Path
1.2839  +1  -0  rpm/CHANGES
2.132   +8  -0  rpm/lib/rpmds.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2838 -r1.2839 CHANGES
  --- rpm/CHANGES   18 Mar 2009 21:54:05 -  1.2838
  +++ rpm/CHANGES   18 Mar 2009 22:11:21 -  1.2839
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...
   - jbj: headerReload: fix: don't free the header blob.
   - jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.131 -r2.132 rpmds.c
  --- rpm/lib/rpmds.c   18 Mar 2009 18:36:38 -  2.131
  +++ rpm/lib/rpmds.c   18 Mar 2009 22:11:21 -  2.132
  @@ -578,7 +578,11 @@
   V = _free(V);
   R = _free(R);
   
  +#ifdef   BUGGY
  +ds = rpmdsGetPool(_rpmdsPool);
  +#else
   ds = rpmdsGetPool(NULL);
  +#endif
   ds-Type = Type;
   ds-tagN = tagN;
   ds-Count = 1;
  @@ -613,7 +617,11 @@
   
   Type = rpmdsTagName(tagN);
   
  +#ifdef   BUGGY
   ds = rpmdsGetPool(_rpmdsPool);
  +#else
  +ds = rpmdsGetPool(NULL);
  +#endif
   ds-Type = Type;
   ds-tagN = tagN;
   ds-A = NULL;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmdb/ header.c

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 22:54:05
  Branch: HEAD Handle: 2009031821540500

  Modified files:
rpm CHANGES
rpm/rpmdb   header.c

  Log:
- headerReload: fix: don't free the header blob.

  Summary:
RevisionChanges Path
1.2838  +1  -0  rpm/CHANGES
1.172   +0  -2  rpm/rpmdb/header.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2837 -r1.2838 CHANGES
  --- rpm/CHANGES   18 Mar 2009 21:02:42 -  1.2837
  +++ rpm/CHANGES   18 Mar 2009 21:54:05 -  1.2838
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: headerReload: fix: don't free the header blob.
   - jbj: yarn: convert rpmte to a usage mutex (no refcounts).
   - jbj: yarn: convert rpmgi refcount to usage mutex.
   - jbj: yarn: use the pool changes where possible.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmdb/header.c
  
  $ cvs diff -u -r1.171 -r1.172 header.c
  --- rpm/rpmdb/header.c18 Mar 2009 18:36:37 -  1.171
  +++ rpm/rpmdb/header.c18 Mar 2009 21:54:05 -  1.172
  @@ -1361,8 +1361,6 @@
uh = _free(uh);
return NULL;
   }
  -if (nh-flags  HEADERFLAG_ALLOCATED)
  - uh = _free(uh);
   nh-flags |= HEADERFLAG_ALLOCATED;
   if (ENTRY_IS_REGION(nh-index)) {
if (tag == HEADER_SIGNATURES || tag == HEADER_IMMUTABLE)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ librpm.vers poptALL.c rpmps.c rpmps.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   18-Mar-2009 23:31:40
  Branch: HEAD Handle: 2009031822313900

  Modified files:
rpm CHANGES
rpm/lib librpm.vers poptALL.c rpmps.c rpmps.h

  Log:
- yarn: convert rpmps refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2840  +1  -0  rpm/CHANGES
1.58+0  -2  rpm/lib/librpm.vers
2.109   +4  -0  rpm/lib/poptALL.c
2.29+37 -15 rpm/lib/rpmps.c
2.24+10 -19 rpm/lib/rpmps.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2839 -r1.2840 CHANGES
  --- rpm/CHANGES   18 Mar 2009 22:11:21 -  1.2839
  +++ rpm/CHANGES   18 Mar 2009 22:31:39 -  1.2840
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: convert rpmps refcount to usage mutex.
   - jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...
   - jbj: headerReload: fix: don't free the header blob.
   - jbj: yarn: convert rpmte to a usage mutex (no refcounts).
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.57 -r1.58 librpm.vers
  --- rpm/lib/librpm.vers   18 Mar 2009 19:59:50 -  1.57
  +++ rpm/lib/librpm.vers   18 Mar 2009 22:31:39 -  1.58
  @@ -408,10 +408,8 @@
   tarHeaderRead;
   tarHeaderWrite;
   tarTrailerWrite;
  -XrpmpsLink;
   XrpmpsmLink;
   XrpmpsmUnlink;
  -XrpmpsUnlink;
   XrpmsxLink;
   XrpmsxUnlink;
   XrpmtsiFree;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.108 -r2.109 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 21:02:43 -  2.108
  +++ rpm/lib/poptALL.c 18 Mar 2009 22:31:39 -  2.109
  @@ -109,6 +109,8 @@
   
   /*...@unchecked@*/
   extern int _rpmps_debug;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmpsPool;
   
   /*...@unchecked@*/
   extern int _rpmsq_debug;
  @@ -457,7 +459,9 @@
   extern rpmioPool _headerPool;
   
   _rpmgiPool = rpmioFreePool(_rpmgiPool);
  +
   _rpmtePool = rpmioFreePool(_rpmtePool);
  +_rpmpsPool = rpmioFreePool(_rpmpsPool);
   
   _rpmdsPool = rpmioFreePool(_rpmdsPool);
   _rpmfiPool = rpmioFreePool(_rpmfiPool);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmps.c
  
  $ cvs diff -u -r2.28 -r2.29 rpmps.c
  --- rpm/lib/rpmps.c   7 Oct 2008 20:05:56 -   2.28
  +++ rpm/lib/rpmps.c   18 Mar 2009 22:31:39 -  2.29
  @@ -19,6 +19,23 @@
   /*...@unchecked@*/
   int _rpmps_debug = 0;
   
  +
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmpsPool;
  +
  +static rpmps rpmpsGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmps ps;
  +
  +if (_rpmpsPool == NULL) {
  + _rpmpsPool = rpmioNewPool(ps, sizeof(*ps), -1, _rpmps_debug);
  + pool = _rpmpsPool;
  +}
  +return (rpmps) rpmioGetPool(pool, sizeof(*ps));
  +}
  +
  +#ifdef   DYING
   rpmps XrpmpsUnlink(rpmps ps, const char * msg,
const char * fn, unsigned ln)
   {
  @@ -44,6 +61,7 @@
   return ps;
   /*...@=refcounttrans@*/
   }
  +#endif
   
   int rpmpsNumProblems(rpmps ps)
   {
  @@ -98,28 +116,32 @@
   
   rpmps rpmpsCreate(void)
   {
  -rpmps ps = xcalloc(1, sizeof(*ps));
  +rpmps ps = rpmpsGetPool(_rpmpsPool);
   return rpmpsLink(ps, create);
   }
   
   rpmps rpmpsFree(rpmps ps)
   {
   if (ps == NULL) return NULL;
  -ps = rpmpsUnlink(ps, dereference);
  -if (ps-nrefs  0)
  - return NULL;
  - 
  -if (ps-probs) {
  - int i;
  - for (i = 0; i  ps-numProblems; i++) {
  - rpmProblem p = ps-probs + i;
  - p-pkgNEVR = _free(p-pkgNEVR);
  - p-altNEVR = _free(p-altNEVR);
  - p-str1 = _free(p-str1);
  +yarnPossess(ps-use);
  +/*...@-modfilesys@*/
  +if (_rpmps_debug)
  +fprintf(stderr, -- ps %p -- %d %s at %s:%u\n, ps, yarnPeekLock(ps-use), 
rpmpsFree, __FILE__, __LINE__);
  +/*...@=modfilesys@*/
  +if (yarnPeekLock(ps-use) = 1L) {
  + if (ps-probs) {
  + int i;
  + for (i = 0; i  ps-numProblems; i++) {
  + rpmProblem p = ps-probs + i;
  + p-pkgNEVR = _free(p-pkgNEVR);
  + p-altNEVR = _free(p-altNEVR);
  + p-str1 = _free(p-str1);
  + }
  +  

[CVS] RPM: rpm/ CHANGES rpm/lib/ poptALL.c rpmte.c rpmte.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   19-Mar-2009 00:23:56
  Branch: HEAD Handle: 2009031823235501

  Modified files:
rpm CHANGES
rpm/lib poptALL.c rpmte.c rpmte.h

  Log:
- yarn: convert rpmtsi refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2842  +1  -0  rpm/CHANGES
2.111   +3  -0  rpm/lib/poptALL.c
2.92+30 -14 rpm/lib/rpmte.c
2.59+4  -0  rpm/lib/rpmte.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2841 -r1.2842 CHANGES
  --- rpm/CHANGES   18 Mar 2009 22:58:33 -  1.2841
  +++ rpm/CHANGES   18 Mar 2009 23:23:55 -  1.2842
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: convert rpmtsi refcount to usage mutex.
   - jbj: yarn: convert rpmsx refcount to usage mutex.
   - jbj: yarn: convert rpmps refcount to usage mutex.
   - jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.110 -r2.111 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 22:58:33 -  2.110
  +++ rpm/lib/poptALL.c 18 Mar 2009 23:23:56 -  2.111
  @@ -124,6 +124,8 @@
   extern int _rpmte_debug;
   /*...@unchecked@*/
   extern rpmioPool _rpmtePool;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmtsiPool;
   
   /*...@unchecked@*/
   extern int _rpmts_debug;
  @@ -462,6 +464,7 @@
   
   _rpmgiPool = rpmioFreePool(_rpmgiPool);
   
  +_rpmtsiPool = rpmioFreePool(_rpmtsiPool);
   _rpmtePool = rpmioFreePool(_rpmtePool);
   _rpmpsPool = rpmioFreePool(_rpmpsPool);
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.c
  
  $ cvs diff -u -r2.91 -r2.92 rpmte.c
  --- rpm/lib/rpmte.c   18 Mar 2009 21:02:43 -  2.91
  +++ rpm/lib/rpmte.c   18 Mar 2009 23:23:56 -  2.92
  @@ -41,6 +41,22 @@
   return (rpmte) rpmioGetPool(pool, sizeof(*te));
   }
   
  +
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmtsiPool;
  +
  +static rpmtsi rpmtsiGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmtsi tsi;
  +
  +if (_rpmtsiPool == NULL) {
  + _rpmtsiPool = rpmioNewPool(tsi, sizeof(*tsi), -1, _rpmte_debug);/* 
XXX _rpmtsi_debug? */
  + pool = _rpmtsiPool;
  +}
  +return (rpmtsi) rpmioGetPool(pool, sizeof(*tsi));
  +}
  +
   void rpmteCleanDS(rpmte te)
   {
   te-PRCO = rpmdsFreePRCO(te-PRCO);
  @@ -717,33 +733,33 @@
   rpmtsi XrpmtsiFree(/*...@only@*//*...@null@*/ rpmtsi tsi,
const char * fn, unsigned int ln)
   {
  -/* XXX watchout: a funky recursion segfaults here iff nrefs is wrong. */
  +if (tsi == NULL) return NULL;
  +yarnPossess(tsi-use);
  +/*...@-modfilesys@*/
  +if (_rpmte_debug)
  +fprintf(stderr, *** tsi %p -- %ld %s at %s:%d\n, tsi, 
yarnPeekLock(tsi-use), rpmtsiFree, fn, ln);
  +/*...@=modfilesys@*/
  +if (yarnPeekLock(tsi-use) = 1L) {
   /*...@-internalglobs@*/
  -if (tsi)
tsi-ts = rpmtsFree(tsi-ts);
   /*...@=internalglobs@*/
  + tsi = (rpmtsi) rpmioPutPool((rpmioItem)tsi);
  +} else
  + yarnTwist(tsi-use, BY, -1);
   
  -/*...@-modfilesys@*/
  -if (_rpmte_debug)
  -fprintf(stderr, *** tsi %p -- %s:%d\n, tsi, fn, ln);
  -/*...@=modfilesys@*/
  -return _free(tsi);
  +return NULL;
   }
   
   rpmtsi XrpmtsiInit(rpmts ts, const char * fn, unsigned int ln)
   {
  -rpmtsi tsi = NULL;
  +rpmtsi tsi = rpmtsiGetPool(_rpmtsiPool);
   
  -tsi = xcalloc(1, sizeof(*tsi));
   tsi-ts = rpmtsLink(ts, rpmtsi);
   tsi-reverse = 0;
   tsi-oc = (tsi-reverse ? (rpmtsNElements(ts) - 1) : 0);
   tsi-ocsave = tsi-oc;
  -/*...@-modfilesys@*/
  -if (_rpmte_debug)
  -fprintf(stderr, *** tsi %p ++ %s:%d\n, tsi, fn, ln);
  -/*...@=modfilesys@*/
  -return tsi;
  +
  +return (rpmtsi) rpmioLinkPoolItem((rpmioItem)tsi, rpmtsiInit, fn, ln);
   }
   
   /**
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.h
  
  $ cvs diff -u -r2.58 -r2.59 rpmte.h
  --- rpm/lib/rpmte.h   18 Mar 2009 21:02:43 -  2.58
  +++ rpm/lib/rpmte.h   18 Mar 2009 23:23:56 -  2.59
  @@ -185,6 +185,10 @@
* Iterator across transaction elements, forward on install, backward on 
erase.
*/
   struct rpmtsi_s {
  +yarnLock use;  

[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ poptALL.c rpmte.c rpmte.h

2009-03-18 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   19-Mar-2009 00:24:31
  Branch: rpm-5_1  Handle: 2009031823243000

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib poptALL.c rpmte.c rpmte.h

  Log:
- yarn: convert rpmtsi refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2288.2.215+1  -0  rpm/CHANGES
2.90.2.11   +3  -0  rpm/lib/poptALL.c
2.79.2.5+30 -14 rpm/lib/rpmte.c
2.47.2.2+4  -0  rpm/lib/rpmte.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.214 -r1.2288.2.215 CHANGES
  --- rpm/CHANGES   18 Mar 2009 22:58:58 -  1.2288.2.214
  +++ rpm/CHANGES   18 Mar 2009 23:24:30 -  1.2288.2.215
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: convert rpmtsi refcount to usage mutex.
   - jbj: yarn: convert rpmsx refcount to usage mutex.
   - jbj: yarn: convert rpmps refcount to usage mutex.
   - jbj: rpmds: fix: avoid pooling rpmdsThis/rpmdsSingle for now ...
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/poptALL.c
  
  $ cvs diff -u -r2.90.2.10 -r2.90.2.11 poptALL.c
  --- rpm/lib/poptALL.c 18 Mar 2009 22:58:58 -  2.90.2.10
  +++ rpm/lib/poptALL.c 18 Mar 2009 23:24:30 -  2.90.2.11
  @@ -112,6 +112,8 @@
   extern int _rpmte_debug;
   /*...@unchecked@*/
   extern rpmioPool _rpmtePool;
  +/*...@unchecked@*/
  +extern rpmioPool _rpmtsiPool;
   
   /*...@unchecked@*/
   extern int _rpmts_debug;
  @@ -448,6 +450,7 @@
   
   _rpmgiPool = rpmioFreePool(_rpmgiPool);
   
  +_rpmtsiPool = rpmioFreePool(_rpmtsiPool);
   _rpmtePool = rpmioFreePool(_rpmtePool);
   _rpmpsPool = rpmioFreePool(_rpmpsPool);
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.c
  
  $ cvs diff -u -r2.79.2.4 -r2.79.2.5 rpmte.c
  --- rpm/lib/rpmte.c   18 Mar 2009 21:19:56 -  2.79.2.4
  +++ rpm/lib/rpmte.c   18 Mar 2009 23:24:30 -  2.79.2.5
  @@ -38,6 +38,22 @@
   return (rpmte) rpmioGetPool(pool, sizeof(*te));
   }
   
  +
  +/*...@unchecked@*/ /*...@null@*/
  +rpmioPool _rpmtsiPool;
  +
  +static rpmtsi rpmtsiGetPool(/*...@null@*/ rpmioPool pool)
  + /*...@modifies pool @*/
  +{
  +rpmtsi tsi;
  +
  +if (_rpmtsiPool == NULL) {
  + _rpmtsiPool = rpmioNewPool(tsi, sizeof(*tsi), -1, _rpmte_debug);/* 
XXX _rpmtsi_debug? */
  + pool = _rpmtsiPool;
  +}
  +return (rpmtsi) rpmioGetPool(pool, sizeof(*tsi));
  +}
  +
   void rpmteCleanDS(rpmte te)
   {
   te-PRCO = rpmdsFreePRCO(te-PRCO);
  @@ -706,33 +722,33 @@
   rpmtsi XrpmtsiFree(/*...@only@*//*...@null@*/ rpmtsi tsi,
const char * fn, unsigned int ln)
   {
  -/* XXX watchout: a funky recursion segfaults here iff nrefs is wrong. */
  +if (tsi == NULL) return NULL;
  +yarnPossess(tsi-use);
  +/*...@-modfilesys@*/
  +if (_rpmte_debug)
  +fprintf(stderr, *** tsi %p -- %ld %s at %s:%d\n, tsi, 
yarnPeekLock(tsi-use), rpmtsiFree, fn, ln);
  +/*...@=modfilesys@*/
  +if (yarnPeekLock(tsi-use) = 1L) {
   /*...@-internalglobs@*/
  -if (tsi)
tsi-ts = rpmtsFree(tsi-ts);
   /*...@=internalglobs@*/
  + tsi = (rpmtsi) rpmioPutPool((rpmioItem)tsi);
  +} else
  + yarnTwist(tsi-use, BY, -1);
   
  -/*...@-modfilesys@*/
  -if (_rpmte_debug)
  -fprintf(stderr, *** tsi %p -- %s:%d\n, tsi, fn, ln);
  -/*...@=modfilesys@*/
  -return _free(tsi);
  +return NULL;
   }
   
   rpmtsi XrpmtsiInit(rpmts ts, const char * fn, unsigned int ln)
   {
  -rpmtsi tsi = NULL;
  +rpmtsi tsi = rpmtsiGetPool(_rpmtsiPool);
   
  -tsi = xcalloc(1, sizeof(*tsi));
   tsi-ts = rpmtsLink(ts, rpmtsi);
   tsi-reverse = 0;
   tsi-oc = (tsi-reverse ? (rpmtsNElements(ts) - 1) : 0);
   tsi-ocsave = tsi-oc;
  -/*...@-modfilesys@*/
  -if (_rpmte_debug)
  -fprintf(stderr, *** tsi %p ++ %s:%d\n, tsi, fn, ln);
  -/*...@=modfilesys@*/
  -return tsi;
  +
  +return (rpmtsi) rpmioLinkPoolItem((rpmioItem)tsi, rpmtsiInit, fn, ln);
   }
   
   /**
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmte.h
  
  $ cvs diff -u -r2.47.2.1 -r2.47.2.2 rpmte.h
  --- rpm/lib/rpmte.h   18 Mar 2009 21:19:56 -  2.47.2.1
  +++ rpm/lib/rpmte.h   18 Mar 2009 23:24:30 -  2.47.2.2
  @@ -175,6 +175,10 @@
* Iterator across transaction elements, 

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmrc.c

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   19-Mar-2009 01:20:18
  Branch: HEAD Handle: 2009031900201701

  Modified files:
rpm CHANGES
rpm/lib rpmrc.c

  Log:
libcpuinfo may now return 64bit feature only if PER_LINUX_32BIT 
personality
isn't set, so don't check un.machine anymore.

  Summary:
RevisionChanges Path
1.2843  +2  -0  rpm/CHANGES
2.269   +4  -5  rpm/lib/rpmrc.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2842 -r1.2843 CHANGES
  --- rpm/CHANGES   18 Mar 2009 23:23:55 -  1.2842
  +++ rpm/CHANGES   19 Mar 2009 00:20:17 -  1.2843
  @@ -1,5 +1,7 @@
   
   5.2a3 - 5.2a4:
  +- proyvind: libcpuinfo may now return 64bit feature only if 
PER_LINUX_32BIT
  + personality isn't set, so don't check un.machine anymore.
   - jbj: yarn: convert rpmtsi refcount to usage mutex.
   - jbj: yarn: convert rpmsx refcount to usage mutex.
   - jbj: yarn: convert rpmps refcount to usage mutex.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.268 -r2.269 rpmrc.c
  --- rpm/lib/rpmrc.c   17 Mar 2009 16:32:16 -  2.268
  +++ rpm/lib/rpmrc.c   19 Mar 2009 00:20:18 -  2.269
  @@ -514,7 +514,6 @@
   static rpmRC rpmCpuinfo(void)
   {
   rpmRC rc = RPMRC_FAIL;
  -static struct utsname un;
   const char *cpu;
   miRE mi_re = NULL;
   int mi_nre = 0;
  @@ -522,11 +521,10 @@
   CVOG_t cvog = NULL;
   rpmds cpuinfo = NULL;
   
  -uname(un);
   xx = rpmdsCpuinfo(cpuinfo, NULL);
   
   if(rpmCpuinfoMatch(cpuinfo([x86]), cpuinfo)) {
  - if(rpmCpuinfoMatch(cpuinfo(64bit), cpuinfo)  strcmp(un.machine, 
x86_64) == 0)
  + if(rpmCpuinfoMatch(cpuinfo(64bit), cpuinfo))
{
xx = mireAppend(RPMMIRE_REGEX, 0, x86_64, NULL, mi_re, mi_nre);
xx = mireAppend(RPMMIRE_REGEX, 0, amd64, NULL, mi_re, mi_nre);
  @@ -555,7 +553,7 @@
   }
   
   if(rpmCpuinfoMatch(cpuinfo([ppc]), cpuinfo)) {
  - if(rpmCpuinfoMatch(cpuinfo(64bit), cpuinfo)  strcmp(un.machine, 
ppc64) == 0)
  + if(rpmCpuinfoMatch(cpuinfo(64bit), cpuinfo))
xx = mireAppend(RPMMIRE_REGEX, 0, ppc64, NULL, mi_re, mi_nre);
xx = mireAppend(RPMMIRE_REGEX, 0, ppc, NULL, mi_re, mi_nre);
xx = mireAppend(RPMMIRE_REGEX, 0, fat, NULL, mi_re, mi_nre);
  @@ -565,6 +563,7 @@
xx = mireAppend(RPMMIRE_REGEX, 0, ia64, NULL, mi_re, mi_nre);
   
   #if defined(__mips__)
  +/* XXX: Better ways to determine endianness? */
   #if defined(__MIPSEL__)
   #define mips32 mipsel
   #define mips64 mips64el
  @@ -573,7 +572,7 @@
   #define mips64 mips64
   #endif
   /* XXX: libcpuinfo only have irix support for now.. */
  -if(strcmp(un.machine, mips64) == 0)
  +if(rpmCpuinfoMatch(cpuinfo(64bit), cpuinfo))
xx = mireAppend(RPMMIRE_REGEX, 0, mips64, NULL, mi_re, mi_nre);
   xx = mireAppend(RPMMIRE_REGEX, 0, mips32, NULL, mi_re, mi_nre);
   #endif
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/scripts/ rpm2cpio

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   19-Mar-2009 02:01:24
  Branch: HEAD Handle: 2009031901012400

  Modified files:
rpm/scripts rpm2cpio

  Log:
add xz support

  Summary:
RevisionChanges Path
1.6 +2  -0  rpm/scripts/rpm2cpio
  

  patch -p0 '@@ .'
  Index: rpm/scripts/rpm2cpio
  
  $ cvs diff -u -r1.5 -r1.6 rpm2cpio
  --- rpm/scripts/rpm2cpio  23 Nov 2007 13:06:18 -  1.5
  +++ rpm/scripts/rpm2cpio  19 Mar 2009 01:01:24 -  1.6
  @@ -29,6 +29,8 @@
DECOMPRESSOR=gunzip
   elif echo $COMPRESSION |grep -q bzip2; then
DECOMPRESSOR=bunzip2
  +elif echo $COMPRESSION |grep -q xz; then
  + DECOMPRESSOR=unxz
   elif echo $COMPRESSION |grep -q cpio; then
DECOMPRESSOR=cat
   else
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-4_5: rpm/ CHANGES rpm/build/ pack.c parsePrep.c rpm/ co...

2009-03-18 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   19-Mar-2009 02:04:43
  Branch: rpm-4_5  Handle: 2009031901044002

  Added files:  (Branch: rpm-4_5)
rpm/rpmio   xzdio.c
  Modified files:   (Branch: rpm-4_5)
rpm CHANGES configure.ac macros.in
rpm/build   pack.c parsePrep.c
rpm/lib rpmds.c
rpm/rpmio   Makefile.am macro.c rpmio.c rpmio.h rpmmacro.h

  Log:
backport xz/lzma payload support through liblzma.

  Summary:
RevisionChanges Path
1.1360.2.123+1  -0  rpm/CHANGES
2.212.2.4   +5  -0  rpm/build/pack.c
2.69.2.5+6  -0  rpm/build/parsePrep.c
2.70.2.30   +16 -0  rpm/configure.ac
2.55.2.7+7  -0  rpm/lib/rpmds.c
1.159.2.14  +2  -1  rpm/macros.in
1.77.2.7+2  -1  rpm/rpmio/Makefile.am
2.117.2.4   +4  -0  rpm/rpmio/macro.c
1.79.2.9+21 -2  rpm/rpmio/rpmio.c
1.51.2.6+4  -0  rpm/rpmio/rpmio.h
2.39.2.2+2  -1  rpm/rpmio/rpmmacro.h
1.11.4.2+478 -0 rpm/rpmio/xzdio.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.1360.2.122 -r1.1360.2.123 CHANGES
  --- rpm/CHANGES   18 Mar 2009 19:29:30 -  1.1360.2.122
  +++ rpm/CHANGES   19 Mar 2009 01:04:40 -  1.1360.2.123
  @@ -1,4 +1,5 @@
   4.4.9 - 4.5:
  + - proyvind: backport xz/lzma payload support through liblzma.
- proyvind: make OSSP uuid support optional.
- glen: set failed state on upgrade if package reopen failed to avoid 
losing pkg info from db
- glen: scripts/rpm2cpio: avoid awk, use pure echo (from PLD)
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/pack.c
  
  $ cvs diff -u -r2.212.2.3 -r2.212.2.4 pack.c
  --- rpm/build/pack.c  16 Dec 2007 22:28:09 -  2.212.2.3
  +++ rpm/build/pack.c  19 Mar 2009 01:04:41 -  2.212.2.4
  @@ -577,6 +577,11 @@
lzma, 1);
(void) rpmlibNeedsFeature(h, PayloadIsLzma, 4.4.6-1);
}
  + else if (s[1] == 'x'  s[2] == 'z') {
  + (void) headerAddEntry(h, RPMTAG_PAYLOADCOMPRESSOR, RPM_STRING_TYPE,
  + xz, 1);
  + (void) rpmlibNeedsFeature(h, PayloadIsXz, 5.2-1);
  + }
strcpy(buf, rpmio_flags);
buf[s - rpmio_flags] = '\0';
(void) headerAddEntry(h, RPMTAG_PAYLOADFLAGS, RPM_STRING_TYPE, buf+1, 
1);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/parsePrep.c
  
  $ cvs diff -u -r2.69.2.4 -r2.69.2.5 parsePrep.c
  --- rpm/build/parsePrep.c 8 Nov 2007 00:26:48 -   2.69.2.4
  +++ rpm/build/parsePrep.c 19 Mar 2009 01:04:41 -  2.69.2.5
  @@ -148,6 +148,9 @@
case COMPRESSED_LZMA:
zipper = %{__lzma};
break;
  + case COMPRESSED_XZ:
  + zipper = %{__xz};
  + break;
}
zipper = rpmGetPath(zipper, NULL);
   
  @@ -251,6 +254,9 @@
case COMPRESSED_LZMA:
t = %{__lzma} -dc;
break;
  + case COMPRESSED_XZ:
  + t = %{__xz} -dc;
  + break;
case COMPRESSED_ZIP:
if (rpmIsVerbose()  !quietly)
t = %{__unzip};
  @@ .
  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.70.2.29 -r2.70.2.30 configure.ac
  --- rpm/configure.ac  18 Mar 2009 20:01:21 -  2.70.2.29
  +++ rpm/configure.ac  19 Mar 2009 01:04:40 -  2.70.2.30
  @@ -300,6 +300,7 @@
   AC_PATH_PROG(__UNZIP, unzip, %{_bindir}/unzip, $MYPATH)
   AC_PATH_PROG(__WGET, wget, %{_bindir}/wget, $MYPATH)
   AC_PATH_PROG(__XAR, xar, %{_bindir}/xar, $MYPATH)
  +AC_PATH_PROG(__XZ, xz, %{_bindir}/xz, $MYPATH)
   
   AC_PATH_PROG(__LD, ld, %{_bindir}/ld, $MYPATH)
   AC_PATH_PROG(__NM, nm, %{_bindir}/nm, $MYPATH)
  @@ -364,6 +365,21 @@
   
   #=
   
  +#=
  +# Check for xz library. Prefer external, otherwise none.
  +
  +WITH_XZ_INCLUDE=
  +AC_CHECK_LIB(lzma, lzma_auto_decoder, [
  +   WITH_XZ=1
  +   LIBS=$LIBS -llzma
  +   AC_DEFINE(HAVE_LZMA_H, 1, [Define as 1 if you have lzma.h]) ], 
  +   WITH_XZ=0)
  +AC_SUBST(WITH_XZ)
  +AC_SUBST(WITH_XZ_INCLUDE)
  +
  +#=
  +
  +
   localdone=
   
   dirs=$prefix
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmds.c