diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-19 21:36:15 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-19 21:36:15 +0200 |
| commit | fc02ae2b562a3c608b41302d84d69b29415b927c (patch) | |
| tree | 9fe27aad03c05eea293352dbffa4a77b8a784efa /sb_builder | |
| parent | 993950b7733ba9300915955ec6e51e1f21dad806 (diff) | |
| download | sb-builder-fc02ae2b562a3c608b41302d84d69b29415b927c.tar.gz sb-builder-fc02ae2b562a3c608b41302d84d69b29415b927c.zip | |
build-log: show the last attempt's log, not always build.log
slackrepo writes one log per command (build, rebuild, update,
remove). A failed update left build.log from an older successful
build, so the viewer showed a success next to a failed result. The
helper (0.4.1) now returns the newest command log and its name, which
the viewer shows in the title and header.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'sb_builder')
| -rw-r--r-- | sb_builder/__init__.py | 2 | ||||
| -rw-r--r-- | sb_builder/results.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sb_builder/__init__.py b/sb_builder/__init__.py index 539b874..e0f577e 100644 --- a/sb_builder/__init__.py +++ b/sb_builder/__init__.py @@ -16,4 +16,4 @@ """sb-builder: Qt6 GUI driving the SlackBuild tooling on a build VM.""" -VERSION = "0.4.0" # must match remote/sbb-remote VERSION +VERSION = "0.4.1" # must match remote/sbb-remote VERSION diff --git a/sb_builder/results.py b/sb_builder/results.py index 30a3adc..1fc6b9a 100644 --- a/sb_builder/results.py +++ b/sb_builder/results.py @@ -44,16 +44,17 @@ class LogViewer(QDialog): def __init__(self, path, log, parent=None): super().__init__(parent) - self.setWindowTitle(f"{path}: build log") + name = log.get("name", "build.log") + self.setWindowTitle(f"{path}: {name}") self.resize(1000, 700) self.text = QPlainTextEdit(readOnly=True) self.text.setFont(QFontDatabase.systemFont(QFontDatabase.SystemFont.FixedFont)) parts = [] # resource.log first: the end of build.log, where it failed, stays last if log["resource"]: parts.append("──── resource.log ────\n" + ANSI.sub("", log["resource"]) + "\n") - parts.append("──── build.log ────\n") + parts.append(f"──── {name} ────\n") if log["truncated"]: - parts.append("[... start of build.log truncated, showing its end ...]\n") + parts.append(f"[... start of {name} truncated, showing its end ...]\n") parts.append(ANSI.sub("", log["build"])) self.text.setPlainText("".join(parts)) self.text.moveCursor(QTextCursor.MoveOperation.End) |
