Merge lp:~julian-edwards/launchpad/delete-ppa-part2 into lp:launchpad/db-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Julian Edwards | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~julian-edwards/launchpad/delete-ppa-part2 | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
264 lines (+44/-51) 2 files modified
lib/lp/archivepublisher/publishing.py (+11/-20) lib/lp/archivepublisher/tests/test_publisher.py (+33/-31) |
||||
To merge this branch: | bzr merge lp:~julian-edwards/launchpad/delete-ppa-part2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+23967@code.launchpad.net |
Description of the change
This is a quick branch bloated a bit by all the lint I fixed. It is a fix to
delete the right directory when deleting PPAs.
Consider this tree structure:
PPA_ROOT/
<ppa_owner_name>/
ppa1_name/
file1
file2
ppa2_name/
If we want to delete "ppa1_name" What happens right now is that only the files
*under* the ppa1_name directory are removed.
I've fixed it so that the "ppa1_name" directory itself gets removed.
The test_publisher.py file had lots of lint, please excuse the noise. The
meat of the change is in the deleteArchive() method which no longer raises
OOPSes (it's pointless and was not tested) if it can't delete the archive.
This is a valid scenario since an admin may have done it manually if the
deletion was time-critical. It just logs the error and continues.
In the test, I also added an extra assertion that the archive gets disabled
(was missing from before), and an extra deletion step to prove that deleting a
missing repo doesn't blow up.
Cheers