From 09cfa860203cebc29b385174ce809b7f855a64c5 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 12 Mar 2003 16:20:17 +0000 Subject: fix small typo. --- perl-install/standalone.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index c0c015377..df4082cb9 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -206,7 +206,7 @@ sub check_kernel_module_packages { my $urpm = new urpm; $urpm->read_config(nocheck_access => 1); foreach (grep { !$_->{ignore} } @{$urpm->{media} || []}) { - $urpm->parse_synthesis($_); + $urpm->parse_synthesis("$urpm->{statedir}/synthesis.$_->{hdlist}"); } foreach (@{$urpm->{depslist} || []}) { $_->name eq $ext_name and $list{$_->name} = 1; @@ -215,13 +215,18 @@ sub check_kernel_module_packages { }; if (!$ext_name || $list{$ext_name}) { eval { - my ($version, $release, $ext) = c::kernel_version() =~ /([^-]*)-([^-]*mdk)(\S*)/; - $ext and $ext = "-$ext"; - $list{"$base_name$version-$release$ext"} or die "no $base_name for current kernel"; - $select{"$base_name$version-$release$ext"} = 1; + my ($version_release, $ext); + if (c::kernel_version() =~ /([^-]*)-([^-]*mdk)(\S*)/) { + $version_release = "$1.$2"; + $ext = $3 ? "-$3" : ""; + $list{"$base_name$ext-$version_release"} or die "no $base_name for current kernel"; + $select{"$base_name$ext$version_release"} = 1; + } else { + #- kernel version is not recognized, what to do ? + } foreach (`rpm -qa kernel*`) { - ($ext, $version, $release) = /kernel[^-]*(-smp|-enterprise|-secure)?(\d+\.\d+\.\d+)\.([^\-]+mdk)$/; - $list{"$base_name$version-$release$ext"} and $select{"$base_name$version-$release$ext"} = 1; + ($ext, $version_release) = /kernel[^\-]*(-smp|-enterprise|-secure)?(?:-([^\-]+))$/; + $list{"$base_name$ext$version_release"} and $select{"$base_name$ext$version_release"} = 1; } $result = [ keys(%select), if_($ext_name, $ext_name) ]; } -- cgit v1.2.1