Phil Blundell wrote on 2011-08-04: > On Thu, 2011-08-04 at 22:49 +0800, Cui, Dexuan wrote: >> + BDIR=`readlink -f "$BDIR"` >> + if [ -z "$BDIR" ]; then >> + PARENTDIR=`dirname "$1"` >> + echo >&2 "Error: the directory $PARENTDIR does not exist?" >> return 1 >> fi >> fi > > Just out of curiosity, could you not just do "mkdir -p $BDIR" and > avoid this whole set of complicated tests? Or is there some reason > why it's actually important to know whether the parent directory existed > already? Hi Phil, Actually in scripts/oe-setup-builddir, we do have a line mkdir -p $BUILDDIR/conf .
The issue is: "readlink -f not_existent_dir/build" returns empty, so BUILDDIR would be assigned with `pwd` and this is not expected. I don't really know why the test "readlink -f" is here -- "readlink -f" is used 3 times in scripts/oe-buildenv-internal. Maybe RP knows the history? I also think we can drop the tests "readlink -f" since we use "mkdir -p"? Thanks, -- Dexuan _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core