forked from security/hakurei
internal/rosa: register custom artifacts
This also encodes extra information for iana-etc. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user