On 9/13/07, M.Canales.es <[EMAIL PROTECTED]> wrote:
> El Jueves, 13 de Septiembre de 2007 21:46, Jean-Luc Delatre escribió:
>
> > Where does it says the contrary?
> > Unless there is a "reason" for having some set of files at a precise place
> > it should work from anywhere.
>
> It work from anywhere EXCEPT if you insist on overwrite the sources files with
> the output files, that is a nosense.
This should probably be checked for in the jhalfs script instead of
letting the user bone themselves. I think the attached patch should
fix that.
--
Dan
From 5b2a70ca2bb7ed291eafcf94e80d41a3aec3e728 Mon Sep 17 00:00:00 2001
From: Dan Nicholson <[EMAIL PROTECTED]>
Date: Thu, 13 Sep 2007 13:59:12 -0700
Subject: [PATCH] Ensure that source jhalfs directory != build jhalfs directory
---
Config.in | 3 +++
jhalfs | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Config.in b/Config.in
index 9cd3504..a8235da 100644
--- a/Config.in
+++ b/Config.in
@@ -723,6 +723,9 @@ menu "--- General Settings"
default "/mnt/build_dir"
help
#-- The directory where the created system will be located.
+ # NOTE: A working directory named jhalfs will be created
+ # here, so ensure this does not conflict with the jhalfs
+ # source directory.
config GETPKG
bool "Retrieve source files"
diff --git a/jhalfs b/jhalfs
index 964600d..7b4b4ac 100755
--- a/jhalfs
+++ b/jhalfs
@@ -119,6 +119,14 @@ SET_WARNINGS=${SET_WARNINGS:=n}
SET_MISC=${SET_MISC:=n}
SET_BLOWFISH=${SET_BLOWFISH:=n}
+# Sanity check on the location of $BUILDDIR / $JHALFSDIR
+CWD=$(cd `dirname $0` && pwd)
+if [[ $JHALFSDIR == $CWD ]]; then
+ echo " The jhalfs source directory conflicts with the jhalfs build directory."
+ echo " Please move the source directory or change the build directory."
+ exit 2
+fi
+
# Book surces envars
BRANCH_ID=${BRANCH_ID:=development}
--
1.5.3.1
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page