Add remove-after-install option to add wish 109044. This can be used to remove

the builddir and/or source dir after a successful module install, for people
with limited disk space.

Supports the following values:
none     - Don't delete anything.  Obviously this is the default.
builddir - Delete the build directory after install.

This isn't a command line option though, it needs to be set in your
~/.kdesvn-buildrc (it is possible to set it via the command line though by
doing --remove-after-install=builddir).

BUG:109044

svn path=/trunk/KDE/kdesdk/doc/scripts/kdesvn-build/; revision=434684
wilder
Michael Pyne 21 years ago
parent a1b3fbcb74
commit b89f6bea3a
  1. 22
      doc/index.docbook
  2. 22
      kdesvn-build

@ -907,6 +907,28 @@ You may use a tilde (~) to represent your home directory.
</entry>
</row>
<row id="conf-remove-after-install">
<entry>remove-after-install</entry>
<entry>Overrides global</entry>
<entry><para>If you are low on hard disk space, you may want to use this option
in order to automatically delete the build directory (or both the source and
build directories for one-time installs) after the module is successfully
installed.
</para>
<para>Possible values for this option are:
<itemizedlist>
<listitem><para>none - Do not delete anything (This is the default).</para></listitem>
<listitem><para>builddir - Delete the build directory, but not the source.</para></listitem>
<listitem><para>all - Delete both the source code and build directory.</para></listitem>
</itemizedlist>
</para>
<para>Note that using this option can have a significant detrimental impact on
both your bandwidth usage (if you use 'all') and the time taken to compile KDE,
since kdesvn-build will be unable to perform incremental builds.</para>
</entry>
</row>
<row id="conf-set-env">
<entry>set-env</entry>
<entry>Overrides global</entry>

@ -289,6 +289,7 @@ my %package_opts = (
"reconfigure" => "",
"recreate-configure" => "",
"refresh-build" => "",
"remove-after-install"=> "none", # { none, builddir, all }
"revision" => 0,
"set-env" => { }, # Hash of environment vars to set
"source-dir" => "$ENV{HOME}/kdesvn",
@ -3529,6 +3530,27 @@ sub handle_install
return 1; # Error
}
}
next if $result != 0; # Don't delete anything if the build failed.
my $remove_setting = get_option($module, 'remove-after-install');
# Possibly remove the srcdir and builddir after install for users with
# a little bit of HD space.
if($remove_setting eq 'all')
{
# Remove srcdir
my $srcdir = get_fullpath($module, 'source');
print clr "\tRemoving b[r[$module source].\n";
system ('rm', '-rf', $srcdir);
}
if($remove_setting eq 'builddir' or $remove_setting eq 'all')
{
# Remove builddir
print clr "\tRemoving b[r[$module build directory].\n";
system ('rm', '-rf', $builddir);
}
}
return $result;

Loading…
Cancel
Save