## 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

$ lxc exec $name -- sh <<"EOF"
add-apt-repository ppa:launchpad/buildd-staging -k hkp://127.0.0.1/
echo exited with $?
EOF
 Buildd staging packages for Launchpad. New packages are staged here for 
testing on the staging PPA buildds.
 More info: https://launchpad.net/~launchpad/+archive/ubuntu/buildd-staging
gpg: keyring `/tmp/tmph5tjzyms/secring.gpg' created
gpg: keyring `/tmp/tmph5tjzyms/pubring.gpg' created
gpg: requesting key 0A5174AF from hkp server 127.0.0.1
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver unreachable
gpg: keyserver communications error: public key not found
gpg: keyserver receive failed: public key not found
?: 127.0.0.1: Connection refused
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused
Failed to add key.
exited with 1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1532855

Title:
  add-apt-repository exits with 0 even when adding key failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1532855/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to