Comment 15 for bug 1999567

Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote (last edit ):

I have tested this change by using this script here:

---------------------------
#!/bin/bash
set -e

series=$1
token=$2
name=$series-dev

cleanup () {
  lxc delete $name --force
}

on_err () {
  echo -e "Test Failed"
  cleanup
  exit 1
}

trap on_err ERR

lxc launch ubuntu-daily:$series $name
sleep 10

# Update update-notifier package
lxc exec $name -- sh -c "echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list"
lxc exec $name -- sudo apt-get update > /dev/null
lxc exec $name -- sudo apt-get install update-notifier-common -y > /dev/null
lxc exec $name -- apt-cache policy update-notifier-common

# Change locales to german
lxc exec $name -- sh -c "DEBIAN_FRONTEND=noninteractive sudo apt-get install language-pack-de -y > /dev/null"
lxc exec $name -- sudo update-locale LANG=de_DE.UTF-8
lxc exec $name -- sudo reboot
sleep 5
lxc config set $name environment.LC_ALL=de_DE.UTF-8

# Running update-motd for machine without an ua subscription
echo -e "\n* Updated update-notifier message"
echo "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"
#
# Attaching machine to a UA subscription
echo "Attaching to a UA subscription"
lxc exec $name -- ua attach $token > /dev/null
lxc exec $name -- ua status

# Running update-motd for attached machine
echo -e "\n* Updated update-notifier message with system attached to UA"
echo -e "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"

# Installing all esm-infra packages
lxc exec $name -- sudo apt-get upgrade -y > /dev/null

# Disabling esm-infra
lxc exec $name -- sudo pro disable esm-infra > /dev/null

echo "* Updated update-notifier message with esm-infra disabled"
echo "###########################################"
lxc exec $name -- /usr/lib/update-notifier/apt-check --human-readable
echo -e "###########################################\n"

cleanup
-----------------------------

And I was able to observe that the translations are properly working.
PS: For kinetic, we don't have esm-infra available, so I have adapted the script for that release to skip that step