Skip to content

apk/installed: parse Z: (file checksum) token in ParseInstalled#2230

Open
Dev-X25874 wants to merge 1 commit into
chainguard-dev:mainfrom
Dev-X25874:fix/parse-installed-file-checksum
Open

apk/installed: parse Z: (file checksum) token in ParseInstalled#2230
Dev-X25874 wants to merge 1 commit into
chainguard-dev:mainfrom
Dev-X25874:fix/parse-installed-file-checksum

Conversation

@Dev-X25874
Copy link
Copy Markdown

AddInstalledPackage writes a Z:<checksum> line for every regular
file that carries a checksum, and real installed databases are full of
them. ParseInstalled had no case "Z": handler, so those lines were
silently dropped on read-back — every reconstructed tar.Header came
back with a nil PAXRecords map and no checksum.

Add the missing case, mirroring the write path: allocate PAXRecords
on demand and store the value under paxRecordsChecksumKey, the same
key used by installRegularFile and AddInstalledPackage.

Signed-off-by: Dev-X25874 <283057883+Dev-X25874@users.noreply.github.com>
@Dev-X25874
Copy link
Copy Markdown
Author

Hey @a-crate — would you mind taking a look at this when you get a chance? This adds the missing Z: case in ParseInstalled to handle file checksums that were being silently dropped on read-back. Happy to answer any questions or make changes based on your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant