Skip to content
Snippets Groups Projects
Commit 5bba76f1 authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

Move the last remaining bit of uck into a seperate function

parent 9b31358e
Branches
Tags
No related merge requests found
...@@ -58,15 +58,32 @@ function install_packages_from_file() ...@@ -58,15 +58,32 @@ function install_packages_from_file()
aptitude install -y $APT_OPTIONS $PKGS aptitude install -y $APT_OPTIONS $PKGS
} }
function install_lang_packages()
{
#the content of this function is extracted from UCK
MISSING_LANG_PKG="$(check-language-support -l de_DE)"
MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US
if [ -n "$MISSING_LANG_PKG" ]; then
aptitude install $MISSING_LANG_PKG -y
fi
EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages
if [ -n "$EXTRA_LANG_PKG" ]; then
aptitude purge $EXTRA_LANG_PKG -y
fi
}
function install_packages() function install_packages()
{ {
apt-get dist-upgrade --assume-yes --force-yes apt-get dist-upgrade --assume-yes --force-yes
apt-get install aptitude -y apt-get install aptitude -y
#aptitude full-upgrade -y # make sure we have the newest versions #aptitude full-upgrade -y # make sure we have the newest versions
# Some daily images do not have a kernel ?!?
#uncomment this if you remaster a daily build (fix kernel version!) #Some daily images do not have a kernel;
#ensure that a valid kernel is installed
KERNEL_PKG=linux-signed-generic-lts-trusty KERNEL_PKG=linux-signed-generic-lts-trusty
[ "$(uname -m)" == "x86_64" ] || KERNEL_PKG=linux-image-generic-lts-trusty [ "$(uname -m)" == "x86_64" ] || KERNEL_PKG=linux-image-generic-lts-trusty
aptitude reinstall $KERNEL_PKG -y aptitude reinstall $KERNEL_PKG -y
...@@ -75,18 +92,7 @@ function install_packages() ...@@ -75,18 +92,7 @@ function install_packages()
install_packages_from_file "$CONTRIB_DIR/pre_installed_packages" "" install_packages_from_file "$CONTRIB_DIR/pre_installed_packages" ""
install_packages_from_file "$CONTRIB_DIR/pre_installed_packages.without-recommends" "--without-recommends" install_packages_from_file "$CONTRIB_DIR/pre_installed_packages.without-recommends" "--without-recommends"
MISSING_LANG_PKG="$(check-language-support -l de_DE)" install_lang_packages
MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US
if [ -n "$MISSING_LANG_PKG" ]; then
aptitude install $MISSING_LANG_PKG -y
fi
EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages
if [ -n "$EXTRA_LANG_PKG" ]; then
aptitude purge $EXTRA_LANG_PKG -y
fi
install_debs "$CONTRIB_DIR/debs/" install_debs "$CONTRIB_DIR/debs/"
} }
...@@ -96,7 +102,7 @@ function finalize() ...@@ -96,7 +102,7 @@ function finalize()
echo -n "Europe/Berlin" > /etc/timezone echo -n "Europe/Berlin" > /etc/timezone
rm -rf /var/crash/* rm -rf /var/crash/*
#TODO: verify
if [ -z "$LIPCK_HAS_APT_CACHE" ] if [ -z "$LIPCK_HAS_APT_CACHE" ]
then then
rm -rf /var/cache/apt/* rm -rf /var/cache/apt/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment