Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/distro/generic/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package generic

import (
"fmt"
"maps"
"math/rand"
"slices"
"strings"
"sync"

Expand Down Expand Up @@ -242,8 +244,8 @@ func osCustomizations(t *imageType, osPackageSet rpmmd.PackageSet, options distr
osc.Files = append(osc.Files, gpgKeyFiles...)
}

for filename, repos := range yumRepos {
osc.YUMRepos = append(osc.YUMRepos, osbuild.NewYumReposStageOptions(filename, repos))
for _, filename := range slices.Sorted(maps.Keys(yumRepos)) {
osc.YUMRepos = append(osc.YUMRepos, osbuild.NewYumReposStageOptions(filename, yumRepos[filename]))
}

if oscapConfig := c.GetOpenSCAP(); oscapConfig != nil {
Expand Down
4 changes: 3 additions & 1 deletion pkg/manifest/bootc_pxetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package manifest

import (
"fmt"
"maps"
"slices"
"strings"

"github.com/osbuild/images/internal/common"
Expand Down Expand Up @@ -237,7 +239,7 @@ func (p *BootcPXETree) getChmodFiles() map[string]osbuild.ChmodStagePathOptions
// GetTarFiles returns the list of files in the tree to be included in a tar
func (p *BootcPXETree) GetTarFiles() []string {
var files []string
for f := range p.getChmodFiles() {
for _, f := range slices.Sorted(maps.Keys(p.getChmodFiles())) {
// Tar needs relative paths
files = append(files, strings.TrimPrefix(f, "/"))
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/manifest/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package manifest
import (
"errors"
"fmt"
"maps"
"slices"

"github.com/osbuild/images/pkg/container"
"github.com/osbuild/images/pkg/customizations/fsnode"
Expand Down Expand Up @@ -356,7 +358,8 @@ func (p *BuildrootFromContainer) serialize() (osbuild.Pipeline, error) {
pipeline.AddStage(stage)
}

for copyFilesFrom, copyFiles := range p.copyFilesFrom {
for _, copyFilesFrom := range slices.Sorted(maps.Keys(p.copyFilesFrom)) {
copyFiles := p.copyFilesFrom[copyFilesFrom]
inputName := "copy-tree"
paths := []osbuild.CopyStagePath{}
for _, copyPath := range copyFiles {
Expand Down
Loading