RPM Community Forums

Mailing List Message of <rpm-devel>

Re: URPMI + rpm5 = true & rpm 4 backwards compatibility

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 29 Feb 2008 - 22:15:54 CET
Message-Id: <7B89F6F8-9DE0-40DB-B0C6-1A4519098BE3@mac.com>

On Feb 29, 2008, at 3:42 PM, Per Øyvind Karlsen wrote:

> Ahoi!
>
> With great help from Jeff, I have now successfully ported urpmi (&  
> rpmtools)
> to rpm5, making it the first dep solver tool to get rpm 5.0  
> support! :)
>
> To make things nicer and easier to maintain in terms of  
> compatibility with
> older rpm versions & rpm.org a function wrapper was done.
> It's currently available at
> http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/rpm/perl-URPM/trunk/ 
> rpm5compat.h?revision=238099&view=markup
>
> So what do you guys think of inclusion of this in rpm5.org tree?

Note that there are memory leaks. In fact, this is the better emulation:

void * headerFreeData(const void * data, rpmTagType type)
{
     if (data)
	free((void *)data);
     return NULL;
}

The problem with retrofitting "compatibility"
is that applications, not rpm, need to manage
their own memory.

If headerFreeData() were used consistently everywhere,
then "compatibility" could be achieved.

Alas, headerFreeData() is often not used in applications
everywhere.

73 de Jeff
Received on Fri Feb 29 22:16:07 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.