Fixed sdk from local file installation
[src/xds/xds-server.git] / lib / xdsserver / sdks.go
index 6094045..ee6a269 100644 (file)
@@ -38,8 +38,8 @@ type SDKs struct {
        stop  chan struct{} // signals intentional stop
 }
 
-// NewSDKs creates a new instance of SDKs
-func NewSDKs(ctx *Context) (*SDKs, error) {
+// SDKsConstructor creates a new instance of SDKs
+func SDKsConstructor(ctx *Context) (*SDKs, error) {
        s := SDKs{
                Context:      ctx,
                Sdks:         make(map[string]*CrossSDK),
@@ -340,7 +340,7 @@ func (s *SDKs) Install(id, filepath string, force bool, timeout int, args []stri
 
                // Update path when not set
                if sdk.Path == "" {
-                       sdkDef, err := GetSDKInfo(scriptDir, sdk.URL, "", "", s.Log)
+                       sdkDef, err := GetSDKInfo(scriptDir, sdk.URL, "", "", sdk.UUID, s.Log)
                        if err != nil || sdkDef.Path == "" {
                                return nil, fmt.Errorf("cannot retrieve sdk path %v", err)
                        }
@@ -356,7 +356,7 @@ func (s *SDKs) Install(id, filepath string, force bool, timeout int, args []stri
                }
 
                for _, sf := range s.SdksFamilies {
-                       sdkDef, err := GetSDKInfo(sf.ScriptsDir, "", sdkFilename, "", s.Log)
+                       sdkDef, err := GetSDKInfo(sf.ScriptsDir, "", sdkFilename, "", "", s.Log)
                        if err == nil {
                                // OK, sdk found
                                sdk = &sdkDef