[linux-base] 02/04: read_kernelimg_conf: Resolve conflict between image_dest and link_in_boot
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon May 30 17:53:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch benh/maint-script-helpers
in repository linux-base.
commit e41a8b5ce9d0d8ca7109dfd0e52526657944e318
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Mon May 30 01:21:08 2016 +0100
read_kernelimg_conf: Resolve conflict between image_dest and link_in_boot
link_in_boot currently dominates, effectively setting image_dest to
'/boot'. Handle that and remove link_in_boot from the returned
configuration as redundant.
---
lib/DebianLinux.pm | 5 +++++
lib/t/DebianLinux.t | 19 +++++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/lib/DebianLinux.pm b/lib/DebianLinux.pm
index 190461e..3eaeb44 100644
--- a/lib/DebianLinux.pm
+++ b/lib/DebianLinux.pm
@@ -159,6 +159,11 @@ sub read_kernelimg_conf {
}
delete $conf->{no_symlinks};
+ if ($conf->{link_in_boot}) {
+ $conf->{image_dest} = '/boot';
+ }
+ delete $conf->{link_in_boot};
+
return $conf;
}
diff --git a/lib/t/DebianLinux.t b/lib/t/DebianLinux.t
index e11d8a9..7aa1d84 100644
--- a/lib/t/DebianLinux.t
+++ b/lib/t/DebianLinux.t
@@ -5,7 +5,7 @@ use Test;
use DebianLinux qw(version_cmp read_kernelimg_conf);
BEGIN {
- plan test => 40;
+ plan test => 41;
}
## version_cmp
@@ -89,7 +89,6 @@ ok(hash_equal(read_kernelimg_conf_str(''),
{
do_symlinks => 1,
image_dest => '/',
- link_in_boot => 0,
}));
# Sample config
ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
@@ -133,20 +132,18 @@ EOT
{
do_symlinks => 1,
image_dest => '/',
- link_in_boot => 0,
}));
# Slightly different spacing and value syntax
ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
image_dest = foo bar
relink_build_link = yes
do_symlinks = 0
- link_in_boot= true
+ link_in_boot= false
no_symlinks=1
EOT
{
do_symlinks => 0,
image_dest => 'foo',
- link_in_boot => 1,
}));
# Check that 'false' and 'no' also work
ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
@@ -155,7 +152,6 @@ EOT
{
do_symlinks => 0,
image_dest => '/',
- link_in_boot => 0,
}));
ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
do_symlinks = no
@@ -163,7 +159,6 @@ EOT
{
do_symlinks => 0,
image_dest => '/',
- link_in_boot => 0,
}));
# Check that invalid values have no effect
ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
@@ -174,5 +169,13 @@ EOT
{
do_symlinks => 1,
image_dest => '/',
- link_in_boot => 0,
+ }));
+# Check link_in_boot dominates image_dest
+ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
+image_dest = /local
+link_in_boot = true
+EOT
+ {
+ do_symlinks => 1,
+ image_dest => '/boot',
}));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-base.git
More information about the Kernel-svn-changes
mailing list