Skip to content

Commit

Permalink
fix: slackware
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed May 12, 2024
1 parent b032ccf commit b6b102c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pep600_compliance/images/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ def _update(self, container):
["touch", "/var/lib/slackpkg/current"]
)
assert exit_code == 0, output.decode("utf-8")
exit_code, output = container.exec_run(
["sed", "-i", "s/CHECKGPG=on/CHECKGPG=off/g", "/etc/slackpkg/slackpkg.conf"]
)
assert exit_code == 0, output.decode("utf-8")
super()._update(container)

def _upgrade(self, container):
Expand All @@ -175,13 +179,10 @@ def _upgrade(self, container):
["slackpkg", "-default_answer=yes", "-batch=on", "install-new"]
)
assert exit_code == 0, output.decode("utf-8")
exit_code, output = container.exec_run(
["slackpkg", "-default_answer=yes", "-batch=on", "upgrade-all"]
)
assert exit_code in {0, 20, 50}, output.decode("utf-8")
if exit_code == 50:
exit_code = 50
while exit_code == 50:
# Slackpkg itself was upgraded and you need to re-run it.
exit_code, output = container.exec_run(
["slackpkg", "-default_answer=yes", "-batch=on", "upgrade-all"]
)
assert exit_code == {0, 20}, output.decode("utf-8")
assert exit_code in {0, 20, 50}, f"exit_code: {exit_code}\n" + output.decode("utf-8")

0 comments on commit b6b102c

Please sign in to comment.