Require full PPA name with namespace to destroy it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ppa-dev-tools |
Fix Released
|
Undecided
|
Bryce Harrington |
Bug Description
Checking the --help command, it says:
Register a new PPA:
$ ppa create my-ppa
[...]
Delete the PPA:
$ ppa destroy my-ppa
To create a new PPA the namespace is not needed and the web page to authorize the tool to have access to your user account is launched, and everything works well. In order to delete it we need to pass the full PPA name and not just the "short name" of the PPA:
$ ppa create test
The authorization page:
(https:/
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
PPA 'test' created for the following architectures:
i386, amd64, armhf, ppc64el, s390x, arm64, powerpc
The PPA can be viewed at:
https:/
You can upload packages to this PPA using:
dput ppa:lucaskanash
$ ppa destroy test
Traceback (most recent call last):
File "/snap/
retval = main(args)
File "/snap/
return func(lp, config)
File "/snap/
ppa = get_ppa(lp, config)
File "/snap/
return Ppa(
File "/snap/
raise ValueError(
ValueError: undefined team_name.
$ ppa destroy ppa:lucaskanash
$ echo $?
0
I'd update the instruction in the --help command with the following:
Delete the PPA:
$ ppa destroy ppa:my-name/my-ppa
Related branches
- Lena Voytek (community): Approve
- Canonical Server: Pending requested
- Canonical Server Reporter: Pending requested
-
Diff: 958 lines (+331/-225)15 files modifiedREADME.md (+2/-2)
ppa/ppa.py (+85/-37)
ppa/ppa_group.py (+21/-14)
scripts/ppa (+27/-37)
tests/helpers.py (+90/-0)
tests/test_io.py (+5/-2)
tests/test_job.py (+6/-15)
tests/test_lp.py (+2/-1)
tests/test_ppa.py (+48/-5)
tests/test_ppa_group.py (+29/-87)
tests/test_result.py (+1/-1)
tests/test_scripts_ppa.py (+1/-13)
tests/test_subtest.py (+1/-1)
tests/test_trigger.py (+1/-1)
tests/test_version.py (+12/-9)
Changed in ppa-dev-tools: | |
assignee: | nobody → Bryce Harrington (bryce) |
status: | New → Fix Committed |
status: | Fix Committed → In Progress |
Changed in ppa-dev-tools: | |
status: | In Progress → Fix Committed |
I've posted an MP with a branch containing a fix for this bug.
With this update, `ppa destroy my-ppa` will work, since it knows your lp-username and will assume that.
However, I've also taken your advice to make the README use the formal ppa addresses. Even though either way will work now, the formal ppa address is the more general solution and I expect is the approach most people will prefer to use.