Commit 162ad64f authored by Michael Pyne's avatar Michael Pyne
Browse files

Backport fix for bug 111167 (kdesvn-build should warn if checkout URL is

different than the actual URL) to KDE 3.5.


svn path=/branches/KDE/3.5/kdesdk/scripts/kdesvn-build; revision=451549
parent b65083bf
......@@ -974,6 +974,7 @@ sub update_module_path
push @args, '-N' if scalar @path;
note "Updating g[$module]";
$result = run_svn($module, 'svn-up', \@args);
if($result) # Update failed, try svn cleanup.
......@@ -2733,6 +2734,8 @@ sub handle_updates
my @options = split(' ', get_option($module, 'checkout-only'));
if (-e "$fullpath/.svn")
# Warn user if the current repo URL is different than expected.
$result = update_module_path($module, @options);
......@@ -3800,6 +3803,41 @@ sub get_repo_url
return $output;
# Subroutine to determine whether or not the given module has the correct
# URL. If not, a warning is printed out.
# First parameter: module to check.
# Return: Nothing.
sub check_module_validity
# This test reads the HD so don't bother during pretend.
# return if pretending;
my $module = shift;
my $source_dir = get_fullpath($module, 'source');
my $module_expected_url = svn_module_url($module);
chdir($source_dir); # Required for get_repo_url
my $module_actual_url = get_repo_url();
if($module_actual_url ne $module_expected_url)
warning <<EOF;
y[!!] g[$module] seems to be checked out from somewhere other than expected.
kdesvn-build expects: y[$module_expected_url]
The module is actually from: y[$module_actual_url]
If the module location is incorrect, you can fix it by either deleting the
g[b[source] directory, or by changing to the source directory and running
svn switch $module_expected_url
If the module is fine, please update your configuration file.
# Subroutine to handle the installation process. Simply calls
# 'make install' in the directory.
sub handle_install
Supports Markdown
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