Skip to content

Commit f4f2bcc

Browse files
t3dotggclaude
andcommitted
fix(cli): libatomic notice survives multiarch hosts
Query the arch-qualified package so an installed libatomic1:i386 cannot add a second entry to the header, and require the notice in the smoke check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 06a71d5 commit f4f2bcc

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎scripts/build-cli-archive.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,14 @@ const bundleLinuxLibatomic = Effect.fn("bundleLinuxLibatomic")(function* (input:
274274
const owner = yield* spawner.string(
275275
ChildProcess.make("dpkg-query", ["-S", yield* fs.realPath(source)]),
276276
);
277-
const pkg = /^([^:\s]+)(?::[^:\s]+)?: /.exec(owner)?.[1];
278-
const versions = pkg
277+
// Keep the arch qualifier so a second installed arch cannot add its own line.
278+
const [, qualifiedPkg, pkg] = /^(([^:\s]+)(?::[^:\s]+)?): /.exec(owner) ?? [];
279+
const versions = qualifiedPkg
279280
? yield* spawner.string(
280281
ChildProcess.make("dpkg-query", [
281282
"-W",
282283
"-f=${Version} ${source:Package} ${source:Version}",
283-
pkg,
284+
qualifiedPkg,
284285
]),
285286
)
286287
: "";

‎scripts/smoke-cli-archive.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
101101
for (const required of [
102102
executable,
103103
path.join(contentDir, "client/index.html"),
104-
...(platform === "linux" ? [bundledLibatomic] : []),
104+
...(platform === "linux" ? [bundledLibatomic, `${bundledLibatomic}.LICENSE`] : []),
105105
]) {
106106
if (!(yield* fs.exists(required))) {
107107
return yield* new CliArchiveSmokeError({

0 commit comments

Comments
 (0)