aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/busybox.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-02-05 17:50:48 +0900
committerOphestra <cat@gensokyo.uk>2026-02-05 17:50:48 +0900
commit6ad21e22881640eb488799848168dbbdcd299268 (patch)
treec89683722687131965cc8f3e017765818a379fa6 /internal/rosa/busybox.go
parent27e2e3f996b79d879e91455d2730acecbb8422e2 (diff)
internal/rosa: register custom artifacts
This also encodes extra information for iana-etc. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/busybox.go')
-rw-r--r--internal/rosa/busybox.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/rosa/busybox.go b/internal/rosa/busybox.go
index 14631b2a..3f8d1aef 100644
--- a/internal/rosa/busybox.go
+++ b/internal/rosa/busybox.go
@@ -32,6 +32,16 @@ func (a busyboxBin) Dependencies() []pkg.Artifact {
return []pkg.Artifact{a.bin}
}
+func init() {
+ pkg.Register(kindBusyboxBin, func(r *pkg.IRReader) pkg.Artifact {
+ a := busyboxBin{r.Next().(pkg.FileArtifact)}
+ if _, ok := r.Finalise(); ok {
+ panic(pkg.ErrUnexpectedChecksum)
+ }
+ return a
+ })
+}
+
// String returns the reporting name of the underlying file prefixed with expand.
func (a busyboxBin) String() string {
return "expand-" + a.bin.(fmt.Stringer).String()