diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-21 11:36:01 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-21 11:36:01 +0200 |
| commit | 766ce6ff1ea584dfe980a5e0b29251768c4c0726 (patch) | |
| tree | eaa047f46fc9b59acae745406a116d2e479239ca /sb_builder/packages.py | |
| parent | fb93767351dc0d7d4d4da8068b2f94df6ef44b6d (diff) | |
| download | sb-builder-766ce6ff1ea584dfe980a5e0b29251768c4c0726.tar.gz sb-builder-766ce6ff1ea584dfe980a5e0b29251768c4c0726.zip | |
sbb-remote 0.12.0: named builds, per-package job results, prune
- Packages: named packages run slackrepo build, which also updates outdated
ones; update on a named item finds only already-built packages. The
per-row Update action is gone, Update all stays.
- A real slackrepo job reads its items' buildresults rows into the job's
results and is failed when any item failed, aborted or was bad:
slackrepo itself exits 0. The notification names the failed items; a
Build results dialog lists every item with its log and Retry failed,
reopenable from the Jobs ribbon.
- slackrepo prune: the helper lists built items whose SlackBuild is gone
and runs slackrepo remove on them, without an Update all. stats gives
the count; Packages gets a Prune action, the Built tile a 'to prune'
note. Remove and prune ask for confirmation at Run it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'sb_builder/packages.py')
| -rw-r--r-- | sb_builder/packages.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sb_builder/packages.py b/sb_builder/packages.py index dbbbd30..c057c35 100644 --- a/sb_builder/packages.py +++ b/sb_builder/packages.py @@ -320,12 +320,14 @@ class PackagesTab(QWidget): self.act_build = { a: action(self, a.capitalize(), icon, fb, lambda a=a: self.act(a)) for a, icon, fb in (("build", "run-build", SP.SP_MediaPlay), - ("update", "system-software-update", SP.SP_BrowserReload), ("rebuild", "view-refresh", SP.SP_BrowserReload), ("remove", "edit-delete", SP.SP_TrashIcon))} + self.act_prune = action(self, "Prune", "edit-clear", SP.SP_TrashIcon, self.prune) + self.set_prunable(None) self.act_new_hint = action(self, "New hint", "document-new", SP.SP_FileIcon, self.new_hint) self.actions = [*self.act_build.values(), action(self, "Update all", "system-upgrade", SP.SP_ArrowUp, self.update_all), + self.act_prune, self.act_new_hint, action(self, "Publish", "document-send", SP.SP_DialogSaveButton, self.publish)] self.view_actions = [ @@ -418,6 +420,13 @@ class PackagesTab(QWidget): def update_all(self): self.start_requested.emit(["slackrepo", "update", "--preview"]) + def set_prunable(self, n): + """How many built packages lost their SlackBuild (stats), None if unknown.""" + enable(self.act_prune, None if n else "no built package lost its SlackBuild") + + def prune(self): + self.start_requested.emit(["slackrepo", "prune", "--preview"]) + def publish(self): if QMessageBox.question(self, "Publish", "Push the package repository to the mirror now?") \ == QMessageBox.StandardButton.Yes: |
