Skip to content

Commit

Permalink
fix(unikraft): Order external libraries alphabetically (#1070)
Browse files Browse the repository at this point in the history
Reviewed-by: Alexander Jung <[email protected]>
Approved-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung authored Dec 8, 2023
2 parents 0a884c7 + fc90d21 commit 240f2c7
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 240f2c7

Please sign in to comment.