Commit cd4bafc2 authored by Michael Pyne's avatar Michael Pyne
Browse files

Add --delete-my-patches option.

This doesn't so much actively search for things to delete. Instead it's
a required permission from the user to remove source directories (which
is similar to the remove-after-install option).

Right now this will only be used when trying to clone a git module and
the destination source directory already exists somehow, which has
happened for a lot of 1.14 early adopters due to old kde-baseapps
checkouts having a kate or konsole directory that conflict with where
kdesrc-build wants to put the current kate/konsole directories.
parent cd4090b1
......@@ -544,6 +544,23 @@ combining short options into one at this point. (E.g. running
This option must be passed to allow <command>kdesrc-build</command> to
remove conflicting source directories. Currently even this only happens
when trying to clone a git-based module if an existing source directory is
present. Never specify this option unless it is suggested by
<command>kdesrc-build</command>, and only if you don't mind the source
directories that are referenced being deleted and re-cloned.
......@@ -942,6 +942,7 @@ my $run_mode = 'build'; # Determines if updating, building, installing, etc.
"cxxflags" => "-pipe",
"debug" => "",
"debug-level" => ksb::Debug::INFO,
"delete-my-patches" => 0, # Should only be set from cmdline
"dest-dir" => '${MODULE}', # single quotes used on purpose!
"disable-agent-check" => 0, # If true we don't check on ssh-agent
"do-not-compile" => "",
......@@ -4714,7 +4715,9 @@ DONE
/^--/ && do {
# First let's see if they're trying to override a global option.
my ($option) = /^--([-\w\d\/]+)/;
my $value = extract_option_value($_, @options);
# If no value, give a "true" option by default
my $value = extract_option_value($_, @options) // 1;
if ($ctx->hasOption($option))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment