Le Mardi 9 Mai 2006 09:24, Erich Focht a écrit :
> Hi,
>
> I noticed a problem in the design of the packman API. When I'm creating a
> packman instance the code only checks what type of package manager is
> usable on the local node. It doesn't care about the package manager used
> for the image I want to install or for the natural package manager of the
> package repository. This problem is obvious if you imagine a heterogeneous
> system with an RHEL4 master on which you might want to install a debian
> image.

I agree with that and moreover the detection of the package manager is not 
very good... maybe we should use directly OS_Dectect.

>
> The reason for this is that when creating a packman instance there is no
> way to pass selectors to it. If you think of the way I extended the
> OS_Detect interface, you'll understand what I mean:
>   $os = OCA::OS_Detect::open(pool => "/tftpboot/repo_path");
> will detect the distribution living in the repo path correctly,
>   $os = OCA::OS_Detect::open(chroot => "/var/lib/systemimager/images/a");
> will detect the distribution of the image "a".
>
> We could do two things:
>
> 1. wrap OS_Detect calls around the places where packman instances are
> created and this way disable the packman autodetection (use
> PackMan::RPM->new or PackMan::DEB->new instead of PackMan->new). This is
> ugly, IMO, as it removes key functionality from PackMan.
>
> 2. extend the packman API and allow it to accept selectors:
>
> $pm = PackMan->new(repos => [ path1, path2, ... ]);
> $pm = PackMan->new(chroot => directory );
> and both combined.
>
> Doing this will allow us to manage both types of distros on the same master
> provided that:
>  - the debootstrap executable is installed (on an rpm based system)
>  - dpkg-dev (and alike) are installed on an rpm based system
>  - yume, yum and rpm are installed on a debian system.
>
> Any thoughts?

I definitively prefer the solution #2 and such a solution is a kind of natural 
with OO programing. I volunteer to help you to do that if you want.

BTW speaking about Packman, what is your plan regarding rapt? if you need help 
to integrate it in trunk, just let me know. :-)

>
> Regards,
> Erich

-- 
Geoff


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Oscar-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to