Comment 5 for bug 1670385

Scott Moser (smoser) wrote :

## set up a container with software-properties installed from -proposed
$ rel=yakkety
$ name=yakkety-1
$ lxc launch ubuntu-daily:$rel $name
$ lxc exec $name -- sh -c 'while ! [ -e /run/cloud-init/result.json ]; do echo .; sleep 1; done' </dev/null
$ lxc exec $name -- sh -e <<"EOF"
rel=$(lsb_release -sc)
line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
  printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
  ' "rel=$rel" /etc/apt/sources.list)
echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
apt-get update -qq
apt-get install -qy software-properties-common </dev/null
EOF

$ lxc exec $name -- dpkg-query --show software-properties-common </dev/null
software-properties-common 0.96.24.7.1

$ for n in queens pike queens-proposed pike-proposed; do
   lxc exec $name -- sh <<EOF
echo == $n ==
add-apt-repository -y cloud-archive:$n
EOF
done
== queens ==
cloud-archive for Queens only supported on xenial
== pike ==
cloud-archive for Pike only supported on xenial
== queens-proposed ==
cloud-archive for Queens-proposed only supported on xenial
== pike-proposed ==
cloud-archive for Pike-proposed only supported on xenial

$ lxc exec $name -- find /etc/apt/sources.list.d
/etc/apt/sources.list.d
/etc/apt/sources.list.d/proposed.list.save
/etc/apt/sources.list.d/proposed.list
/etc/apt/sources.list.d/launchpad-ubuntu-buildd-staging-yakkety.list