BB_NO_NETWORK

7 views
Skip to first unread message

Christian Leeb

unread,
Aug 20, 2025, 4:17:02 PMAug 20
to kas-devel
Hi,

How can I set BB_NO_NETWORK=1 with KAS?

I'm using  bitbake-getvar to check if the var is set since I'm afraid that the variable is not processed by bitbake

without KAS I do
BB_ENV_PASSTHROUGH_ADDITIONS=' BB_NO_NETWORK' BB_NO_NETWORK=1 bitbake-getvar BB_NO_NETWORK

and get

BB_NO_NETWORK="1"

in KAS I tried 

scripts/kas-container --git-credential-store ~/.git-credentials --runtime-args "-e KAS_CLONE_DEPTH=1 -v $HOME/yocto-data/:$HOME/yocto-data/ -e DL_DIR=$HOME/yocto-data/downloads -e SSTATE_DIR=$HOME/yocto-data/sstate-cache" --runtime-args "-e BB_NO_NETWORK=1" shell -c 'bitbake-getvar BB_NO_NETWORK' ci/configs/blpwave2/cpm/image.yaml:kas-signing-key-none.yaml 

and I get

The variable 'BB_NO_NETWORK' is not defined
2025-08-20 20:08:18 - ERROR    - Shell returned non-zero exit status
2025-08-20 20:08:18 - ERROR    - Command "/bin/bash -c 'bitbake-getvar BB_NO_NETWORK'" failed with error 1

Is it required to set BB_ENV_PASSTHROUGH_ADDITIONS=BB_NO_NETWORK?

Best regards, Chris

Jan Kiszka

unread,
Aug 21, 2025, 3:24:54 AMAug 21
to Christian Leeb, kas-devel
On 20.08.25 22:17, Christian Leeb wrote:
> Hi,
>
> How can I set BB_NO_NETWORK=1 with KAS?
>
> I'm using  bitbake-getvar to check if the var is set since I'm afraid
> that the variable is not processed by bitbake
>
> without KAS I do
> BB_ENV_PASSTHROUGH_ADDITIONS=' BB_NO_NETWORK' BB_NO_NETWORK=1 bitbake-
> getvar BB_NO_NETWORK
>
> and get
>
> BB_NO_NETWORK="1"
>
> in KAS I tried 
>
> scripts/kas-container --git-credential-store ~/.git-credentials --
> runtime-args "-e KAS_CLONE_DEPTH=1 -v $HOME/yocto-data/:$HOME/yocto-
> data/ -e DL_DIR=$HOME/yocto-data/downloads -e SSTATE_DIR=$HOME/yocto-
> data/sstate-cache" *--runtime-args "-e BB_NO_NETWORK=1"* shell -c
> 'bitbake-getvar BB_NO_NETWORK' ci/configs/blpwave2/cpm/image.yaml:kas-
> signing-key-none.yaml 
>
> and I get
>
> The variable 'BB_NO_NETWORK' is not defined
> 2025-08-20 20:08:18 - ERROR    - Shell returned non-zero exit status
> 2025-08-20 20:08:18 - ERROR    - Command "/bin/bash -c 'bitbake-getvar
> BB_NO_NETWORK'" failed with error 1
>
> Is it required to set BB_ENV_PASSTHROUGH_ADDITIONS=BB_NO_NETWORK?
>

You can simply add that to the `local_conf_header` section in your kas
configuration file - or create a dedicated option file like this:

[offline.yaml]

header:
version: 19

local_conf_header:
offline: |
BB_NO_NETWORK = "1"

Then:

kas build main.yaml:offline.yaml

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center
Reply all
Reply to author
Forward
0 new messages