diff options
author | Francois Pons <fpons@mandriva.com> | 2003-03-12 16:20:17 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2003-03-12 16:20:17 +0000 |
commit | 09cfa860203cebc29b385174ce809b7f855a64c5 (patch) | |
tree | 180f63939011256f56dafe242da3c7907fd8b747 /perl-install/standalone.pm | |
parent | 039ca5063551b1b39b0ea84ee59f6282b010fe10 (diff) | |
download | drakx-backup-do-not-use-09cfa860203cebc29b385174ce809b7f855a64c5.tar drakx-backup-do-not-use-09cfa860203cebc29b385174ce809b7f855a64c5.tar.gz drakx-backup-do-not-use-09cfa860203cebc29b385174ce809b7f855a64c5.tar.bz2 drakx-backup-do-not-use-09cfa860203cebc29b385174ce809b7f855a64c5.tar.xz drakx-backup-do-not-use-09cfa860203cebc29b385174ce809b7f855a64c5.zip |
fix small typo.
Diffstat (limited to 'perl-install/standalone.pm')
-rw-r--r-- | perl-install/standalone.pm | 19 |
1 files changed, 12 insertions, 7 deletions
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) ]; } |