Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 3cf74cc2 authored by Robert Nelson's avatar Robert Nelson
Browse files

obvious: use --exclude option with debootstrap, intead of removing later...


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent 34ea2ddb
Branches
Tags
No related merge requests found
......@@ -59,6 +59,7 @@ minimal_armel () {
deb_components="${deb_components}"
apt_proxy="${apt_proxy}"
exclude_pkgs_list="${exclude_pkgs_list}"
base_pkg_list="${base_pkg_list}"
image_hostname="${image_hostname}"
......@@ -74,11 +75,6 @@ minimal_armel () {
chroot_enable_hardlink="${chroot_enable_hardlink}"
chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_no_aptitude="${chroot_no_aptitude}"
chroot_no_tasksel="${chroot_no_tasksel}"
chroot_no_manpages="${chroot_no_manpages}"
chroot_no_info="${chroot_no_info}"
chroot_no_wget="${chroot_no_wget}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
......@@ -151,16 +147,12 @@ is_debian () {
deb_components="main contrib non-free"
pkg_list
exclude_pkgs_list="aptitude,aptitude-common,info,install-info,libept1.4.12,manpages,man-db,tasksel,tasksel-data,wget"
chroot_enable_localepurge="enable"
chroot_enable_deborphan="enable"
# chroot_enable_hardlink="enable"
chroot_no_lsb_release="Debian"
chroot_no_sudo="enable"
chroot_no_aptitude="enable"
chroot_no_tasksel="enable"
chroot_no_manpages="enable"
chroot_no_info="enable"
chroot_no_wget="enable"
}
#13.04
......
......@@ -59,6 +59,7 @@ minimal_armel () {
deb_components="${deb_components}"
apt_proxy="${apt_proxy}"
exclude_pkgs_list="${exclude_pkgs_list}"
base_pkg_list="${base_pkg_list}"
image_hostname="${image_hostname}"
......@@ -71,13 +72,9 @@ minimal_armel () {
chroot_enable_localepurge="${chroot_enable_localepurge}"
chroot_enable_deborphan="${chroot_enable_deborphan}"
chroot_enable_hardlink="${chroot_enable_hardlink}"
chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_no_aptitude="${chroot_no_aptitude}"
chroot_no_tasksel="${chroot_no_tasksel}"
chroot_no_manpages="${chroot_no_manpages}"
chroot_no_info="${chroot_no_info}"
chroot_no_wget="${chroot_no_wget}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
......@@ -150,15 +147,12 @@ is_debian () {
deb_components="main contrib non-free"
pkg_list
exclude_pkgs_list=""
# chroot_enable_localepurge="enable"
# chroot_enable_deborphan="enable"
# chroot_enable_hardlink="enable"
# chroot_no_lsb_release="Debian"
# chroot_no_sudo="enable"
# chroot_no_aptitude="enable"
# chroot_no_tasksel="enable"
# chroot_no_manpages="enable"
# chroot_no_info="enable"
# chroot_no_wget="enable"
}
#13.04
......
......@@ -72,6 +72,7 @@ minimal_armel () {
deb_components="${deb_components}"
apt_proxy="${apt_proxy}"
exclude_pkgs_list="${exclude_pkgs_list}"
base_pkg_list="${base_pkg_list}"
image_hostname="${image_hostname}"
......@@ -84,13 +85,9 @@ minimal_armel () {
chroot_enable_localepurge="${chroot_enable_localepurge}"
chroot_enable_deborphan="${chroot_enable_deborphan}"
chroot_enable_hardlink="${chroot_enable_hardlink}"
chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_no_aptitude="${chroot_no_aptitude}"
chroot_no_tasksel="${chroot_no_tasksel}"
chroot_no_manpages="${chroot_no_manpages}"
chroot_no_info="${chroot_no_info}"
chroot_no_wget="${chroot_no_wget}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
......@@ -199,15 +196,12 @@ is_debian () {
deb_components="main contrib non-free"
pkg_list
exclude_pkgs_list=""
# chroot_enable_localepurge="enable"
# chroot_enable_deborphan="enable"
# chroot_enable_hardlink="enable"
# chroot_no_lsb_release="Debian"
# chroot_no_sudo="enable"
# chroot_no_aptitude="enable"
# chroot_no_tasksel="enable"
# chroot_no_manpages="enable"
# chroot_no_info="enable"
# chroot_no_wget="enable"
}
#12.10
......
......@@ -324,24 +324,6 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
fi
}
trim_pkgs () {
if [ "x${chroot_no_aptitude}" = "xenable" ] ; then
apt-get -y remove aptitude aptitude-common libept1.4.12 --purge
fi
if [ "x${chroot_no_tasksel}" = "xenable" ] ; then
apt-get -y remove tasksel tasksel-data --purge
fi
if [ "x${chroot_no_manpages}" = "xenable" ] ; then
apt-get -y remove manpages man-db --purge
fi
if [ "x${chroot_no_info}" = "xenable" ] ; then
apt-get -y remove info install-info --purge
fi
if [ "x${chroot_no_wget}" = "xenable" ] ; then
apt-get -y remove wget --purge
fi
}
set_locale () {
packages="locales"
for pkg in \${packages} ; do check_n_install ; done
......@@ -551,7 +533,6 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
install_pkg_updates
install_pkgs
trim_pkgs
if [ "${chroot_KERNEL_HTTP_DIR}" ] ; then
packages="initramfs-tools u-boot-tools wget"
for pkg in \${packages} ; do check_n_install ; done
......
......@@ -59,6 +59,12 @@ check_defines () {
;;
esac
fi
if [ "${exclude_pkgs_list}" ] ; then
exclude="--exclude ${exclude_pkgs_list}"
else
exclude=""
fi
}
report_size () {
......@@ -74,7 +80,7 @@ if [ "${apt_proxy}" ] ; then
fi
echo "Log: Running: debootstrap in [${tempdir}]"
echo "Log: [sudo debootstrap --foreign --arch ${dpkg_arch} ${release} ${tempdir} http://${apt_proxy}${deb_mirror}]"
sudo debootstrap --foreign --arch ${dpkg_arch} ${release} ${tempdir} http://${apt_proxy}${deb_mirror}
echo "Log: [sudo debootstrap ${exclude} --foreign --arch ${dpkg_arch} ${release} ${tempdir} http://${apt_proxy}${deb_mirror}]"
sudo debootstrap ${exclude} --foreign --arch ${dpkg_arch} ${release} ${tempdir} http://${apt_proxy}${deb_mirror}
report_size
#
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment