Skip to content

Commit 9376c2f

Browse files
Merge pull request openshift#7972 from andfasano/fix-agent-bootcatalog-arm64
OCPBUGS-28827: do not rename boot.catalog for arm64 iso
2 parents e0adcea + d3ffa4f commit 9376c2f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/asset/agent/image/agentimage.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ func (a *AgentImage) appendKargs(kargs []byte) error {
179179
// normalizeFilesExtension scans the extracted ISO files and trims
180180
// the file extensions longer than three chars.
181181
func (a *AgentImage) normalizeFilesExtension() error {
182+
var skipFiles = map[string]bool{
183+
"boot.catalog": true, // Required for arm64 iso
184+
}
185+
182186
return filepath.WalkDir(a.tmpPath, func(p string, d fs.DirEntry, err error) error {
183187
if err != nil {
184188
return err
@@ -191,6 +195,11 @@ func (a *AgentImage) normalizeFilesExtension() error {
191195
ext := filepath.Ext(p)
192196
// ext includes also the dot separator
193197
if len(ext) > iso9660Level1ExtLen+1 {
198+
b := filepath.Base(p)
199+
if _, ok := skipFiles[filepath.Base(b)]; ok {
200+
return nil
201+
}
202+
194203
// Replaces file extensions longer than three chars
195204
np := p[:len(p)-len(ext)] + ext[:iso9660Level1ExtLen+1]
196205
err = os.Rename(p, np)

0 commit comments

Comments
 (0)