|
|
@ -204,12 +204,28 @@ add_snap ()
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_seeded_languages () {
|
|
|
|
|
|
|
|
# We assume any seed name of the form ${no_lang_seed}-${foo} where
|
|
|
|
|
|
|
|
# ${foo} is only two or three characters long is a default language
|
|
|
|
|
|
|
|
# seed.
|
|
|
|
|
|
|
|
langs=''
|
|
|
|
|
|
|
|
for no_lang_seed in "$@"; do
|
|
|
|
|
|
|
|
seed_regex="${no_lang_seed}"'-[^-.]{2,3}$'
|
|
|
|
|
|
|
|
for seed in $(ls config/germinate-output | grep -E "${seed_regex}"); do
|
|
|
|
|
|
|
|
lang=$(echo "${seed}" | grep -oE '[^-.]{2,3}$')
|
|
|
|
|
|
|
|
langs="$langs $lang"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
echo $langs | tr ' ' '\n' | sort -u | tr '\n' ' '
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
derive_language_layers () {
|
|
|
|
derive_language_layers () {
|
|
|
|
# create special layers for each default language
|
|
|
|
# create special layers for each default language
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# $1 base pass
|
|
|
|
# $1 base pass
|
|
|
|
# $2 base seed (without any languages)
|
|
|
|
# $2 base seed (without any languages)
|
|
|
|
# $3 default language seed
|
|
|
|
# $3 default language seed
|
|
|
|
|
|
|
|
# $4 space separated list of default languages
|
|
|
|
# e.g.:
|
|
|
|
# e.g.:
|
|
|
|
# derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
|
|
|
# derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
|
|
|
# derive_language_layers minimal.standard desktop desktop-default-languages
|
|
|
|
# derive_language_layers minimal.standard desktop desktop-default-languages
|
|
|
@ -243,29 +259,26 @@ derive_language_layers () {
|
|
|
|
# support for all languages from the base layer. We also create a
|
|
|
|
# support for all languages from the base layer. We also create a
|
|
|
|
# layer than has support for all languages removed, which can be used
|
|
|
|
# layer than has support for all languages removed, which can be used
|
|
|
|
# for the base of an install for a non-default language.
|
|
|
|
# for the base of an install for a non-default language.
|
|
|
|
local pass base_pass=$1 no_lang_seed=$2 def_lang_seed=$3
|
|
|
|
local pass base_pass=$1 no_lang_seed=$2 def_lang_seed=$3 langs=$4
|
|
|
|
_check_immutable_passes_to_layers
|
|
|
|
_check_immutable_passes_to_layers
|
|
|
|
_check_layers_only_API "derive_language_layers"
|
|
|
|
_check_layers_only_API "derive_language_layers"
|
|
|
|
|
|
|
|
|
|
|
|
pass=$base_pass.no-languages
|
|
|
|
for lang in $langs; do
|
|
|
|
_register_pass ${pass}
|
|
|
|
pass="${base_pass}.${lang}"
|
|
|
|
# Remove all packages from the default language seed that are not in
|
|
|
|
|
|
|
|
# the no_lang_seed from the no-languages layer.
|
|
|
|
|
|
|
|
subtract_package_lists ${def_lang_seed} ${no_lang_seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_${pass}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# We assume any seed name of the form ${no_lang_seed}-${foo} where
|
|
|
|
|
|
|
|
# ${foo} is only two or three characters long is a default language
|
|
|
|
|
|
|
|
# seed.
|
|
|
|
|
|
|
|
seed_regex="${no_lang_seed}"'-[^-.]{2,3}$'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for seed in $(ls config/germinate-output | grep -E "${seed_regex}"); do
|
|
|
|
|
|
|
|
lang=$(echo "${seed}" | grep -oE '[^-.]{2,3}$')
|
|
|
|
|
|
|
|
pass="${1}.${lang}"
|
|
|
|
|
|
|
|
_register_pass ${pass}
|
|
|
|
_register_pass ${pass}
|
|
|
|
# Remove packages from the default language seed that are not
|
|
|
|
# Remove packages from the default language seed that are not
|
|
|
|
# in the language specific seed from the language specific layer.
|
|
|
|
# in the language specific seed from the language specific layer.
|
|
|
|
subtract_package_lists ${def_lang_seed} ${seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_$pass
|
|
|
|
# I find this expression helps a little to make this make sense:
|
|
|
|
|
|
|
|
# ((base) + (en fr de)) - ( (en fr de) - (fr)) == (base + fr)
|
|
|
|
|
|
|
|
# `layer will all langs' `def_lang_seed' `lang' `what we want to install'
|
|
|
|
|
|
|
|
subtract_package_lists ${def_lang_seed} ${no_lang_seed}-${lang} >> config/package-lists/livecd-rootfs.removal-list.chroot_$pass
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
no_lang_pass=$base_pass.no-languages
|
|
|
|
|
|
|
|
_register_pass ${no_lang_pass}
|
|
|
|
|
|
|
|
# Remove all packages from the default language seed that are not in
|
|
|
|
|
|
|
|
# the no_lang_seed from the no-languages layer.
|
|
|
|
|
|
|
|
subtract_package_lists ${def_lang_seed} ${no_lang_seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_${no_lang_pass}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
add_chroot_hook ()
|
|
|
|
add_chroot_hook ()
|
|
|
@ -650,8 +663,10 @@ case $PROJECT in
|
|
|
|
remove_package minimal.standard.live ubiquity-frontend-gtk
|
|
|
|
remove_package minimal.standard.live ubiquity-frontend-gtk
|
|
|
|
add_snap minimal.standard.live ubuntu-desktop-installer/classic
|
|
|
|
add_snap minimal.standard.live ubuntu-desktop-installer/classic
|
|
|
|
|
|
|
|
|
|
|
|
derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
|
|
|
seeded_langs="$(get_seeded_languages desktop-minimal desktop)"
|
|
|
|
derive_language_layers minimal.standard desktop desktop-default-languages
|
|
|
|
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
|
|
|
|
|
|
|
derive_language_layers minimal desktop-minimal desktop-minimal-default-languages "$seeded_langs"
|
|
|
|
|
|
|
|
derive_language_layers minimal.standard desktop desktop-default-languages "$seeded_langs"
|
|
|
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
|
|
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
|
|
|
name: "Ubuntu Desktop (minimized)"
|
|
|
|
name: "Ubuntu Desktop (minimized)"
|
|
|
|
description: >-
|
|
|
|
description: >-
|
|
|
@ -659,6 +674,7 @@ case $PROJECT in
|
|
|
|
id: ubuntu-desktop-minimal
|
|
|
|
id: ubuntu-desktop-minimal
|
|
|
|
type: fsimage
|
|
|
|
type: fsimage
|
|
|
|
variant: desktop
|
|
|
|
variant: desktop
|
|
|
|
|
|
|
|
locale_support: langpack
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
|
|
|
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
|
|
|
name: "Ubuntu Desktop"
|
|
|
|
name: "Ubuntu Desktop"
|
|
|
@ -667,6 +683,7 @@ case $PROJECT in
|
|
|
|
id: ubuntu-desktop
|
|
|
|
id: ubuntu-desktop
|
|
|
|
type: fsimage
|
|
|
|
type: fsimage
|
|
|
|
variant: desktop
|
|
|
|
variant: desktop
|
|
|
|
|
|
|
|
locale_support: langpack
|
|
|
|
default: yes
|
|
|
|
default: yes
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
/usr/share/livecd-rootfs/checkout-translations-branch \
|
|
|
|
/usr/share/livecd-rootfs/checkout-translations-branch \
|
|
|
|