add-apt-repository exits with 0 even when adding key failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
add-apt-repository exits happily even if it failed adding the key:
$ sudo env LANGUAGE=en add-apt-repository ppa:launchpad/
Buildd staging packages for Launchpad. New packages are staged here for testing on the staging PPA buildds.
More info: https:/
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmp3246v7
gpg: keyring `/tmp/tmp3246v7
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-
ProcVersionSign
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
PackageArchitec
SourcePackage: software-properties
UpgradeStatus: Upgraded to xenial on 2015-10-28 (74 days ago)
Related bugs:
* bug 1671566 when gpg key add fails, entry is still added to sources.list
Related branches
- Dimitri John Ledkov: Approve (with prejudice)
-
Diff: 72 lines (+32/-4)1 file modifiedsoftwareproperties/SoftwareProperties.py (+32/-4)
- No reviews requested
Changed in software-properties (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in software-properties (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in software-properties (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in software-properties (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in software-properties (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
This failure breaks automated installation and such, even when re-trying because the caller that might retry does not know that this failed.
Our curtin vmtest hit this at https:/ /jenkins. ubuntu. com/server/ view/Curtin/ job/curtin- vmtest- devel-amd64/ 781/consoleFull .