Skip to content
Snippets Groups Projects
Verified Commit 10252b28 authored by David Runge's avatar David Runge :chipmunk:
Browse files

fix(libkeyringctl): Adapt to CLI churn in sequoia-sq 0.34.0


The `sq keyring` command has been moved to `sq toolbox keyring`.
The `sq toolbox packet split` command now outputs to stdout by default
for unknown reasons. Providing an empty string to `--prefix` now
works again and somehow has the command output to files again.

Signed-off-by: default avatarDavid Runge <dvzrv@archlinux.org>
parent 57714dd9
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ def keyring_split(working_dir: Path, keyring: Path, preserve_filename: bool = Fa
keyring_dir = Path(mkdtemp(dir=working_dir, prefix="keyring-")).absolute()
with cwd(keyring_dir):
system(["sq", "keyring", "split", str(keyring)])
system(["sq", "toolbox", "keyring", "split", str(keyring)])
keyrings: List[Path] = list(natural_sort_path(keyring_dir.iterdir()))
......@@ -75,7 +75,7 @@ def keyring_merge(certificates: List[Path], output: Optional[Path] = None, force
The result if no output file has been used
"""
cmd = ["sq", "keyring", "merge"]
cmd = ["sq", "toolbox", "keyring", "merge"]
if force:
cmd.insert(1, "--force")
if output:
......@@ -103,7 +103,7 @@ def packet_split(working_dir: Path, certificate: Path) -> Iterable[Path]:
packet_dir = Path(mkdtemp(dir=working_dir, prefix="packet-")).absolute()
with cwd(packet_dir):
system(["sq", "toolbox", "packet", "split", str(certificate)])
system(["sq", "toolbox", "packet", "split", "--prefix", "''", str(certificate)])
return natural_sort_path(packet_dir.iterdir())
......
......@@ -71,7 +71,7 @@ def verify( # noqa: ignore=C901
keyring_fd = Popen(("sq", "dearmor", f"{str(keyring_path)}"), stdout=PIPE)
print(system(["hokey", "lint"], _stdin=keyring_fd.stdout), end="")
if lint_sq_keyring:
print(system(["sq", "keyring", "lint", f"{str(keyring_path)}"]), end="")
print(system(["sq", "toolbox", "keyring", "lint", f"{str(keyring_path)}"]), end="")
def verify_integrity(certificate: Path, all_fingerprints: Set[Fingerprint]) -> None: # noqa: ignore=C901
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment