Merge ~bjornt/gitlptools:snap-in-container into ~ubuntuone-hackers/gitlptools:master

Proposed by Björn Tillenius on 2018-09-07
Status: Merged
Approved by: Adam Collard on 2018-09-10
Approved revision: 888ac9099a78617ae0c76254194ec0d2bdcedd27
Merged at revision: b9b96183ecf8c240cae64628010ab470ff61bae2
Proposed branch: ~bjornt/gitlptools:snap-in-container
Merge into: ~ubuntuone-hackers/gitlptools:master
Diff against target: 29 lines (+8/-1)
2 files modified
snap/snapcraft.yaml (+7/-1)
src/gitlptools/__init__.py (+1/-0)
Reviewer Review Type Date Requested Status
Ubuntu One hackers 2018-09-07 Pending
Review via email: mp+354458@code.launchpad.net

Commit message

Allow the snap to be used inside a container.

Before this, if you used it in a container, launchpadlib would
fail talking to the secret storage. When the keyring packages
are installed things seem to work, both inside and outside
containers.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
2index 04aa203..fd7405a 100644
3--- a/snap/snapcraft.yaml
4+++ b/snap/snapcraft.yaml
5@@ -25,7 +25,13 @@ parts:
6 # Python3.
7 # python3-secretstorage is needed so that the LP API credentials can
8 # be saved somewhere.
9- stage-packages: [python3-oauth, python3-secretstorage]
10+ # The keyring packages are needed so that launchpadlib has a place
11+ # to store its secrets when running inside containers.
12+ stage-packages:
13+ - python3-oauth
14+ - python3-secretstorage
15+ - python3-keyring
16+ - python3-keyrings.alt
17
18 elisp:
19 plugin: dump
20diff --git a/src/gitlptools/__init__.py b/src/gitlptools/__init__.py
21index f9c36d4..8805fa6 100644
22--- a/src/gitlptools/__init__.py
23+++ b/src/gitlptools/__init__.py
24@@ -246,6 +246,7 @@ def git_lp_propose(argv=sys.argv[1:]):
25 except BadRequest as e:
26 sys.exit("ERROR: {}".format(e.content.decode('utf-8')))
27 else:
28+ print('Created MP: {}'.format(mp.web_link))
29 webbrowser.open(mp.web_link)
30
31

Subscribers

People subscribed via source and target branches