Merge "Allow adding packages to debootstrap"

This commit is contained in:
Jenkins 2014-01-20 21:26:51 +00:00 committed by Gerrit Code Review
commit ca2a430375

View File

@ -1,7 +1,12 @@
#!/bin/sh #!/bin/sh
set -eu set -eu
if [ -f ${TARGET_ROOT}/.distro-name ] ; then
DISTRO_NAME=$(cat ${TARGET_ROOT}/.distro-name)
else
DISTRO_NAME=debian
fi
DIB_RELEASE=${DIB_RELEASE:-unstable} DIB_RELEASE=${DIB_RELEASE:-unstable}
DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DIB_RELEASE}-${ARCH}.tar.gz DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-${ARCH}.tar.gz
DIB_DEBIAN_MIRROR=${DIB_DEBIAN_MIRROR:-http://http.debian.net/debian} DIB_DEBIAN_MIRROR=${DIB_DEBIAN_MIRROR:-http://http.debian.net/debian}
http_proxy=${http_proxy:-} http_proxy=${http_proxy:-}
@ -12,6 +17,9 @@ if [ -n "$DIB_OFFLINE" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then
else else
echo Building new tarball for Debian $DIB_RELEASE ARCH=$ARCH echo Building new tarball for Debian $DIB_RELEASE ARCH=$ARCH
ADD_PACKAGES=cloud-init,cloud-utils,cloud-initramfs-growroot,sudo,adduser,locales,openssh-server,file,less,kbd,curl,bash-completion,linux-image-amd64 ADD_PACKAGES=cloud-init,cloud-utils,cloud-initramfs-growroot,sudo,adduser,locales,openssh-server,file,less,kbd,curl,bash-completion,linux-image-amd64
if [ -f ${TARGET_ROOT}/.extra-packages ] ; then
ADD_PACKAGES=${ADD_PACKAGES},$(cat ${TARGET_ROOT}/.extra-packages)
fi
sudo sh -c "http_proxy=$http_proxy debootstrap --verbose \ sudo sh -c "http_proxy=$http_proxy debootstrap --verbose \
--arch=${ARCH} \ --arch=${ARCH} \
--include=${ADD_PACKAGES} \ --include=${ADD_PACKAGES} \