On Nov 10, 2010, at 5:57 PM, Eric MSP Veith wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Before doing the rest I want to answer just that question:
> 
> On Wednesday 10 November 2010, Jeff Johnson <n3...@mac.com> wrote:
>> Back up a second (before we get to an implementation) please ...
>> 
>>      What are you trying to do?
> 
> I'm trying to build a spec file from Ruby. I've bridged to both parseSpec 
> and buildSpec.
> 

OK. Those are the two basic methods (the design flaw is that with only
two methods, its hard to do bindings to rpmbuild properly).

> But I don't get there. The bindings bail out at parseSpec(). And only if I'm 
> doing a rpmInitializeMacros() before it'll break that way. Without the call 
> to rpmInitMacros() I can run %prep, but of course I'll get lits of errors 
> that basically come from macros that aren't known.
> 

OK. What's likely happening is that a pointer needs to be
set to NULL.

Try these options (and figure out how to arrange for -vv output
by planting two
        rpmIncreaseVerbosity();
        rpmIncreaseVerbosity();
calls somewhere in the bindings (like right after rpmReadConfig(...));

On the build side, there is --specdebug and --pkgdebug. To "hot wire"
those options, you need to set these integers to -1 somehow (rebuild rpm
with build/spec.c just setting to -1 if necessary)
        spec.c:int _pkg_debug;
        spec.c:int _spec_debug;

Hmmm ... macro contexts aren't wired into a Pool (because RPM
itself uses only 2-3 MacroContext's in rather boring/simple ways)

But one approach is to do an an expand of "%trace" in every context immediately
after creation, that should show sufficient info that I can get oriented towards
your specific double free issue.

hth

73 de Jeff

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to