Permalink
Browse files

Fix bind and index state

Fixes #84, #90
  • Loading branch information...
kaihendry committed Oct 4, 2012
1 parent a9cf9ab commit f949898ca4b4f0e47b53a9edcecbf1dcd8a9a39e
View
BIN -16.7 KB (100%) boot/initrd.img-3.2.0-3artax1-486
Binary file not shown.
View
Binary file not shown.
@@ -1213,22 +1213,17 @@ setup_unionfs ()
# not understand...
ln -sf /proc/mounts /etc/mtab
gitfs_opt=""
# In debug mode, we make the rootfs a big git repo / checkout, for
# easy development.
if [ "${debug}" == "y" ]; then
# Make sure aufs and fuse both keep persistent inode numbers
# (i.e. disable noxino and add noforget), to not confuse
# git.
noxino_opt=""
gitfs_opt="$gitfs_opt,noforget"
# This will be later moved into the real rootfs (but we
# can't do that now, since the .git dir would end up
# underneath the aufs mount).
mkdir /.git
mount --bind ${image} /.git
fi
# Make sure aufs and fuse both keep persistent inode numbers
# (i.e. disable noxino and add noforget), to not confuse
# git.
noxino_opt=""
gitfs_opt="$gitfs_opt,noforget"
# This will be later moved into the real rootfs (but we
# can't do that now, since the .git dir would end up
# underneath the aufs mount).
mkdir /.git
mount --bind ${image} /.git
if [ -n "$GIT_REVISION" ]; then
gitfs_opt="$gitfs_opt,rev=$GIT_REVISION"
@@ -1909,6 +1904,7 @@ mountroot ()
mount --move /.git "${rootmnt}/.git"
fi
# Make sure that HEAD corresponds to the commit
# mounted by git-fs
if [ -n "$GIT_REVISION" ]; then
@@ -1918,8 +1914,11 @@ mountroot ()
# slow on git-fs / aufs). Instead, we reset HEAD
# and the index separately.
chroot "${rootmnt}" git --git-dir "/.git" reset --soft "${GIT_REVISION}"
chroot "${rootmnt}" git --git-dir "/.git" read-tree "${GIT_REVISION}"
fi
# Reset the index
chroot "${rootmnt}" git --git-dir "/.git" read-tree HEAD
fi
# aufs2 in kernel versions around 2.6.33 has a regression:
@@ -1 +1 @@
3f92853a908e175ce10f948fa1937a67542843ee /boot/initrd.img-3.2.0-3artax1-486
cf45377e820f064fbec5fca6dc06ad614f5321c0 /boot/initrd.img-3.2.0-3artax1-486
@@ -1 +1 @@
cbf9e88f699cf06a17f74848e938f05348447926 /boot/initrd.img-3.2.0-3artax1-686-pae
1b5294802e75476e85736525f8f40ec3446da52a /boot/initrd.img-3.2.0-3artax1-686-pae

0 comments on commit f949898

Please sign in to comment.