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.
"""Prints error_message in red and exits with status 3"""
132
+
print_error(error_message)
133
133
exit(3)
134
134
135
135
definstall_command(args):
136
+
"""Install a PPA or Pull Request"""
136
137
ifargs.pr!=-1:
137
138
args.repo.replace("ubports/", "")
138
139
ref=get_issue_branch(args.repo, args.pr)
@@ -147,6 +148,7 @@ def install_command(args):
147
148
apt_upgrade()
148
149
149
150
defremove_command(args):
151
+
"""Remove and uninstall a PPA"""
150
152
ifnotlist_exists(args.repo):
151
153
die("Repo {} is not installed".format(args.repo))
152
154
withWritableRootFS():
@@ -155,34 +157,36 @@ def remove_command(args):
155
157
apt_upgrade()
156
158
157
159
deflist_command(args):
160
+
"""List installed PPAs"""
158
161
print(" ".join(list_lists()))
159
162
160
163
defupdate_command(args):
164
+
"""Update all packages using apt"""
161
165
withWritableRootFS():
162
166
apt_update()
163
167
apt_upgrade()
164
168
165
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.')
166
170
subparsers=parser.add_subparsers(help='')
167
171
168
-
parser_install=subparsers.add_parser('install', help='Install a ppa or pull-request', description='Install a ppa or pull-request. See http://docs.ubports.com/en/latest/about/process/ppa.html.')
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.')
169
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.')
170
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)
171
175
parser_install.set_defaults(func=install_command)
172
176
173
-
parser_remove=subparsers.add_parser('remove', help='Remove and uninstall a PPA', description='Remove and uninstall a ppa')
177
+
parser_remove=subparsers.add_parser('remove', help=remove_command.__doc__, description='Remove and uninstall a ppa')
174
178
parser_remove.add_argument('repo', type=str, help='Name of the ppa')
0 commit comments