From: Erich Focht [mailto:[EMAIL PROTECTED]
Sent: Wed 15/02/2006 04:07
To: Bernard Li
Cc: [email protected]
Subject: Re: [Oscar-devel] OS_Detect changes
Hi Bernard,
please try the new distro-query script. Here
is what it tells me:
[EMAIL PROTECTED] scripts]# ./distro-query
Distro
package url : /tftpboot/distro/centos-4-i386
OSCAR package pool :
/tftpboot/oscar/rhel-4-i386
Detected os structure :
$VAR1 =
{
'compat_distro'
=> 'rhel',
'distro'
=> 'centos',
'chroot' => '/',
'arch' => 'i386',
'ident' =>
'linux-i386-centos-4-2',
'distro_update' =>
'2',
'os' =>
'linux',
'compat_distrover' =>
'4',
'pkg' =>
'rpm',
'distro_version' => '4'
};
So $os->{distro_update} contains the info you are looking
for.
This variable is only set for local or image queries, not for pool
queries.
Regards,
Erich
On Wednesday 15 February 2006 06:14,
Bernard Li wrote:
> Hey Erich:
>
> Is there currently a
mechanism to differentiate between Update versions for Red Hat Enterprise Linux
(i.e. RHEL3u5 vs RHEL3u6)?
>
> Thanks,
>
>
Bernard
>
> ________________________________
>
> From:
[EMAIL PROTECTED] on behalf of Erich Focht
> Sent:
Tue 14/02/2006 10:03
> To: [email protected]
>
Subject: [Oscar-devel] OS_Detect changes
>
>
>
>
Hi,
>
> just checked in some major changes to OS_Detect. It can now
be used for
> detecting the distro and architecture of:
> -
the machine it runs on
> - an image
> - a package
pool (guess this makes it twice as useful as before).
>
>
Arguments and usage examples (prepend OSCAR::OCA::OS_Detect:: to each
line):
>
>
open()
: detects distro/arch installed in "/"
>
open($path) : detects
distro/arch in chroot directory
$path
>
(option kept for compatibility reasons).
>
open(chroot=>$path) : detects distro/arch in chroot directory
$path
> open(pool=>$pool) : detects distro/arch
of package pool $pool
>
> A big part of the code has been moved up
from the detection modules to the
> OS_Detect.pm module.
>
>
Next change to come: validation of supported distros based on the
>
$id->{compat_distro} and $id->{compat_distrover} strings.
>
>
A small query tool was added, too (scripts/distro-query). For validation
and
> testing purposes, when new distro modules are added.
>
>
The changes are applied to trunk, so might work in OSCAR5 if they
survive.
>
> Regards,
>
Erich
