Stop changing 'build' and 'source' symlinks in linux-image maintainer scripts
These symlinks now belong to the linux-headers packages. svn path=/dists/trunk/linux-2.6/; revision=18616
This commit is contained in:
parent
6c16789b3d
commit
fe07623c54
|
@ -1,3 +1,11 @@
|
||||||
|
linux-2.6 (3.2.1-3) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
[ Ben Hutchings ]
|
||||||
|
* Stop changing 'build' and 'source' symlinks in linux-image maintainer
|
||||||
|
scripts; these symlinks now belong to the linux-headers packages
|
||||||
|
|
||||||
|
-- Ben Hutchings <ben@decadent.org.uk> Tue, 24 Jan 2012 06:19:55 +0000
|
||||||
|
|
||||||
linux-2.6 (3.2.1-2) unstable; urgency=high
|
linux-2.6 (3.2.1-2) unstable; urgency=high
|
||||||
|
|
||||||
[ Stefan Lippers-Hollmann ]
|
[ Stefan Lippers-Hollmann ]
|
||||||
|
|
|
@ -22,9 +22,6 @@ my $use_hard_links = ''; # hardlinks do not work across fs boundaries
|
||||||
my $postinst_hook = ''; #Normally we do not
|
my $postinst_hook = ''; #Normally we do not
|
||||||
my $minimal_swap = ''; # Do not swap symlinks
|
my $minimal_swap = ''; # Do not swap symlinks
|
||||||
my $ignore_depmod_err = ''; # normally we do not
|
my $ignore_depmod_err = ''; # normally we do not
|
||||||
my $relink_src_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $relink_build_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $force_build_link = ''; # There is no harm in checking the link
|
|
||||||
my $kernel_arch = "=B";
|
my $kernel_arch = "=B";
|
||||||
my $ramdisk = '';
|
my $ramdisk = '';
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
@ -61,9 +58,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
||||||
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
||||||
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
||||||
$relink_src_link = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$force_build_link = '' if /force_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
|
|
||||||
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
|
@ -71,9 +65,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$relink_src_link = 'Yes' if /relink_src_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$force_build_link = 'Yes' if /force_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
|
|
||||||
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
||||||
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/i;
|
$postinst_hook = "$1" if /postinst_hook\s*=\s*(\S+)/i;
|
||||||
|
@ -116,75 +107,6 @@ die "Internal Error: Could not find image (" . $realimageloc
|
||||||
. "$kimage-$version";
|
. "$kimage-$version";
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
## Fix the build link
|
|
||||||
######################################################################
|
|
||||||
sub fix_build_link {
|
|
||||||
return unless -d "$modules_base/$version";
|
|
||||||
# if we saved a build link in preinst, restore the link
|
|
||||||
if (! -e "$modules_base/$version/build" &&
|
|
||||||
-l "$modules_base/$version/build.save" ) {
|
|
||||||
rename("$modules_base/$version/build.save", "$modules_base/$version/build") ||
|
|
||||||
die "failed to move $modules_base/$version/build:$!";
|
|
||||||
}
|
|
||||||
if ($relink_build_link || $force_build_link) {
|
|
||||||
my $build_target;
|
|
||||||
my $real_target = '';
|
|
||||||
if (-l "$modules_base/$version/build") {
|
|
||||||
$build_target = readlink "$modules_base/$version/build";
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
# Determine what the real file name is, and test that for existence
|
|
||||||
$real_target = abs_path($build_target) if defined($build_target);
|
|
||||||
if (!defined($build_target) || ! -d "$real_target") { # Danglink link
|
|
||||||
my $num = unlink "$modules_base/$version/build";
|
|
||||||
if ($num != 1) {
|
|
||||||
warn "error unlinking $modules_base/$version/build";
|
|
||||||
} else {
|
|
||||||
if ($force_build_link || -d "/usr/src/linux-headers-$version") {
|
|
||||||
my $result = symlink ("/usr/src/linux-headers-$version",
|
|
||||||
"$modules_base/$version/build");
|
|
||||||
if (! $result) {
|
|
||||||
warn "Could not link /usr/src/linux-headers-$version to $modules_base/$version/build:$!"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($relink_build_link || $force_build_link) {
|
|
||||||
&fix_build_link();
|
|
||||||
}
|
|
||||||
######################################################################
|
|
||||||
## Fix the source link
|
|
||||||
######################################################################
|
|
||||||
sub fix_source_link {
|
|
||||||
return unless -d "$modules_base/$version";
|
|
||||||
if ($relink_src_link) {
|
|
||||||
my $source_target;
|
|
||||||
my $real_target = '';
|
|
||||||
|
|
||||||
if (-l "$modules_base/$version/source") {
|
|
||||||
$source_target = readlink "$modules_base/$version/source";
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
# Determine what the real file name is, and test that for existence
|
|
||||||
$real_target = abs_path($source_target) if defined($source_target);
|
|
||||||
if (!defined($source_target) || ! -d "$real_target") { # Danglink link
|
|
||||||
my $num = unlink "$modules_base/$version/source";
|
|
||||||
if ($num != 1) {
|
|
||||||
warn "error unlinking $modules_base/$version/source";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($relink_src_link) {
|
|
||||||
&fix_source_link();
|
|
||||||
}
|
|
||||||
######################################################################
|
######################################################################
|
||||||
######################################################################
|
######################################################################
|
||||||
########### Test whether a relative symlinkwould be OK #######
|
########### Test whether a relative symlinkwould be OK #######
|
||||||
|
|
|
@ -30,8 +30,6 @@ my $use_hard_links = ''; # hardlinks do not work across fs boundaries
|
||||||
my $postrm_hook = ''; #Normally we do not
|
my $postrm_hook = ''; #Normally we do not
|
||||||
my $minimal_swap = ''; # Do not swap symlinks
|
my $minimal_swap = ''; # Do not swap symlinks
|
||||||
my $ignore_depmod_err = ''; # normally we do not
|
my $ignore_depmod_err = ''; # normally we do not
|
||||||
my $relink_build_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $force_build_link = ''; # we shall not create a dangling link
|
|
||||||
my $kernel_arch = "=B";
|
my $kernel_arch = "=B";
|
||||||
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
|
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
@ -58,8 +56,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
||||||
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
||||||
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
||||||
$relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$force_build_link = '' if /force_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
|
|
||||||
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
|
@ -67,8 +63,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$force_build_link = 'Yes' if /force_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
|
|
||||||
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
||||||
$postrm_hook = "$1" if /postrm_hook\s*=\s*(\S+)/i;
|
$postrm_hook = "$1" if /postrm_hook\s*=\s*(\S+)/i;
|
||||||
|
@ -275,7 +269,7 @@ my @files_to_remove = qw{
|
||||||
modules.generic_string modules.ieee1394map
|
modules.generic_string modules.ieee1394map
|
||||||
modules.ieee1394map modules.pnpbiosmap
|
modules.ieee1394map modules.pnpbiosmap
|
||||||
modules.alias modules.ccwmap modules.inputmap
|
modules.alias modules.ccwmap modules.inputmap
|
||||||
modules.symbols build source modules.ofmap
|
modules.symbols modules.ofmap
|
||||||
modules.seriomap modules.alias.bin
|
modules.seriomap modules.alias.bin
|
||||||
modules.dep.bin modules.symbols.bin
|
modules.dep.bin modules.symbols.bin
|
||||||
modules.softdep modules.devname
|
modules.softdep modules.devname
|
||||||
|
|
|
@ -19,9 +19,6 @@ my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
|
||||||
my $preinst_hook = ''; #Normally we do not
|
my $preinst_hook = ''; #Normally we do not
|
||||||
my $minimal_swap = ''; # Do not swap symlinks
|
my $minimal_swap = ''; # Do not swap symlinks
|
||||||
my $ignore_depmod_err = ''; # normally we do not
|
my $ignore_depmod_err = ''; # normally we do not
|
||||||
my $relink_src_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $relink_build_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $force_build_link = ''; # There is no harm in checking the link
|
|
||||||
my $kernel_arch = "=B";
|
my $kernel_arch = "=B";
|
||||||
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
|
my $ramdisk = "=MK"; # List of tools to create initial ram fs.
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
@ -51,9 +48,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
||||||
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
||||||
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
||||||
$relink_src_link = '' if /relink_src_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$force_build_link = '' if /force_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
|
|
||||||
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$no_symlink = "Yes" if /no_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
|
@ -61,9 +55,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$relink_src_link = 'Yes' if /relink_src_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$force_build_link = 'Yes' if /force_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
|
|
||||||
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
||||||
$preinst_hook = "$1" if /preinst_hook\s*=\s*(\S+)/i;
|
$preinst_hook = "$1" if /preinst_hook\s*=\s*(\S+)/i;
|
||||||
|
@ -76,11 +67,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
|
$ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch;
|
||||||
|
|
||||||
|
|
||||||
if (-d "$modules_base/$version" && -l "$modules_base/$version/build" ) {
|
|
||||||
rename("$modules_base/$version/build", "$modules_base/$version/build.save") ||
|
|
||||||
die "failed to move $modules_base/$version/build:$!";
|
|
||||||
}
|
|
||||||
|
|
||||||
# set the env var stem
|
# set the env var stem
|
||||||
$ENV{'STEM'} = "linux";
|
$ENV{'STEM'} = "linux";
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@ my $use_hard_links = ''; # hardlinks do not wirk across fs boundaries
|
||||||
my $prerm_hook = ''; #Normally we do not
|
my $prerm_hook = ''; #Normally we do not
|
||||||
my $minimal_swap = ''; # Do not swap symlinks
|
my $minimal_swap = ''; # Do not swap symlinks
|
||||||
my $ignore_depmod_err = ''; # normally we do not
|
my $ignore_depmod_err = ''; # normally we do not
|
||||||
my $relink_build_link = 'YES'; # There is no harm in checking the link
|
|
||||||
my $force_build_link = ''; # There is no harm in checking the link
|
|
||||||
my $kernel_arch = "=B";
|
my $kernel_arch = "=B";
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
|
||||||
|
@ -59,8 +57,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
$use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/i;
|
||||||
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
$minimal_swap = '' if /minimal_swap\s*=\s*(no|false|0)\s*$/i;
|
||||||
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
$ignore_depmod_err = '' if /ignore_depmod_err\s*=\s*(no|false|0)\s*$/i;
|
||||||
$relink_build_link = '' if /relink_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
$force_build_link = '' if /force_build_link\s*=\s*(no|false|0)\s*$/i;
|
|
||||||
|
|
||||||
|
|
||||||
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
$do_symlink = "Yes" if /do_symlinks\s*=\s*(yes|true|1)\s*$/i;
|
||||||
|
@ -70,8 +66,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) {
|
||||||
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
$use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
$minimal_swap = 'Yes' if /minimal_swap\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
$ignore_depmod_err = 'Yes' if /ignore_depmod_err\s*=\s*(yes|true|1)\s*$/i;
|
||||||
$relink_build_link = 'Yes' if /relink_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
$force_build_link = 'Yes' if /force_build_link\s*=\s*(yes|true|1)\s*$/i;
|
|
||||||
|
|
||||||
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
$image_dest = "$1" if /image_dest\s*=\s*(\S+)/i;
|
||||||
$prerm_hook = "$1" if /prerm_hook\s*=\s*(\S+)/i;
|
$prerm_hook = "$1" if /prerm_hook\s*=\s*(\S+)/i;
|
||||||
|
|
Loading…
Reference in New Issue