Fix bug 172719 (cmake-options causes kdesvn-build to fail).

The root cause of the problem was that when you had more than one option on a single cmake-options
command that it was not getting split into a list properly.

The root cause of *that* error was that the regular expression I used to perform the split
(without splitting around double-quotes) failed with leading whitespace.  I didn't do testing for
that case but that it how the function ends up getting called in kdesvn-build.

In addition to the bug I've added quotes around individual command parameters for log_command() to
make future instances of this type of bug (improper splitting) more obvious.

BUG:172719

svn path=/trunk/KDE/kdesdk/scripts/kdesvn-build; revision=910294
wilder
Michael Pyne 17 years ago
parent bcf0de27bc
commit c91f8c8d1d
  1. 5
      kdesvn-build

@ -847,7 +847,8 @@ sub split_quoted_on_whitespace($)
{
my $str = shift;
my @words = $str =~
/"? # Match 0-1 quotes
/\s* # Eat up whitespace
"? # Match 0-1 quotes
( # Open grouping expression
(?<!") # Match everything not following " (i.e. there was no quote)
\S+ # Followed by 1 or more non-whitespace (this breaks on whitespace)
@ -2210,7 +2211,7 @@ sub log_command
if (pretending)
{
pretend "\tWould have run g[", join (' ', @command);
pretend "\tWould have run g['", join ("' '", @command), "'";
return 0;
}

Loading…
Cancel
Save