aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/report.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/report.go')
-rw-r--r--internal/rosa/report.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/rosa/report.go b/internal/rosa/report.go
index 2d8b0648..01c3cf91 100644
--- a/internal/rosa/report.go
+++ b/internal/rosa/report.go
@@ -32,10 +32,14 @@ func WriteReport(msg message.Msg, w io.Writer, c *pkg.Cache) error {
zero [wordSize]byte
buf [len(pkg.ID{}) + wordSize]byte
)
- for i := range PresetEnd {
- a := Std.Load(PArtifact(i))
+ for _, p := range native.Collect() {
+ a, _ := native.Load(Std, p)
+ meta := native.Get(p)
+ if meta == nil {
+ return errors.New("artifact " + p.String() + " in inconsistent state")
+ }
if _, ok := a.(pkg.FileArtifact); ok {
- msg.Verbosef("skipping file artifact %s", artifactsM[i].Name)
+ msg.Verbosef("skipping file artifact %s", meta.Name)
continue
}
@@ -44,7 +48,7 @@ func WriteReport(msg message.Msg, w io.Writer, c *pkg.Cache) error {
var f *os.File
if r, err := c.OpenStatus(a); err != nil {
if errors.Is(err, os.ErrNotExist) {
- msg.Verbosef("artifact %s unavailable", artifactsM[i].Name)
+ msg.Verbosef("artifact %s unavailable", meta.Name)
continue
}
return err
@@ -52,7 +56,7 @@ func WriteReport(msg message.Msg, w io.Writer, c *pkg.Cache) error {
f = r.(*os.File)
}
- msg.Verbosef("writing artifact %s...", artifactsM[i].Name)
+ msg.Verbosef("writing artifact %s...", meta.Name)
var sz int64
if fi, err := f.Stat(); err != nil {