From 8708b22fab3a1f75756416f2cd0442859b62daee Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Thu, 22 Aug 2013 16:51:41 -0500
Subject: [PATCH] chroot: root permission needed

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 scripts/chroot.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index a2f9cc999..dc49ccd77 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -149,7 +149,7 @@ if [ "x${chroot_very_small_image}" = "xenable" ] ; then
 	sudo rm -rf ${tempdir}/usr/share/doc/* || true
 
 	#dpkg 1.15.8++, No Docs...
-	mkdir -p ${tempdir}/etc/dpkg/dpkg.cfg.d/
+	sudo mkdir -p ${tempdir}/etc/dpkg/dpkg.cfg.d/ || true
 	echo "# Delete locales" > /tmp/01_nodoc
 	echo "path-exclude=/usr/share/locale/*" >> /tmp/01_nodoc
 	echo "path-include=/usr/share/locale/en*" >> /tmp/01_nodoc
@@ -172,6 +172,7 @@ if [ "x${chroot_very_small_image}" = "xenable" ] ; then
 fi
 
 #generic apt.conf tweaks for flash/mmc devices to save on wasted space...
+sudo mkdir -p ${tempdir}/etc/apt/apt.conf.d/ || true
 #apt: no local cache
 echo "Dir::Cache {" > /tmp/02nocache
 echo "  srcpkgcache \"\";" >> /tmp/02nocache
-- 
GitLab