[Emdebian-logs] [SCM] Root filesystem generation tool (multistrap wrapper) branch, master, updated. 83ba112abb8f173254c60611b5a24ca0a72ca58f
josch
j.schauer at email.de
Tue Oct 9 19:36:10 UTC 2012
The following commit has been merged in the master branch:
commit 83ba112abb8f173254c60611b5a24ca0a72ca58f
Author: Gilles Filippini <pini at debian.org>
Date: Mon Oct 8 10:07:32 2012 +0200
Fix chroot internal symlinks path
This patch makes sure ${ROOTDIR} is always an absolute path. This
is requested for the absolute symlink conversion step to work
properly.
diff --git a/polystrap.sh b/polystrap.sh
index fe0a65a..2f1f091 100755
--- a/polystrap.sh
+++ b/polystrap.sh
@@ -73,7 +73,7 @@ BOARD="$1"
# overwrite target options by commandline options
SUITE=${_SUITE:-$SUITE}
ARCH=${_ARCH:-$ARCH}
-ROOTDIR=${_ROOTDIR:-$ROOTDIR}
+ROOTDIR=$(readlink -m ${_ROOTDIR:-$ROOTDIR})
MIRROR=${_MIRROR:-$MIRROR}
if [ "$_PACKAGES" = "" ] && [ -r "$BOARD/packages" ]; then
@@ -130,7 +130,7 @@ for link in `find $ROOTDIR -type l`; do
if [ "${target%%/*}" = "" ]; then # target begins with slash
echo "I: convert symlink: ${link#$ROOTDIR} -> $target"
rm $link
- ln -s $ROOTDIR/$target $link
+ ln -s ${ROOTDIR}$target $link
fi
done
@@ -175,6 +175,7 @@ rm $ROOTDIR/usr/sbin/policy-rc.d
# need to generate tar inside fakechroot so that absolute symlinks are correct
# tar is clever enough to not try and put the archive inside itself
-echo "I: create tarball $ROOTDIR.tar"
-fakechroot chroot $ROOTDIR tar -cf $ROOTDIR.tar -C / .
-mv $ROOTDIR/$ROOTDIR.tar .
+TARBALL=$(basename $ROOTDIR).tar
+echo "I: create tarball $TARBALL"
+fakechroot chroot $ROOTDIR tar -cf $TARBALL -C / .
+mv $ROOTDIR/$TARBALL .
--
Root filesystem generation tool (multistrap wrapper)
More information about the Emdebian-logs
mailing list