Skip to content

Commit 6e1b368

Browse files
author
Dimitri Savineau
committed
base.install: Fix apt components
* Add components parameter in debootstrap for debian/ubuntu. * Add basic components in all sources (release, updates and security): - Debian : main contrib non-free - Ubuntu : main universe multiverse * Merge all these informations in /etc/apt/sources.list instead of split them in /etc/apt/sources.list.d/ Signed-off-by: Dimitri Savineau <dimitri.savineau@enovance.com>
1 parent 2ff643c commit 6e1b368

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

build/base.install

+11-5
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,15 @@ bootstrap() {
122122
# Use debootstrap for debian based distribution
123123
if [ "$(package_type)" = "deb" ]; then
124124
check_binary debootstrap
125-
debootstrap --arch ${ARCH:=amd64} --variant=minbase $dist "$target" $repository
125+
case "$dist" in
126+
$supported_debian_dists)
127+
components="main,contrib,non-free"
128+
;;
129+
$supported_ubuntu_dists)
130+
components="main,universe,multiverse"
131+
;;
132+
esac
133+
debootstrap --arch ${ARCH:=amd64} --components $components --variant=minbase $dist "$target" $repository
126134
# workaround no signature downloaded
127135
rm -f "$target"/var/lib/apt/lists/*[es]
128136
if [ -n "${HTTP_PROXY}" ]; then
@@ -188,15 +196,13 @@ install_base_packages() {
188196
case $dist in
189197
$supported_ubuntu_dists)
190198
packages="$cross_distro_packages grub2 iputils-ping linux-firmware linux-firmware-nonfree linux-headers-generic-lts-trusty linux-image-generic-lts-trusty $deb_packages linux-crashdump"
191-
echo "deb $repository $dist main universe multiverse" > ${target}/etc/apt/sources.list
192199
echo "deb $repository $dist-updates main universe multiverse" >> ${target}/etc/apt/sources.list
193200
echo "deb http://security.ubuntu.com/ubuntu $dist-security main universe multiverse" >> ${target}/etc/apt/sources.list
194201
;;
195202
$supported_debian_dists)
196203
packages="$cross_distro_packages acpi-support-base firmware-linux firmware-netxen firmware-qlogic firmware-realtek firmware-bnx2 firmware-bnx2x htop inetutils-ping libui-dialog-perl linux-image-amd64 $deb_packages"
197-
echo "deb $repository $dist non-free" > ${target}/etc/apt/sources.list.d/nonfree.list
198-
echo "deb http://security.debian.org/ $dist/updates main" > ${target}/etc/apt/sources.list.d/updates.list
199-
echo "deb $repository $dist-updates main" >> ${target}/etc/apt/sources.list.d/updates.list
204+
echo "deb $repository $dist-updates main contrib non-free" >> ${target}/etc/apt/sources.list
205+
echo "deb http://security.debian.org/ $dist/updates main contrib non-free" >> ${target}/etc/apt/sources.list
200206
;;
201207
$supported_centos_dists|$supported_redhat_dists)
202208
if [ "$CODENAME_MAJOR" = '6' ]; then

0 commit comments

Comments
 (0)