summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-09-04 15:59:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-09-04 15:59:35 +0000
commit79f2da57cdc751a4d9cd624dc4472343a0a87acd (patch)
tree6444cd84fdade966ee8cb8e670894d62d1cd18c2 /perl-install/bootloader.pm
parent997cd903a80f4715c6dd6f621c1639bf2dc78a17 (diff)
downloaddrakx-79f2da57cdc751a4d9cd624dc4472343a0a87acd.tar
drakx-79f2da57cdc751a4d9cd624dc4472343a0a87acd.tar.gz
drakx-79f2da57cdc751a4d9cd624dc4472343a0a87acd.tar.bz2
drakx-79f2da57cdc751a4d9cd624dc4472343a0a87acd.tar.xz
drakx-79f2da57cdc751a4d9cd624dc4472343a0a87acd.zip
(same_entries): compare kernel options sorted (this is an approximation of
reality since order can matter, but...). An example is "quiet devfs=mount hdc=ide-scsi" vs "devfs=mount hdc=ide-scsi quiet" (thanks to Gabriel Phoenix)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 743d8aafd..8aa6850be 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -135,10 +135,16 @@ sub same_entries {
my ($a, $b) = @_;
foreach (uniq(keys %$a, keys %$b)) {
- next if $_ eq 'label';
- next if $a->{$_} eq $b->{$_};
- my ($inode_a, $inode_b) = map { (stat "$::prefix$_")[1] } ($a->{$_}, $b->{$_});
- next if $inode_a && $inode_b && $inode_a == $inode_b;
+ if ($_ eq 'label') {
+ next;
+ } elsif ($_ eq 'append') {
+ next if join(' ', sort split(' ', $a->{$_})) eq join(' ', sort split(' ', $b->{$_}))
+ } else {
+ next if $a->{$_} eq $b->{$_};
+
+ my ($inode_a, $inode_b) = map { (stat "$::prefix$_")[1] } ($a->{$_}, $b->{$_});
+ next if $inode_a && $inode_b && $inode_a == $inode_b;
+ }
log::l("entries $a->{label} don't have same $_: $a->{$_} ne $b->{$_}");
return;