On Sat, Jul 25, 2009 at 09:29:28PM +0100, Matthew Booth wrote:
On 25/07/09 02:14, Guido Günther wrote:
>Hi Matthew,
>not that I'm qualified to comment on this but it seems this is very
>rpm/RedHat specific. Would it make sense to abstrǎct the package format
>from the very beginning by introducing some thin wrappers:
It's absolutely Red Hat specific. That code's from RedHat.pm ;)
One of the principal reasons the code is structured this way is to
make the Debian hooks easier to write and maintain. I think I
mentioned in one of my other emails that much of RedHat.pm is
actually quite generic. In writing a Debian module, I'd expect to
abstract a significant amount of code into a common module.
Unless you can convince me otherwise I'm inclined to keep the OS
level abstraction, rather than just package management. The reason
for this is that different distros using the same package manager
can be quite different. This is especially true for rpm. Abstracting
common code should achieve everything you're looking for.
I think you need a
two level abstraction: abstracting the package format
and abstracting the distro. This way
cp RedHat.pm OpenSUSE.pm
would be quiet the same as doing
cp RedHat.pm Debian.pm
Most of it would work out of the box. This was ment only as a suggestion
to lower the burden for new distros, it all can be done later.
Cheers,
-- Guido