[SCM] debian-live/live-helper branch, master, updated. 1.0_a36-1-27-g8049ea3

Daniel Baumann daniel at debian.org
Sun Nov 18 15:21:21 UTC 2007


The branch, master has been updated
       via  8049ea3d6cfa8d7e69edabd5239e83a42d913d17 (commit)
       via  7e6e498ce7e2364b5048c303037ff460b332deba (commit)
       via  fefbe2259e5508f4a0127fe35a71efd5777721e1 (commit)
      from  f9242b2d4958a4bdd50f04dde369bc4191c00516 (commit)


- Shortlog ------------------------------------------------------------
8049ea3 Rewriting lh_clean manpage.
7e6e498 Moving sanity check in lh_clean to the earliest possibility.
fefbe22 Switching lh_clean to proper command line arguments.

Summary of changes:
 helpers/lh_clean       |   48 ++++++++++++++++++++++++------------------------
 manpages/lh_clean.en.1 |   35 +++++++++++++++++++++--------------
 2 files changed, 45 insertions(+), 38 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 8049ea3d6cfa8d7e69edabd5239e83a42d913d17
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Nov 18 16:20:56 2007 +0100

    Rewriting lh_clean manpage.

diff --git a/manpages/lh_clean.en.1 b/manpages/lh_clean.en.1
index 9609070..b7d3cc8 100644
--- a/manpages/lh_clean.en.1
+++ b/manpages/lh_clean.en.1
@@ -4,27 +4,30 @@
 lh_clean \- clean up system build directories
 
 .SH SYNOPSIS
-.B lh_clean [\fIlive\-helper\ options\fR\|]
-.B lh_clean [\fRall\fB|\fRcache\fB|\fRchroot\fB|\fRbinary\fB|\fRpurge\fB|\fRstage\fB|\fRsource\fB]
+.B lh_clean [\fIlive\-helper\ options\fR\] [\fB\-\-all\fR] [\fB\-\-cache\fR] [\fB\-\-chroot\fR] [\fB\-\-binary\fR] [\fB\-\-purge\fR] [\fB\-\-remove\fR] [\fB\-\-stage\fR] [\fB\-\-source\fR]
 
 .SH DESCRIPTION
-lh_clean is a live\-helper program that is responsible for cleaning up after a system is built. It removes the system build directories, and removes some other files including stage files, and any detritus left behind by other live\-helper commands.
+lh_clean is a live\-helper program that is responsible for cleaning up after a
+system is built. It removes the system build directories, and removes some other
+files including stage files, and any detritus left behind by other live\-helper
+commands.
 
 .SH OPTIONS
-The following command line options are supported by lh_clean.
-.IP "\fBall\fR" 4
+.IP "\fB\-\-all\fR" 4
 removes chroot, binary, stage, and source. This is the default operation.
-.IP "\fBcache\fR" 4
+.IP "\fB\-\-cache\fR" 4
 removes all cache directories.
-.IP "\fBchroot\fR" 4
+.IP "\fB\-\-chroot\fR" 4
 unmounts and removes the chroot directory. If bootstrap cache is available, the system is reset to bootstrap stage.
-.IP "\fBbinary\fR" 4
+.IP "\fB\-\-binary\fR" 4
 removes all binary related caches, directories, and stages files.
-.IP "\fBpurge\fR" 4
+.IP "\fB\-\-purge\fR" 4
 removes everything (including cache) but config.
-.IP "\fBstage\fR" 4
+.IP "\fB\-\-remove\fR" 4
+removes everything (including package cache, but not stage cache) but config.
+.IP "\fB\-\-stage\fR" 4
 removes all stage files.
-.IP "\fBsource\fR" 4
+.IP "\fB\-\-source\fR" 4
 removes all source related caches, directories, and stage files.
 
 .SH SEE ALSO
@@ -33,10 +36,14 @@ removes all source related caches, directories, and stage files.
 This program is a part of live\-helper.
 
 .SH BUGS
-Report bugs against live\-helper <\fIhttp://packages.qa.debian.org/live\-helper\fR>.
+Report bugs against live\-helper
+<\fIhttp://packages.qa.debian.org/live\-helper\fR>.
 
 .SH HOMEPAGE
-More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
+More information about the Debian Live project can be found at
+<\fIhttp://debian\-live.alioth.debian.org/\fR> and
+<\fIhttp://wiki.debian.org/DebianLive/\fR>.
 
 .SH AUTHOR
-live\-helper was written by Daniel Baumann <\fIdaniel at debian.org\fR> for the Debian project.
+live\-helper was written by Daniel Baumann <\fIdaniel at debian.org\fR> for the
+Debian project.

commit 7e6e498ce7e2364b5048c303037ff460b332deba
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Nov 18 16:15:43 2007 +0100

    Moving sanity check in lh_clean to the earliest possibility.

diff --git a/helpers/lh_clean b/helpers/lh_clean
index 4f0c526..4a5baa4 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -33,6 +33,13 @@ Read_conffile config/source
 Read_conffile "${LH_CONFIG}"
 Set_defaults
 
+# Avoid cases were users accidentally nuke their config/binary
+if [ ! -d config ] || [ "$(basename ${PWD})" = "config" ]
+then
+	Echo_error "${PWD} is not a good Debian Live working directory to clean."
+	exit 1
+fi
+
 rm -f .lock
 
 if [ -z "${@}" ]
@@ -42,13 +49,6 @@ else
 	ARGUMENTS="${@}"
 fi
 
-# Avoid cases were users accidentally nuke their config/binary
-if [ ! -d config ] || [ "$(basename ${PWD})" = "config" ]
-then
-	Echo_error "${PWD} is not a good Debian Live working directory to clean."
-	exit 1
-fi
-
 for ARGUMENT in ${ARGUMENTS}
 do
 	case "${ARGUMENT}" in

commit fefbe2259e5508f4a0127fe35a71efd5777721e1
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Nov 18 16:14:50 2007 +0100

    Switching lh_clean to proper command line arguments.

diff --git a/helpers/lh_clean b/helpers/lh_clean
index 393f73b..4f0c526 100755
--- a/helpers/lh_clean
+++ b/helpers/lh_clean
@@ -20,7 +20,7 @@ done
 # Setting static variables
 DESCRIPTION="clean up system build directories"
 HELP=""
-USAGE="${PROGRAM} [all|cache|chroot|binary|purge|stage|source]"
+USAGE="${PROGRAM} [--all] [--cache] [--chroot] [--binary] [--purge] [--remove] [--stage] [--source]"
 
 Arguments "${@}"
 
@@ -37,7 +37,7 @@ rm -f .lock
 
 if [ -z "${@}" ]
 then
-	ARGUMENTS="all"
+	ARGUMENTS="--all"
 else
 	ARGUMENTS="${@}"
 fi
@@ -52,18 +52,18 @@ fi
 for ARGUMENT in ${ARGUMENTS}
 do
 	case "${ARGUMENT}" in
-		all)
-			"${0}" chroot
-			"${0}" binary
-			"${0}" stage
-			"${0}" source
+		--all)
+			"${0}" --chroot
+			"${0}" --binary
+			"${0}" --stage
+			"${0}" --source
 			;;
 
-		cache)
+		--cache)
 			${LH_ROOT_COMMAND} rm -rf cache
 			;;
 
-		chroot)
+		--chroot)
 			Echo_message "Cleaning chroot"
 			${LH_ROOT_COMMAND} umount -f chroot/sys > /dev/null 2>&1 || true
 			${LH_ROOT_COMMAND} umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
@@ -78,7 +78,7 @@ do
 			rm -f .stage/chroot*
 			;;
 
-		binary)
+		--binary)
 	                ${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
 			rm -rf binary.tmp binary.deb binary.udeb
 			rm -f binary.iso
@@ -92,21 +92,21 @@ do
 			rm -f .stage/binary*
 			;;
 
-		remove)
-			"${0}" all
+		--remove)
+			"${0}" --all
 			rm -rf cache/packages_*
 			;;
 
-		purge)
-			"${0}" all
-			"${0}" cache
+		--purge)
+			"${0}" --all
+			"${0}" --cache
 			;;
 
-		stage)
+		--stage)
 			rm -rf .stage
 			;;
 
-		source)
+		--source)
 			rm -f source.iso
 			rm -f source.img
 			rm -f source*.tar

-- 
debian-live/live-helper



More information about the debian-live-changes mailing list