On 03/29/2011 08:19 AM, Simon Lukasik wrote:
> (A) A big part of the code depends directly on python-rpm.
>     We don't want 'import rpm' on Debian nor 'import apt' on Fedora.
> (B) /etc/sysconfig does not exist on Debian

I would suggest to use /etc/default/rhn. /etc/default is Debian
equivalent for /etc/sysconfig. More or less.

> (C) redhat-release does not exist on Debian
/etc/debian_version
or
lsb_release -r
or
lsb_release -c

> (D) Architecture names are slightly different
Yeah, but we already have Debian architecture in DB and rhnpush count
with it, right?

> Potential solutions:

My priorities:

> (1) Create a Debian patch, and apply it only when building the .deb
> package. It is easier for start, but the patch needs to be maintained.

+1

> (2) Modify upstream rhn-client-tools, to include bits for both: Debian &
> Fedora and choose one during a build-time.

+3

> (3) Same as (2) but in run-time. (polymorphism).

+2

> (4) interleave with if-else:
>     if getPlatform() == 'deb': import apt
>     else: import rpm
+2

> (5) Still there is an option to write rhn-client-tools from scratch.
> (Design new interface). I doubt anybody likes that.

-10


-- 
Miroslav Suchy
Red Hat Satellite Engineering

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to