"strings"
"time"
- common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib"
- "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib/eows"
- "gerrit.automotivelinux.org/gerrit/src/xds/xds-server/lib/xsapiv1"
+ common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git"
+ "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/eows"
+ "gerrit.automotivelinux.org/gerrit/src/xds/xds-server.git/lib/xsapiv1"
"github.com/gin-gonic/gin"
"github.com/kr/pty"
)
// Build command line
cmd := []string{}
+
+ // Reset by default LD_LIBRARY_PATH
+ // With new AGL SDK, New environment-setup-*-agl-linux file checks if
+ // LD_LIBRARY_PATH is set or not and not empty LD_LIBRARY_PATH is considered
+ // as misconfigured and prevent to use SDK
+ if !args.LdLibPathNoReset {
+ cmd = append(cmd, "unset LD_LIBRARY_PATH; ")
+ }
+
// Setup env var regarding Sdk ID (used for example to setup cross toolchain)
if envCmd := s.sdks.GetEnvCmd(args.SdkID, prj.DefaultSdk); len(envCmd) > 0 {
cmd = append(cmd, envCmd...)
execWS.ExitCB = func(e *eows.ExecOverWS, code int, err error) {
s.Log.Debugf("Command [Cmd ID %s] exited: code %d, error: %v", e.CmdID, code, err)
+ defer LockXdsUpdateCounter(s.Context, false)
// Close client tty
defer func() {
if gdbPty != nil {
// Start command execution
s.Log.Infof("Execute [Cmd ID %s]: %v %v", execWS.CmdID, execWS.Cmd, execWS.Args)
+ LockXdsUpdateCounter(s.Context, true)
err = execWS.Start()
if err != nil {
+ LockXdsUpdateCounter(s.Context, false)
common.APIError(c, err.Error())
return
}