diff --git a/doc/index.docbook b/doc/index.docbook
index 113bb1b..8997481 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -46,6 +46,7 @@
--nice'>
--ignore-modules'>
--resume-from'>
+ --resume-after'>
--reconfigure'>
--refresh-build'>
]>
@@ -1847,7 +1848,26 @@ This option is used to resume the build starting from the given module, which
should be the next option on the command line. This option implies --no-src. You should not
specify other module names on the command line.
-
+
+See also: and . You would prefer to use this command line option
+if you have fixed the build error and want &kdesvn-build; to complete the
+build.
+
+
+
+--resume-after
+
+This option is used to resume the build starting after the given module, which
+should be the next option on the command line. This option implies --no-src. You should not
+specify other module names on the command line.
+
+See also: and . You would prefer to use this command line option
+if you have fixed the build error and have also built and installed the module
+yourself, and want &kdesvn-build; to start again with the next
+module.
@@ -2541,10 +2561,10 @@ end global
You can tell &kdesvn-build; to start building from a different module
than it normally would. This can be useful when a set of modules failed, or
if you canceled a build run in the middle. You can control this using the
-&cmd-resume-from; option.
+&cmd-resume-from; option and the &cmd-resume-after; option.
-Using &cmd-resume-from; will skip the source code update.
-
+Using either of the resume options will skip the source code
+update.Resuming the build starting from kdebase:
@@ -2554,6 +2574,15 @@ if you canceled a build run in the middle. You can control this using the
+
+Resuming the build starting after kdebase (in case you manually fixed
+the issue and installed the module yourself):
+
+
+%kdesvn-build
+
+
+
diff --git a/kdesvn-build b/kdesvn-build
index f6cd1f5..4672002 100755
--- a/kdesvn-build
+++ b/kdesvn-build
@@ -1114,6 +1114,34 @@ sub get_option
return ${$globalOpts}{$option};
}
+# Returns a Perl object worth "die"ing for. (i.e. can be given to the die
+# function and handled appropriately later with an eval). The returned
+# reference will be an instance of BuildException. The actual exception type is
+# passed in as the first parameter (as a string), and can be retrieved from the
+# object later using the 'exception_type' key, and the message is returned as
+# 'message'
+#
+# First parameter: Exception type
+# Second parameter: Message to show to user
+# Return: Reference to the exception object suitable for giving to "die"
+sub make_exception
+{
+ my $exception_type = shift;
+ my $message = shift;
+
+ $exception_type = 'Exception' unless defined $exception_type;
+
+ my $obj = eval {
+ package BuildException;
+ my $new_obj = {'exception_type' => $exception_type,
+ 'message' => $message };
+ bless($new_obj);
+ return $new_obj;
+ };
+
+ return $obj;
+}
+
# Returns a string describing the scm platform of the given module.
#
# First parameter: Module to get scm type of.
@@ -3612,6 +3640,8 @@ Options:
--resume-from= Starts building from the given package, without
performing the source update.
+ --resume-after= Starts building after the given package, without
+ performing the source update.
--revision (or -r)= Forces update to revision from Subversion.
--refresh-build Start the build from scratch.
@@ -3865,6 +3895,19 @@ DONE
last SWITCH;
};
+ /^--resume-after=?/ && do {
+ $_ = extract_option_value($_, @ARGV);
+ if (not $_)
+ {
+ print "You must pass a module to resume after to the --resume-after option!\n";
+ exit 7;
+ }
+
+ set_option('global', '#resume-after', $_);
+ set_option('global', '#no-svn', 1);
+ last SWITCH;
+ };
+
/^--/ && do {
# First let's see if they're trying to override a global option.
my ($option) = /^--([-\w\d\/]+)/;
@@ -4066,10 +4109,29 @@ sub get_update_list
# in the module's options. The command-line arguments should have been
# parsed first.
#
-# This subroutine will handle the --resume-from options.
+# This subroutine will handle the --resume-from and --resume-after options.
sub get_build_list
{
my $resume_point = get_option('global', '#resume-from');
+ my $resume_point_after = get_option('global', '#resume-after');
+
+ # Set resume_point.
+ if ($resume_point_after)
+ {
+ if ($resume_point)
+ {
+ # Whoops, can't enable both
+ error <isa('BuildException')) {
+ print "\tCaught exception: ", $@->{'message'}, "\n";
+ print "\n\tAborting.\n";
+ }
+ else {
+ print "Encountered an error in the execution of the script.\n";
+ print "The error reported was $@\n";
+ print "Please submit a bug against kdesvn-build on http://bugs.kde.org/\n";
+ }
$result = 99;
}