You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,3 +34,8 @@ optional arguments:
34
34
|`sudo ubports-qa remove xenial_-_somebranch`| Remove the `xenial_-_somebranch` ppa and upgrade all packages |
35
35
|`ubports-qa list`| List all installed testing-PPAs |
36
36
|`sudo ubports-qa update`| Upgrade all packages |
37
+
38
+
39
+
### Contributing
40
+
41
+
When modifying the ubports-qa script, run [black](https://github.com/ambv/black) before you commit. This helps to reduce the diffs between commits and keeps formatting simple.
"""Prints error_message in red and exits with status 3"""
132
152
print_error(error_message)
133
153
exit(3)
134
154
155
+
135
156
definstall_command(args):
136
157
"""Install a PPA or Pull Request"""
137
158
ifargs.pr!=-1:
@@ -147,6 +168,7 @@ def install_command(args):
147
168
apt_update()
148
169
apt_upgrade()
149
170
171
+
150
172
defremove_command(args):
151
173
"""Remove and uninstall a PPA"""
152
174
ifnotlist_exists(args.repo):
@@ -156,32 +178,57 @@ def remove_command(args):
156
178
apt_update()
157
179
apt_upgrade()
158
180
181
+
159
182
deflist_command(args):
160
183
"""List installed PPAs"""
161
184
print(" ".join(list_lists()))
162
185
186
+
163
187
defupdate_command(args):
164
188
"""Update all packages using apt"""
165
189
withWritableRootFS():
166
190
apt_update()
167
191
apt_upgrade()
168
192
169
-
parser=argparse.ArgumentParser(description='The UBports QA scripts allow you to efficiently manage PPAs from repo.ubports.com for testing deb components. See http://docs.ubports.com/en/latest/about/process/ppa.html.')
170
-
subparsers=parser.add_subparsers(help='')
171
193
172
-
parser_install=subparsers.add_parser('install', help=install_command.__doc__, description='Install a ppa or pull-request. See http://docs.ubports.com/en/latest/about/process/ppa.html.')
173
-
parser_install.add_argument('repo', type=str, help='Name of a PPA on repo.ubports.com. Alternatively, if the \'pr\' argument is provided, the name of a git repository can be specified to automatically add the PPA from a pull-request.')
174
-
parser_install.add_argument('pr', type=int, help='Numeric ID of a pull-request on the git repository specified in the \'repo\' argument. If \'repo\' is supposed to be the name of a ppa, the \'pr\' argument should not be specified.', nargs='?', default=-1)
194
+
parser=argparse.ArgumentParser(
195
+
description="The UBports QA scripts allow you to efficiently manage PPAs from repo.ubports.com for testing deb components. See http://docs.ubports.com/en/latest/about/process/ppa.html."
196
+
)
197
+
subparsers=parser.add_subparsers(help="")
198
+
199
+
parser_install=subparsers.add_parser(
200
+
"install",
201
+
help=install_command.__doc__,
202
+
description="Install a ppa or pull-request. See http://docs.ubports.com/en/latest/about/process/ppa.html.",
203
+
)
204
+
parser_install.add_argument(
205
+
"repo",
206
+
type=str,
207
+
help="Name of a PPA on repo.ubports.com. Alternatively, if the 'pr' argument is provided, the name of a git repository can be specified to automatically add the PPA from a pull-request.",
208
+
)
209
+
parser_install.add_argument(
210
+
"pr",
211
+
type=int,
212
+
help="Numeric ID of a pull-request on the git repository specified in the 'repo' argument. If 'repo' is supposed to be the name of a ppa, the 'pr' argument should not be specified.",
213
+
nargs="?",
214
+
default=-1,
215
+
)
175
216
parser_install.set_defaults(func=install_command)
176
217
177
-
parser_remove=subparsers.add_parser('remove', help=remove_command.__doc__, description='Remove and uninstall a ppa')
178
-
parser_remove.add_argument('repo', type=str, help='Name of the ppa')
218
+
parser_remove=subparsers.add_parser(
219
+
"remove", help=remove_command.__doc__, description="Remove and uninstall a ppa"
220
+
)
221
+
parser_remove.add_argument("repo", type=str, help="Name of the ppa")
0 commit comments