diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-19 20:53:43 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-19 20:53:43 +0200 |
| commit | b8400f38411818aa54a773dffb2c3a0c56b06dba (patch) | |
| tree | e6390c860efb005e424b91594c6c619c120d9b75 /sb_builder/remote.py | |
| parent | d29fc1cd128b7d6a18e3e50d8ff4d6262f7e88ae (diff) | |
| download | sb-builder-b8400f38411818aa54a773dffb2c3a0c56b06dba.tar.gz sb-builder-b8400f38411818aa54a773dffb2c3a0c56b06dba.zip | |
Add Packages tab, hint view, Run it and signing key unlock
Packages tab over the helper inventory: query bar with cat:/maint:/
req:/status: prefixes, overlay and status chips, check column, and a
detail pane with versions, dependencies after hints and a structured
read-only view of the hint (hints.py mirrors slackrepo's parser).
Actions start slackrepo previews; the Jobs tab offers Run it with a
publish box (default from [builds] publish), asking for the signing
key passphrase first when the key is locked. Status bar shows the key
state; Dashboard tiles open their tabs; inventory reloads after
slackrepo and publish jobs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'sb_builder/remote.py')
| -rw-r--r-- | sb_builder/remote.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sb_builder/remote.py b/sb_builder/remote.py index 5340f6c..f87ef66 100644 --- a/sb_builder/remote.py +++ b/sb_builder/remote.py @@ -55,9 +55,10 @@ class Remote(QObject): "-o", "ControlPersist=10m", "-o", "BatchMode=yes", "-o", "ConnectTimeout=5", *r["ssh_options"], r["target"], "sbb-remote", *map(shlex.quote, args)] - def call(self, cb, *args): - """Run sbb-remote <args>, then cb(data, error).""" - self._run("ssh", self.ssh_args(*args), lambda rc, out, err: cb(*parse(rc, out, err))) + def call(self, cb, *args, stdin=None): + """Run sbb-remote <args>, then cb(data, error). stdin: bytes for the helper.""" + self._run("ssh", self.ssh_args(*args), lambda rc, out, err: cb(*parse(rc, out, err)), + stdin) def virsh(self, cb, *args): """Run local virsh against the configured libvirt URI, then cb(rc, text).""" @@ -71,7 +72,7 @@ class Remote(QObject): p.start("ssh", self.ssh_args("job-follow", jid, str(offset))) return p - def _run(self, prog, argv, cb): + def _run(self, prog, argv, cb, stdin=None): p = QProcess(self) def done(rc, _status=None): @@ -82,3 +83,6 @@ class Remote(QObject): p.errorOccurred.connect( lambda e: e == QProcess.ProcessError.FailedToStart and done(-1)) p.start(prog, argv) + if stdin is not None: + p.write(stdin) + p.closeWriteChannel() |
