public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] meta: Do not warn on usage of env vars exported to bb fetcher
@ 2024-09-03 18:45 'Tobias Schaffner' via isar-users
  2024-09-03 19:51 ` 'Jan Kiszka' via isar-users
  2024-09-09 14:37 ` Uladzimir Bely
  0 siblings, 2 replies; 3+ messages in thread
From: 'Tobias Schaffner' via isar-users @ 2024-09-03 18:45 UTC (permalink / raw)
  To: isar-users; +Cc: jan.kiszka, Tobias Schaffner

Only a few of the variables allowed to be exported to the bitbake
fetcher, are ignored when warning about env exports in the
dpkg.bbclass.

Reference the list in bitbakes fetcher2 module instead of maintaining
a additional incomplete list.

Signed-off-by: Tobias Schaffner <tobias.schaffner@siemens.com>
---
 meta/classes/dpkg.bbclass | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index bcc3f828..7eba7521 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -57,7 +57,7 @@ dpkg_runbuild() {
         value=$(echo "${line}" | cut -d '=' -f2-)
         sbuild_export $var "$value"
 
-        # Don't warn some variables
+        # Don't warn dpkg specific environment variables
         [ "${var}" = "PARALLEL_MAKE" ] && continue
         [ "${var}" = "CCACHE_DIR" ] && continue
         [ "${var}" = "CCACHE_DEBUGDIR" ] && continue
@@ -66,15 +66,10 @@ dpkg_runbuild() {
         [ "${var}" = "PATH_PREPEND" ] && continue
         [ "${var}" = "DEB_BUILD_OPTIONS" ] && continue
 
-        [ "${var}" = "http_proxy" ] && continue
-        [ "${var}" = "HTTP_PROXY" ] && continue
-        [ "${var}" = "https_proxy" ] && continue
-        [ "${var}" = "HTTPS_PROXY" ] && continue
-        [ "${var}" = "ftp_proxy" ] && continue
-        [ "${var}" = "FTP_PROXY" ] && continue
-        [ "${var}" = "no_proxy" ] && continue
-        [ "${var}" = "NO_PROXY" ] && continue
-        [ "${var}" = "GIT_PROXY_COMMAND" ] && continue
+        # Don't warn environment variables exported to the bitbake fetcher
+        case " ${@" ".join(bb.fetch2.FETCH_EXPORT_VARS)} " in
+            *" ${var} "*) continue;;
+        esac
 
         bbwarn "Export of '${line}' detected, please migrate to templates"
     done
-- 
2.40.1

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240903184512.3684421-1-tobias.schaffner%40siemens.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-09 14:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-03 18:45 [PATCH v2] meta: Do not warn on usage of env vars exported to bb fetcher 'Tobias Schaffner' via isar-users
2024-09-03 19:51 ` 'Jan Kiszka' via isar-users
2024-09-09 14:37 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox