Comment 4 for bug 1670385

Revision history for this message
Scott Moser (smoser) wrote :

## set up a container with software-properties installed from -proposed
$ rel=xenial
$ name=xenial-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.20.6

$ 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 ==
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  ubuntu-cloud-keyring
0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
Need to get 5086 B of archives.
After this operation, 34.8 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 ubuntu-cloud-keyring all 2012.08.14 [5086 B]
Fetched 5086 B in 0s (15.1 kB/s)
Selecting previously unselected package ubuntu-cloud-keyring.
(Reading database ... 25470 files and directories currently installed.)
Preparing to unpack .../ubuntu-cloud-keyring_2012.08.14_all.deb ...
Unpacking ubuntu-cloud-keyring (2012.08.14) ...
Setting up ubuntu-cloud-keyring (2012.08.14) ...
Importing ubuntu-cloud.archive.canonical.com keyring
OK
Processing ubuntu-cloud.archive.canonical.com removal keyring
gpg: /etc/apt/trustdb.gpg: trustdb created
OK
== pike ==
Reading package lists...
Building dependency tree...
Reading state information...
ubuntu-cloud-keyring is already the newest version (2012.08.14).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
== queens-proposed ==
Reading package lists...
Building dependency tree...
Reading state information...
ubuntu-cloud-keyring is already the newest version (2012.08.14).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
== pike-proposed ==
Reading package lists...
Building dependency tree...
Reading state information...
ubuntu-cloud-keyring is already the newest version (2012.08.14).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.

$ lxc exec $name -- find /etc/apt/sources.list.d
/etc/apt/sources.list.d
/etc/apt/sources.list.d/launchpad-ubuntu-buildd-staging-xenial.list.save
/etc/apt/sources.list.d/launchpad-ubuntu-buildd-staging-xenial.list
/etc/apt/sources.list.d/cloudarchive-pike.list
/etc/apt/sources.list.d/cloudarchive-queens.list.save
/etc/apt/sources.list.d/cloudarchive-pike.list.save
/etc/apt/sources.list.d/proposed.list
/etc/apt/sources.list.d/proposed.list.save
/etc/apt/sources.list.d/cloudarchive-queens-proposed.list.save
/etc/apt/sources.list.d/cloudarchive-queens.list
/etc/apt/sources.list.d/cloudarchive-pike-proposed.list
/etc/apt/sources.list.d/cloudarchive-queens-proposed.list