Skip to content

Commit e5abaca

Browse files
srmungarCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 15dc6fe commit e5abaca

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

internal/image/imageos/imageos.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,18 @@ func (imageOs *ImageOs) deInitDebLocalRepoWithinInstallRoot(installRoot string)
587587
return nil
588588
}
589589

590+
func isDebianBasedTargetOS(targetOS string) bool {
591+
switch strings.ToLower(strings.TrimSpace(targetOS)) {
592+
case "ubuntu", "debian", "wind-river-elxr", "elxr":
593+
return true
594+
default:
595+
return false
596+
}
597+
}
598+
590599
func preImageOsInstall(installRoot string, template *config.ImageTemplate) error {
591600
// For Debian-based systems, configure dpkg for target architecture in cross-arch builds
592-
if strings.ToLower(template.Target.OS) == "ubuntu" || strings.ToLower(template.Target.OS) == "debian" {
601+
if isDebianBasedTargetOS(template.Target.OS) {
593602
// Normalize target architecture for dpkg
594603
targetArch := template.Target.Arch
595604
switch targetArch {

0 commit comments

Comments
 (0)