From: Lee M. <lee...@hp...> - 2008-12-11 22:16:54
|
Hi Bruno, Sorry so lagged on the response. %defs is a global in LinuxCOE.pm so I didn't understand where that error is coming from. I attempted to duplicate it locally: wwrmn@mayeshc:~$ cat test #!/usr/bin/perl use lib qw(/usr/local/linuxcoe-sd/4.1/lib); use LinuxCOE; use Data::Dumper; my $db = new LinuxCOE; $db->debug(9); $db->nonav(0); $db->InitDB; print Dumper($db->show_os); wwrmn@mayeshc:~$ perl test | head -2 $VAR1 = 'CentOS 4.4 - i386'; $VAR2 = 'Debian 3.1 - hppa'; wwrmn@mayeshc:~$ Could it be a variation in our perl versions? wwrmn@mayeshc:~$ perl -v This is perl, v5.8.8 built for i486-linux-gnu-thread-multi I'll readily accept the patch but I'd like to understand why it's needed in your case as it might be the tip of an iceburg. Also, I've been thinking about the CaSe problem in dist/ver/arch tuple. Let me think on that a little longer as some of the issues are 'deeply intertwingled'. :^) Best Regards, Lee Cornec, Bruno (Open Source and Linux Technology Architect) wrote: > Hello, > > I'm trying to provide PXE functions on top of LinuxCOE, as part of the > dploy.org project (http://trac.dploy.org). > > I'm begining to make tests with LinuxCOE and used the following small > perl code to try to interact at programmatic level. > > Code: > ------------------------------------------------------------------ > my $db = new LinuxCOE; > $db->debug(9); > $db->nonav(0); > $db->InitDB; > > print Dumper($db->show_os); > ------------------------------------------------------------------ > > Except if there is something I missed in the initialization, it produces > the following warning: > Use of uninitialized value $osdir in concatenation (.) or string at > /var/www/linuxcoe-sd/lib/LinuxCOE.pm line 1334. > > Using the following patch seems to fix the error: > > Index: SystemDesigner/lib/LinuxCOE.pm.in > =================================================================== > RCS file: /cvsroot/linuxcoe/SystemDesigner/lib/LinuxCOE.pm.in,v > retrieving revision 1.51 > diff -r1.51 LinuxCOE.pm.in > 1334c1334,1335 > < my @dirs = ($OPT,$ETC,$defs{'ALT_DATA'}); > --- > >> my @dirs = ($OPT,$ETC); >> push @dirs,$defs{'ALT_DATA'} if ( defined i$defs{'ALT_DATA'} ); >> > > > Do you think I can commit it upstream ? > > My first goal is to be able to create a self sufficient LinuxCOE install > from RPMs. What is currently missing is the generation of the images tar > files coming from various distro. I'd like to provide a script which > generate those files, and I'd like to uniformize the way of naming > distribution/version/arch between LinuxCOE, pb and dploy.org. > > I have used up to now lower case distribution names. E.g.: > [bruno@morley ~]$ pbdistrocheck > distro tuple: mandriva,2008.1,md,rpm,.mdv2008.1 > > From what I've seen in LinuxCOE code up to now, it could imply changing > some reg.exp. from /Fedora/ to /Fedora/i e.g. in order to be able to > name all distributions fedora instead of Fedora. > > It would then make the integration much smoother. > > I could work on a patch to add that support in LinuxCOE if you agree to > adopt it. > > Let me know your feeling and feedback on this. > > Bruno. > -- > Linux Profession Lead EMEA / Open Source Evangelist \ HP C&I EMEA IET > http://www.mondorescue.org / HP/Intel Solution Center \ http://hpintelco.net > Des infos sur Linux? http://www.HyPer-Linux.org http://www.hp.com/linux > La musique ancienne? http://www.musique-ancienne.org http://www.medieval.org > |