Skip to content

Commit

Permalink
fix(unikraft): Order external libraries alphabetically
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed Dec 6, 2023
1 parent 5109182 commit fc90d21
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion unikraft/app/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"fmt"
"os"
"path/filepath"
"slices"
"sort"
"strings"

Expand Down Expand Up @@ -453,14 +454,18 @@ func (app application) MakeArgs(ctx context.Context, tc target.Target) (*core.Ma
}
}

orderedLibraries := []string{}
for _, library := range unformattedLibraries {
if !library.IsUnpacked() {
return nil, fmt.Errorf("cannot determine library \"%s\" path without component source", library.Name())
}

libraries = append(libraries, library.Path())
orderedLibraries = append(orderedLibraries, library.Path())
}

slices.Sort(orderedLibraries)
libraries = append(libraries, orderedLibraries...)

// TODO: Platforms & architectures

appDir := app.workingDir
Expand Down

0 comments on commit fc90d21

Please sign in to comment.