From: Rafael Garcia-Suarez Date: 08:33 on 15 Mar 2006 Subject: Some fresh rpm hate And now, some hate for developers. Sorry in advance for our non-C-fluent readers. Somewhere in the rpm library headers, up to version 4.4.4, you have this nice typedef: typedef void * (*rpmCallbackFunction) (/*@null@*/ const void * h, const rpmCallbackType what, const unsigned long amount, const unsigned long total, /*@null@*/ fnpyKey key, /*@null@*/ rpmCallbackData data) So far so good. Except that in 4.4.5 the "amount" and "total" arguments were changed to unsigned long long (without any mention in the release changelog, of course, that would be telling). So, if you have some C program that defines an rpmCallbackFunction, when it gets called, the call stack is blown, your program segfaults and gdb is confused. Hard to trace. Depending on the C application, this might also have unnice consequences on your system's rpm database, I suppose. But it doesn't stop there. I haven't been able to figure out a way to check for the version of the rpmlib you're linking against via plain #ifdefs. Which means that I have to fallback to some Makefile magic to add a CPP symbol that says whether I need an unsigned long or an unsigned long long here. Duh.
From: Luke Kanies Date: 15:54 on 15 Mar 2006 Subject: Re: Some fresh rpm hate On Wed, 15 Mar 2006, Rafael Garcia-Suarez wrote: > And now, some hate for developers. Sorry in advance for our > non-C-fluent readers. > [...] I'm pretty sure that's a C hate, not an RPM hate. Yes, it's true, RPM does use C, so it's to blame, too, of course.
From: Bruce Richardson Date: 22:20 on 15 Mar 2006 Subject: Re: Some fresh rpm hate On Wed, Mar 15, 2006 at 09:54:23AM -0600, Luke Kanies wrote: > On Wed, 15 Mar 2006, Rafael Garcia-Suarez wrote: > > > And now, some hate for developers. Sorry in advance for our > > non-C-fluent readers. > > [...] > > I'm pretty sure that's a C hate, not an RPM hate. Yes, it's true, RPM does > use C, so it's to blame, too, of course. No, I'm pretty sure it counts as an RPM hate. C didn't force the RPM developers to change the definitions without telling anybody. So we hate the software, because it represents the combined and accumulated stupidity/evil/carelessness of its developers.
From: Peter da Silva Date: 23:55 on 15 Mar 2006 Subject: Re: Some fresh rpm hate Definitely RPM hate. You don't change an interface incompatibly without either changing a testable version number (so that old RPMs are rejected), or providing an emulation of the old interface (so that old RPMs work but don't get the benefit of the new stuff) without a very good reason. This has nothing to do with C. It doesn't matter whether the interface is a C subroutine call, a wire protocol, a system call, or the price of a postage stamp.
Generated at 10:28 on 16 Apr 2008 by mariachi