Fix build failure reported in the kdesvn-build 1.7 release. Someday I'll have the time to do better

testing, but this is still a fairly embarrassing bug to make it to a release. :(

Guess I should heed the motto of "Slow is Fast" and stop rushing myself.

The cause of the bug was moving around the definition of $script.  Later code in the function
(inappropriately) used the value of $script which used to coincidentally be correct.

As a bonus though the debugging for this also uncovered a long-hidden bug in the venerable
get_option subroutine which would cause qt-copy's configure to fail if the configure-flags were
empty.

Also persistent option reading is given a sane default, which should hopefully fix the other
build failures.

BUG:172288

svn path=/trunk/KDE/kdesdk/scripts/kdesvn-build; revision=868757
wilder
Michael Pyne 18 years ago
parent 8486f670cd
commit 576ba716fa
  1. 8
      kdesvn-build

@ -1335,7 +1335,7 @@ sub get_option
return $$ref{$option} if defined $$ref{$option};
# Some global options would probably make no sense applied to qt-copy.
return 0 if $module eq 'qt-copy' and list_has(@qtCopyOverrides, $option);
return '' if $module eq 'qt-copy' and list_has(@qtCopyOverrides, $option);
return ${$global_opts}{$option};
}
@ -4560,7 +4560,7 @@ EOF
$script = "$qtdir/configure.new" if $module eq 'qt-copy';
unshift @commands, $script;
my $old_flags = get_persistent_option($module, 'last-configure-flags');
my $old_flags = get_persistent_option($module, 'last-configure-flags') || '';
if((get_list_digest(@commands) ne $old_flags) or
(get_option($module, 'reconfigure')) or
@ -4579,7 +4579,7 @@ EOF
# $script should point to $srcdir/qt-copy/configure for both Qt
# 3 and 4.
open CONFIG, "<$script";
open CONFIG, "<$qtdir/configure";
open NEWCONFIG, ">$qtdir/configure.new";
while(<CONFIG>)
@ -4651,7 +4651,7 @@ sub safe_run_cmake
unshift @commands, 'cmake', $srcdir; # Add to beginning of list.
my $old_options = get_persistent_option($module, 'last-cmake-options');
my $old_options = get_persistent_option($module, 'last-cmake-options') || '';
my $builddir = get_fullpath($module, 'build');
if (($old_options ne get_list_digest(@commands)) or

Loading…
Cancel
Save