Fix for GOPATH failure in go-dep Package

The go-dep package is encountering the following error after
updating golang-any, golang-go, and golang-src to version 1.22:
"go.mod file not found in current directory or any parent"

According to the Golang 1.22 release notes
https://tip.golang.org/doc/go1.22#go-command, go get is no longer
supported outside of a module in the legacy GOPATH mode.

To address this, we have created a patch that sets and exports the
GO111MODULE variable to off.

Test Plan:
PASS: go-dep Package build successfully
PASS: Download all packages successfully.
PASS: Build ISO and installed as AIO-SX.

Story: 2011047
Task: 51402

Change-Id: I28e276dd2caae7c094ac77dc0a2074d9ba6acb22
Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com>
This commit is contained in:
Boovan Rajendran 2024-11-22 10:50:52 -05:00
parent b92ce2ebf1
commit 06fbe30932
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From f16b8b44ed946e40871abf6b3d8d638c768b0dd2 Mon Sep 17 00:00:00 2001
From: Boovan Rajendran <boovan.rajendran@windriver.com>
Date: Fri, 22 Nov 2024 03:51:57 -0500
Subject: [PATCH] Fix for GOPATH failure in go-dep Package
The go-dep package is encountering the following error after
updating golang-any, golang-go, and golang-src to version 1.22:
"go.mod file not found in current directory or any parent"
According to the Golang 1.22 release notes
https://tip.golang.org/doc/go1.22#go-command, go get is no longer
supported outside of a module in the legacy GOPATH mode.
Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com>
---
debian/rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/debian/rules b/debian/rules
index 1585fda..e3f90c0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,7 @@ include /usr/share/dpkg/architecture.mk
export DH_VERBOSE := 3
export DH_GOLANG_INSTALL_ALL := 1
+export GO111MODULE := off
%:
dh $@ --buildsystem=golang --with=golang
--
2.25.1

View File

@ -0,0 +1 @@
0001-Fix-for-GOPATH-failure-in-go-dep-Package.patch