Comment 0 for bug 1532855

Revision history for this message
MichaƂ Sawicz (saviq) wrote :

add-apt-repository exits happily even if it failed adding the key:

$ sudo env LANGUAGE=en add-apt-repository ppa:launchpad/buildd-staging -k hkp://bad-server/
 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
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp3246v7n8/secring.gpg' created
gpg: keyring `/tmp/tmp3246v7n8/pubring.gpg' created
gpg: requesting key 0A5174AF from hkp server bad-server
?: bad-server: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Success
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

$ echo $?
0

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: software-properties-common 0.96.17
ProcVersionSignature: Ubuntu 4.3.0-5.16-generic 4.3.3
Uname: Linux 4.3.0-5-generic x86_64
ApportVersion: 2.19.3-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Jan 11 17:17:56 2016
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: Upgraded to xenial on 2015-10-28 (74 days ago)