[Rpm-maint] Making rpm depend on glib?

James Antill james at fedoraproject.com
Thu Feb 14 15:54:15 UTC 2008

On Thu, 2008-02-14 at 12:05 +0200, Panu Matilainen wrote:
> Something I've been occasionally thinking of, and was again reminded by 
> looking at the gcc __attribute__() compatibility macros of glib.
> There are vast amounts of things in glib that would be highly useful in 
> rpm: string-, file-, date/time-, internalization/unicode utilities, error 
> reporting / logging, data types... For some of these rpm carries 
> limited roll-your-own versions, others are just not there even if badly 
> needed like a mallocing sprintf().

 Can rpm handle the "malloc-failure is abort()" design that glib uses?
If so, it seems like a no brainer to me.

> Using glib facilities for these would make many portability issues 
> somebody elses problem (glib is supposed to be highly portable) and allow 
> throwing out many of the roll-your-own helpers that have little or nothing 
> to do with package management. Silly things like string buffer 
> manipulation, even exposed in the rpm API.

 However one thing I would say is that the glib string API isn't very
"mature" and if that's one of your main pain points I'd humbly recommend
ustr instead (it's in Fedora), which also doesn't have the
malloc-failure design problem.

James Antill <james at fedoraproject.com>

More information about the Rpm-maint mailing list