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.
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? Regards, Erich ------------------------------------------------------- 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&kid=120709&bid=263057&dat=121642 _______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
