Dunno the apt-rpm C++ issue well enuf to know the answer with the
change I just committed.
Note that rpmdsSingle() declaration was outside
#ifdef __cplusplus
extern C {
#endif
...
#ifdef __cplusplus
}
#endif
wrapping. So I think that might have been the root cause of the apt-rpm
infinite loop.
Again, I'm as clueless as possible wrto C++ issues. C for me, life's
too short.
hth
73 de Jeff
On Jul 18, 2008, at 9:05 AM, Bernhard Rosenkraenzer wrote:
> RPM Package Manager, CVS Repository
> http://rpm5.org/cvs/
>
> ______________________________________________________________________
> ______
>
> Server: rpm5.org Name: Bernhard
> Rosenkraenzer
> Root: /v/rpm/cvs Email: bero@rpm5.org
> Module: rpm Date: 18-Jul-2008
> 15:05:34
> Branch: rpm-5_1 Handle: 2008071813053400
>
> Modified files: (Branch: rpm-5_1)
> rpm CHANGES
> rpm/lib rpm4compat.h
>
> Log:
> rpm4compat.h needs to #include <rpmds.h> -- if it doesn't, the
> overloaded
> rpmdsSingle in C++ calls itself instead of rpm5 rpmdsSingle,
> causing an infinite
> loop. Affects e.g. apt-rpm
>
> Obtained from: my earlier commit in HEAD
>
> Summary:
> Revision Changes Path
> 1.2288.2.72 +1 -0 rpm/CHANGES
> 2.10.2.1 +2 -1 rpm/lib/rpm4compat.h
>
> ______________________________________________________________________
> ______
>
> patch -p0 <<'@@ .'
> Index: rpm/CHANGES
>
> ======================================================================
> ======
> $ cvs diff -u -r1.2288.2.71 -r1.2288.2.72 CHANGES
> --- rpm/CHANGES 18 Jul 2008 09:29:14 -0000 1.2288.2.71
> +++ rpm/CHANGES 18 Jul 2008 13:05:34 -0000 1.2288.2.72
> @@ -1,4 +1,5 @@
> 5.1.4 -> 5.1.5:
> + - bero: Fix hang when using rpmdsSingle and rpm4compat.h
> from C++
> - rse: configure: do not complain with "python: file not
> found" on platforms without python(1) in PATH
>
> 5.1.3 -> 5.1.4:
> @@ .
> patch -p0 <<'@@ .'
> Index: rpm/lib/rpm4compat.h
>
> ======================================================================
> ======
> $ cvs diff -u -r2.10 -r2.10.2.1 rpm4compat.h
> --- rpm/lib/rpm4compat.h 2 Apr 2008 02:24:06 -0000 2.10
> +++ rpm/lib/rpm4compat.h 18 Jul 2008 13:05:34 -0000 2.10.2.1
> @@ -1,7 +1,7 @@
> /*
> * Copyright © 2008 Per Øyvind Karlsen <peroyvind@mandriva.org>
> *
> - * $Id: rpm4compat.h,v 2.10 2008/04/02 02:24:06 pkarlsen Exp $
> + * $Id: rpm4compat.h,v 2.10.2.1 2008/07/18 13:05:34 bero Exp $
> */
>
> #ifndef H_RPM4COMPAT
> @@ -48,6 +48,7 @@
> #include <rpm/rpmevr.h>
> #include <rpm/pkgio.h>
> #include <rpm/rpmcb.h>
> +#include <rpm/rpmds.h>
> #include <rpm/rpmts.h>
> #include <rpm/rpmmacro.h>
> #include <rpm/rpmpgp.h>
> @@ .
> ______________________________________________________________________
> RPM Package Manager http://rpm5.org
> CVS Sources Repository rpm-cvs@rpm5.org
Received on Fri Jul 18 17:18:15 2008