From 99d8dde1d6f1b2a2e9f322b20a8c54785c2c47d1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 20 Feb 2013 17:29:05 -0500 Subject: [PATCH] make_chroot: clobber existing /etc/mtab If our sdk has an /etc/mtab file already, then clobber it. This fixes build problems where chromeos-base now installs /etc/mtab for us, but the sdk build isn't expecting it leading to the error: INFO cros_sdk:make_chroot: Running init_setup()... ln: creating symbolic link `/b/cbuild/new-sdk-chroot/etc/mtab': File exists Running ['/b/cbuild/src/scripts/sdk_lib/make_chroot.sh', '--stage3_path', '/b/cbuild/built-sdk.tar.xz', '--chroot', '/b/cbuild/new-sdk-chroot', '--cache_dir', '/b/cbuild/.cache', '--nousepkg'] failed! BUG=None TEST=`cros_sdk --chroot foo` still works Change-Id: I539cf329e93e28534e6ff00577ce415d76918b85 Reviewed-on: https://gerrit.chromium.org/gerrit/43641 Reviewed-by: David James Commit-Queue: Mike Frysinger Tested-by: Mike Frysinger --- sdk_lib/make_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh index 7f41ea56d8..80088b9d67 100755 --- a/sdk_lib/make_chroot.sh +++ b/sdk_lib/make_chroot.sh @@ -176,7 +176,7 @@ init_setup () { "${FLAGS_chroot}"/"${PORTAGE_STABLE_OVERLAY}" # Some operations need an mtab. - ln -s /proc/mounts "${FLAGS_chroot}/etc/mtab" + ln -sfT /proc/mounts "${FLAGS_chroot}/etc/mtab" # Set up sudoers. Inside the chroot, the user can sudo without a password. # (Safe enough, since the only way into the chroot is to 'sudo chroot', so