sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to devel-flux cauldron by Justin Boffemmyer (d1406476441bd8434f97c0658cde72b793a4b267)
- From: Justin Boffemmyer <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to devel-flux cauldron by Justin Boffemmyer (d1406476441bd8434f97c0658cde72b793a4b267)
- Date: Fri, 4 Apr 2008 01:06:46 -0500
GIT changes to devel-flux cauldron by Justin Boffemmyer <flux AT sourcemage.org>:
src/libcauldron | 18 ++++++++++++++++++
1 files changed, 18 insertions(+)
New commits:
commit d1406476441bd8434f97c0658cde72b793a4b267
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>
libcauldron: defined code for cleaning iso
Defined the code for the cauldron_clean_iso_system function. This
de-lints the iso from unnecessary/unwanted files that were installed
from spells. The intended primary use is to remove things like gcc,
but we can't remove it via dispel because some of its installed libs
are still needed. However, it is functional enough to remove any
file/directory. Absolute paths should be given relative to the root of
a chroot of the iso since this is intended to run from inside a chroot
for security purposes.
diff --git a/src/libcauldron b/src/libcauldron
index 8bf70c1..1670149 100755
--- a/src/libcauldron
+++ b/src/libcauldron
@@ -295,12 +295,30 @@ function cauldron_add_installer() {
}
#---------------------------------------------------------------------
+## @param CLEANFILE - a file that lists paths to remove (absolute paths,
+## relative to a chroot of the iso), one file/path per line
##
## Cleans out unneeded files that were used to generate the ISO, but should
## not be present on the final ISO system
##
#---------------------------------------------------------------------
function cauldron_clean_iso_system() {
+ local CLEANFILE=$1
+
+ [[ -z "$CLEANFILE" ]] && return 1
+
+ for i in $(sort -r $CLEANFILE)
+ do
+ if [[ -d $i ]]
+ then
+ echo "Attempting to remove directory $i..."
+ rmdir $i
+ else
+ echo "Deleting $i"
+ rm $i
+ fi
+ done
+ return 0
}
#---------------------------------------------------------------------
- [SM-Commit] GIT changes to devel-flux cauldron by Justin Boffemmyer (d1406476441bd8434f97c0658cde72b793a4b267), Justin Boffemmyer, 04/04/2008
Archive powered by MHonArc 2.6.24.