Skip to content

Commit

Permalink
fix(action): infinite symlink issue
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
  • Loading branch information
AtomicFS committed Nov 19, 2024
1 parent 50e1d3d commit 3d9a259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions action/recipes/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ func (opts LinuxOpts) buildFirmware(ctx context.Context, client *dagger.Client,
// remove existing config if exists
// -f: ignore nonexistent files
{"rm", "-f", ".config"},
// x86_64 reuses x86
{"ln", "--symbolic", "--relative", "arch/x86", "arch/x86_64"},
// the symlink simplifies this command
{"mkdir", "-p", fmt.Sprintf("arch/%s/configs/", NormalizeArchitectureForLinux(opts.Arch))},
{"mv", defconfigBasename, fmt.Sprintf("arch/%s/configs/%s", NormalizeArchitectureForLinux(opts.Arch), defconfigBasename)},
Expand Down
4 changes: 2 additions & 2 deletions action/recipes/recipes.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ func NormalizeArchitectureForLinux(arch string) string {
archMap := map[string]string{
// x86 32-bit
"i386": "x86",
// x86 64-bit
"amd64": "x86_64",
// x86 64-bit (x86_64 reuses x86)
"amd64": "x86",
}
result, ok := archMap[normalArch]
if result != "" && ok {
Expand Down

0 comments on commit 3d9a259

Please sign in to comment.