apk: feed installation from an abstract PackageContents - #2441
Merged
Conversation
mattmoor
force-pushed
the
package-contents-seam
branch
from
August 31, 2026 13:07
4f08d10 to
2b78b61
Compare
mattmoor
force-pushed
the
package-contents-seam
branch
from
August 31, 2026 14:00
2b78b61 to
fd36347
Compare
mattmoor
enabled auto-merge (squash)
August 31, 2026 14:40
Installation consumed *expandapk.APKExpanded concretely, coupling it to the expanded-APK carrier even though the lazy install path only needs the ordered install records and a filesystem to open their content. Introduce PackageContents as the per-package installation input, adapt the expanded APK to it, and generalize installPackage/lazilyInstallAPKFiles over it. The control-shaped surface is one method: ControlSection returns the compressed control segment exactly as distributed, and installation derives everything from those bytes — script/trigger extraction reads the decompressed stream, and the segment's SHA1 is the package checksum apk records (by definition). Carriers therefore cannot disagree with themselves about the checksum of the control data they present. Behavior-preserving: the expanded APK is the only carrier, wrapped at the existing call sites.
mattmoor
force-pushed
the
package-contents-seam
branch
from
August 31, 2026 15:43
fd36347 to
c97459e
Compare
markusthoemmes
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Installation consumed *expandapk.APKExpanded concretely, coupling it to the expanded-APK carrier even though the lazy install path only needs the ordered install records and a filesystem to open their content. Introduce PackageContents as the per-package installation input, adapt the expanded APK to it, and generalize installPackage/lazilyInstallAPKFiles over it.
The control-shaped surface is one method: ControlSection returns the compressed control segment exactly as distributed, and installation derives everything from those bytes — their SHA1 is the package checksum apk records (by definition), and script/trigger extraction reads the decompressed stream. Carriers therefore cannot disagree with themselves about the checksum of the control data they present.
InstallPackageContents installs exactly a caller-supplied, pre-settled package list from its contents — no index, no resolution, no fetch — and build.WithPreResolvedPackages exposes that to image builds, alongside the existing lockfile path. Downstream callers can then carry package contents in forms of their own choosing without apko learning those forms.