diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-29 20:12:26 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-29 20:12:26 +0000 |
commit | 3e2295eef53a8110f4464f23a610f15889f0c3a1 (patch) | |
tree | a41381919081e9c94430bcdf2a41710174537b3d /lib | |
parent | b44a56488dc457b466bb301a2cf990ae6592dda7 (diff) | |
download | iurt-3e2295eef53a8110f4464f23a610f15889f0c3a1.tar iurt-3e2295eef53a8110f4464f23a610f15889f0c3a1.tar.gz iurt-3e2295eef53a8110f4464f23a610f15889f0c3a1.tar.bz2 iurt-3e2295eef53a8110f4464f23a610f15889f0c3a1.tar.xz iurt-3e2295eef53a8110f4464f23a610f15889f0c3a1.zip |
use "real" name and version when appropriate (fix build with gspca)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/DKMS.pm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Iurt/DKMS.pm b/lib/Iurt/DKMS.pm index 2c564ab..5006d9b 100644 --- a/lib/Iurt/DKMS.pm +++ b/lib/Iurt/DKMS.pm @@ -114,9 +114,9 @@ sub search_dkms { my ($module, $version, $modulesourcedir, $realmodule, $realversion, $file) = @$dkms; foreach my $k (@kernel) { my ($kernel, $modulesdir) = @$k; - plog("checking $module-kernel-$modulesdir-$realversion"); - next if $cache->{dkms}{"$module-kernel-$modulesdir-$realversion"} && !$run->{ignore_failure}; - if (!$modules{$module}{$version}{$modulesdir}) { + plog("checking $realmodule-kernel-$modulesdir-$realversion"); + next if $cache->{dkms}{"$realmodule-kernel-$modulesdir-$realversion"} && !$run->{ignore_failure}; + if (!$modules{$realmodule}{$realversion}{$modulesdir}) { my ($name, $v) = $kernel =~ /^([^-]+)-.*-(2\..*)/; my $source = "$name-$v"; if (!$kernel_source{$source}) { @@ -137,7 +137,7 @@ sub search_dkms { $nb++; push @{$run->{dkms_todo}}, [ $module, $version, $modulesourcedir, $realmodule, $realversion, $file, $kernel, $modulesdir, @{$kernel_source{$source}}, $media ]; } - $modules{$module}{$version}{$modulesdir}++; + $modules{$realmodule}{$realversion}{$modulesdir}++; } } } @@ -245,18 +245,18 @@ sub dkms_compile { # but if we just compile it for a new kernel, we need to rebuild it manually foreach my $cmd ('add', 'build') { - my $command = "TMP=/home/$luser/tmp/ sudo chroot $chroot_tmp /usr/sbin/dkms $cmd -m $name -v $realversion --rpm_safe_upgrade -k $modulesdir --kernelsourcedir=/usr/src/$sourcedir"; + my $command = "TMP=/home/$luser/tmp/ sudo chroot $chroot_tmp /usr/sbin/dkms $cmd -m $realname -v $realversion --rpm_safe_upgrade -k $modulesdir --kernelsourcedir=/usr/src/$sourcedir"; plog('DEBUG', "execute: $command"); system($command); } # now need to move dkms build if it wrongly assume a build for the running kernel - plog("search module in /var/lib/dkms/$name/$version/$kerver/"); - if (-d "$chroot_tmp/var/lib/dkms/$name/$version/$kerver/") { - system("sudo mv $chroot_tmp/var/lib/dkms/$name/$realversion/$kerver/ $chroot_tmp/var/lib/dkms/$name/$realversion/$modulesdir/"); + plog("search module in /var/lib/dkms/$realname/$realversion/$kerver/"); + if (-d "$chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver/") { + system("sudo mv $chroot_tmp/var/lib/dkms/$realname/$realversion/$kerver/ $chroot_tmp/var/lib/dkms/$realname/$realversion/$modulesdir/"); } - $cache->{dkms}{"$name-kernel-$modulesdir-$realversion"} = 1; - if (system("sudo chroot $chroot_tmp /usr/sbin/dkms mkrpm -m $name -v $realversion --rpm_safe_upgrade -k $modulesdir")) { + $cache->{dkms}{"$realname-kernel-$modulesdir-$realversion"} = 1; + if (system("sudo chroot $chroot_tmp /usr/sbin/dkms mkrpm -m $realname -v $realversion --rpm_safe_upgrade -k $modulesdir")) { plog('FAIL', "build failed ($!)"); next; } |