Merge ppa-dev-tools:set-command-dependencies into ppa-dev-tools:main

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: 731e1db3e6065a5951108673437b588e689e14e8
Proposed branch: ppa-dev-tools:set-command-dependencies
Merge into: ppa-dev-tools:main
Diff against target: 472 lines (+197/-32)
5 files modified
ppa/lp.py (+10/-2)
ppa/ppa.py (+122/-4)
scripts/ppa (+36/-18)
tests/helpers.py (+5/-0)
tests/test_scripts_ppa.py (+24/-8)
Reviewer Review Type Date Requested Status
Lena Voytek (community) Approve
Canonical Server packageset reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+441265@code.staging.launchpad.net

Description of the change

This adds support for the --ppa-dependencies option to the create and set commands, to permit adding one or more PPAs for satisfying the given PPA's build dependencies.

I've also added the start of a handy smoketest for the ppa/ppa.py module to run through the basic settings. I plan to expand this to exercise more of the module but for now just tried to establish the basic structure and operation. I've sorted out making it use the 'qastaging' test instance of Launchpad to be able to validate the launchpad operations without actually impacting anything in production. Note that the data from qastaging is quite old and in fact may be missing your user account if you registered within the last few years, so I hope it works but YMMV. If not, you can flip staging off by editing the smoketest thusly:

    lp = Lp('smoketest', staging=False)

There's also a few small cleanup/refactors in separate commits.

Anyway, as usual the smoketest can be run via:

    $ python3 -m ppa.ppa

And all testing run via `pytest-3` or:

    $ make check

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

Example output for the smoke test:

$ python3 -m ppa.ppa
##########################
## Ppa class smoke test ##
##########################

setting desc to 'This is a testing PPA and can be deleted'
desc is now 'This is a testing PPA and can be deleted'

name: test-ppa-dxtefi
address: ppa:bryce/test-ppa-dxtefi
str(ppa): bryce/test-ppa-dxtefi
reference: ~bryce/ubuntu/test-ppa-dxtefi
self_link: https://api.qastaging.launchpad.net/devel/~bryce/+archive/ubuntu/test-ppa-dxtefi
web_link: https://qastaging.launchpad.net/~bryce/+archive/ubuntu/test-ppa-dxtefi
description: This is a testing PPA and can be deleted
has_packages: False
architectures: amd64/arm64
dependencies: ~bryce/ubuntu/dependency-ppa-dxtefi
url: https://qastaging.launchpad.net/~bryce/+archive/ubuntu/test-ppa-dxtefi

Ready to cleanup (i.e. delete) temporary PPAs? (y/n) y
...Cleaning up test ppa...

Revision history for this message
Lena Voytek (lvoytek) wrote :

Sorry for only getting to this today, got distracted on Friday. Code looks good to me! Added a few comments for cleanup

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the review! One comment below, the rest of the suggestions are incorporated, I'll squash and land the branch directly.

Revision history for this message
Bryce Harrington (bryce) wrote :

Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To git+ssh://git.launchpad.net/ppa-dev-tools
   2e6b5d7..d71ef8d main -> main

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: