Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

Commit 2710c04

Browse files
authored
attempt to upgrade only the related package
1 parent 8f97116 commit 2710c04

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ubports-qa

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ def apt_upgrade():
9191
except subprocess.CalledProcessError:
9292
LOG.error("Failed to run 'apt full-upgrade'. See the output above for details.")
9393

94+
def apt_install(package)
95+
LOG.debug("upgrading package")
96+
try:
97+
subprocess.run(["apt", "install", package], check=True)
98+
except subprocess.CalledProcessError:
99+
LOG.error("Failed to install Package")
100+
94101

95102
def get_list_file(branch):
96103
list_file = "/etc/apt/sources.list.d/ubports-{}.list".format(branch)
@@ -220,7 +227,7 @@ def install_command(args):
220227
add_list(repository_name)
221228
add_pref(repository_name)
222229
apt_update()
223-
apt_upgrade()
230+
apt_install(args.repo)
224231

225232
LOG.info(
226233
"You can remove this repository by running 'sudo ubports-qa remove {}'".format(

0 commit comments

Comments
 (0)