Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gnap-dev
Navigation:
Lists: gnap-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gnap-dev@g.o
From: "Philipp Riegger" <lists@...>
Subject: 09-cleanup-gnap_make.patch
Date: Thu, 5 Jul 2007 16:11:30 +0300 (EEST)
Index: src/gnap_make
===================================================================
--- src/gnap_make	(revision 81)
+++ src/gnap_make	(working copy)
@@ -29,7 +29,6 @@

 # Read options
 NOTARGET=1
-ALLTARGET=0
 STAGE3=0
 LIVECD1=0
 LIVECD2=0
@@ -47,7 +46,13 @@
 		v ) GNAP_STAMP="${OPTARG}";;
 		t )
 			case "${OPTARG}" in
-				all ) ALLTARGET=1;;
+				all )
+					STAGE3=1
+					LIVECD1=1
+					LIVECD2=1
+					TARBALL=1
+					MODULES=1
+					NEEDS_SNAPSHOT=1;;
 				stage3 )
 					STAGE3=1
 					NEEDS_SNAPSHOT=1;;
@@ -57,10 +62,13 @@
 				livecd-stage2 )
 					LIVECD2=1
 					NEEDS_SNAPSHOT=1;;
-				tarball ) TARBALL=1;;
+				tarball )
+					TARBALL=1;;
 				extensions )
 					MODULES=1
 					NEEDS_SNAPSHOT=1;;
+				* )
+					gtest 1 'Specified stage unknown !';;
 			esac
 			NOTARGET=0;;
 		f ) FORCEYES=1;;
@@ -107,27 +115,14 @@
 gtest continued $? "${GNAP_CATALYST_CONF} file not found !"
 source "${GNAP_CATALYST_CONF}"

-# Default targets is complete core build
-if [[ "${ALLTARGET}" -eq 1 ]]; then
-	STAGE3=1
-	LIVECD1=1
-	LIVECD2=1
-	TARBALL=1
-	MODULES=1
-	NEEDS_SNAPSHOT=1
-fi
-
 # At least one target is needed
 test "${NOTARGET}" -eq 0
 gtest continued $? \
 	'No target specified. You should provide at least one -t option.'

 # CATALYST_DIR must exist
-if [[ ! -d "${CATALYST_DIR}" ]]; then
-  mkdir "${CATALYST_DIR}"
-  gtest continued $? \
-	"Error: failed to create ${CATALYST_DIR} directory."
-fi
+mkdir -p "${CATALYST_DIR}"
+gtest continued $? "Error: failed to create ${CATALYST_DIR} directory."

 # Stage3 needs a seed stage
 if [[ "${STAGE3}" -eq 1 ]]; then
@@ -146,7 +141,6 @@
 	test -f "${GNAP_STAGE3FILE}"
 	gtest continued $? "${GNAP_STAGE3FILE} is not a valid stage3 tarball"
 fi
-gtest 0

 # If extensions and no stage3, warn that we'll use seedstage as stage3
 STAGE3LOC="${CATALYST_DIR}/builds/${RELTYPE}/stage3-${SUBARCH}-${GNAP_STAMP}.tar.bz2"
@@ -154,9 +148,9 @@
 	if [[ "${STAGE3}" -ne 1 && ! -f "${STAGE3LOC}" ]]; then
 		gwarn '"livecd-stage1" or "extensions" was selected without "stage3".'
 		gconfirm 'Should I use the seed stage as stage3 result ?'
-		if [[ ! -d "${CATALYST_DIR}/builds/${RELTYPE}" ]]; then
-			mkdir -p "${CATALYST_DIR}/builds/${RELTYPE}"
-		fi
+		mkdir -p "${CATALYST_DIR}/builds/${RELTYPE}"
+		gtest continued $? \
+			"Error: failed to create ${CATALYST_DIR}/builds/${RELTYPE} directory."
 		cp "${GNAP_STAGE3FILE}" "${STAGE3LOC}"
 	fi
 fi
@@ -194,8 +188,7 @@

 if [[ -f "${GNAP_LOGPREFIX}.out" || -f "${GNAP_LOGPREFIX}.err" ]]; then
 	if [[ "${FORCEYES}" -ne 1 ]]; then
-		read -ep \
-			" ${W}*${N} Logfile(s) already exists. Append/Overwrite [A]: " \
+		read -ep " ${W}*${N} Logfile(s) already exists. Append/Overwrite [A]: " \
 			answer
 		if [[ "${answer}" == 'o' || "${answer}" == 'O' ]]; then
 			rm "${GNAP_LOGPREFIX}.out" "${GNAP_LOGPREFIX}.err"
@@ -210,9 +203,7 @@
 if [[ "${NEEDS_SNAPSHOT}" -eq 1 ]]; then
 	gbegin 'Preparing portage snapshot'

-	if [[ ! -d "${CATALYST_DIR}/snapshots" ]]; then
-		mkdir -p "${CATALYST_DIR}/snapshots"
-	fi
+	mkdir -p "${CATALYST_DIR}/snapshots"

 	if [[ -z "${GNAP_PORTAGE_OVERLAYS}" ]]; then
 		cp "${GNAP_SNAPSHOTFILE}"
"${CATALYST_DIR}/snapshots/portage-${GNAP_STAMP}.tar.bz2"

-- 
gnap-dev@g.o mailing list


References:
Some patches for gnap
-- Philipp Riegger
Navigation:
Lists: gnap-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
08-namespace-gnap_shared.patch
Next by thread:
Re: Some patches for gnap
Previous by date:
08-namespace-gnap_shared.patch
Next by date:
Last meeting, current status of my project


Updated Jun 17, 2009

Summary: Archive of the gnap-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.