[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk
From: Michael Pyne <michael.pyne () kdemail ! net>
Date: 2005-07-15 1:12:35
Message-ID: 1121389955.821715.21848.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 434684 by mpyne:
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
M +22 -0 doc/scripts/kdesvn-build/index.docbook
M +22 -0 scripts/kdesvn-build
--- trunk/KDE/kdesdk/doc/scripts/kdesvn-build/index.docbook #434683:434684
@@ -907,6 +907,28 @@
</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>
--- trunk/KDE/kdesdk/scripts/kdesvn-build #434683:434684
@@ -289,6 +289,7 @@
"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 @@
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic