From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 13 Oct 2026 18:30:16 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f64.google.com (mail-ed1-f64.google.com [209.85.208.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 69DGU23W002929 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Oct 2026 18:30:02 +0200 Received: by mail-ed1-f64.google.com with SMTP id 4fb4d7f45d1cf-6b1d6c10725sf2092467a12.3 for ; Tue, 13 Oct 2026 09:30:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1791908997; cv=pass; d=google.com; s=arc-20260327; b=VvKQ4j6gxSBcQpOaKCaag0y6gLQc6H4pQn9y4gKQD8lwGJh6xlVLaPsM3iwlRUWiGT ifLNy+5A8wCGy1TUanJ2nNJBK5uisedMbAEqtq3jEe4uI8TayRRzwzUgOe8ndplMhhUD /67b9cLi8bVXKtFoInaEAx/PvW6LKwlP8AuCuIz2x/99ppXTdfvzDxt/aWoDd0+oOll2 j2XLzbqfNMNoJ2rN1fCYXhkj0IUdG41xdqiF8fC3FMb64muzW1ImOKIb2xmAPOIxY+Io chX36sZzFRqg0+q98GJOIsTgyoxW6FXTQ0pta1r9sZSde8UJlqovoMgdqQ/EUcrCBjWD Btdg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=CBqx3q7ULmk4WSWAQWjr6zMsPAaZai9Lk9TZoGnpS/w=; fh=m9PZiRbVGS0UzJIOUL+amUp1FEi/selNjar2HD3hRoc=; b=FYK0RSwx+9llmyAsYaFGXa0MrxtzWqPn/6gFJ9AL2biDtMy02579wAL5nSeewMGk3W 1GTlhnhTRjRDaWzUHB7FDVwQ6UkLIYszOP2FPgOYjpNqVqwmnr67VqlSHUfFanRv/W2A hM1q7OHT1YtbgP2pDDCCfRssmAnJ4s5MCNFYxgNx7Ia/9dmG6AkVSWK5jb+fnR59tsUR Q9uMANSbEi4JacdB+CosCNaTyevzNa+u37Ti1njAscDbotwvvm5tlvErQn9Pu1lNcB1b 1jWLUfp0B8LZjwfLZ36F8x25xgj22sAPky6Pp8mTAJhv8ZhRd+yQ0QcMFTbAxvDY5tOi FF/A==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1791908997; x=1792513797; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=CBqx3q7ULmk4WSWAQWjr6zMsPAaZai9Lk9TZoGnpS/w=; b=qaLESimx3SjAopDG1U2PKfQ1U2dZEltP7BbAPXpBIhMLYMbAcp04s/jm+xvE8xP3/3 CsofXKgxGTbv5piddv3q/8l8SW53oLtfn7N/0GumUlYG8qi15X+aB92mzGhic1y6T0UJ cAZPiNBbfy0UqeA/NE99/SuhL8QTTiI1QgZ33veXij6P+94FuzRrlZVMbDIMhfiEDlnc 5aTlJe8qz4zvdZj9/oMSnFf5GqMtTu8T0KG91k0pywEyvxX5ZhZBTs0qwT1kzKmwhVtc npOvIt4bJw5oF5GRnShlasHHAogPFluFPtyi8M9ORgYxhZnOOQfiOwcg0ctK3uKVezom 157w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791908997; x=1792513797; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to:content-type; bh=CBqx3q7ULmk4WSWAQWjr6zMsPAaZai9Lk9TZoGnpS/w=; b=s2uh0lWhOwELsByWz8R9a7x5OLRhswBwypA3M1r/JFQH4cc8ib3SwCjyixabAsp7dz WLFmwOVzWW0CVyPb2KENtabR8KHtTG2Oj7fWzI3l4+O/+/C3+mDUs3UxFFDMpjBJY+1C 0NTckg1f0PqodQFfbGKUBkVWdeieBK7zyNw7YNCUG9s8YszoftqOxDclLcZHPBbdM9hE IW0dL9RUia9392znWrz3ddGxqlptwrpBK1Z+e6nkBCgG920Qqze1s6YBJTGfd/FXneqr 4PpQ7R0I276jOO/fId619CPx08vkkxh0DDSBgqMFyQXdHguXENDJ7cJ+uq+TY1w7ZHv2 GdFQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvByWU0JO3B4vbDJj10K6lnh/Rpd2ORC5Y1y3sC18eEokzO4BU9kD/KBGvbR5Fi5yUBN3kArg@ilbers.de X-Gm-Message-State: AFq9FYKuhJEhS8HMbbVoULFdxHXxsT6liiFAYP3acv14iIDM5RVEgNdv nh9UuDsb/4S+arKCUXKWqs9QbSzugDSGZO6yyFl+KBFlcOSd4ObBjWNM X-Received: by 2002:a05:6402:2089:b0:6aa:e46b:2ca with SMTP id 4fb4d7f45d1cf-6b17c2a6cd9mr8538355a12.30.1791908997280; Tue, 13 Oct 2026 09:29:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdcIZGnTBlFyoquHWvJf4syJKOv5iWDOJhZHfuN4dw0wxA==" Received: by 2002:a05:6402:44d9:b0:6aa:679:a5b8 with SMTP id 4fb4d7f45d1cf-6b1c77607ddls3188102a12.1.-pod-prod-06-eu; Tue, 13 Oct 2026 09:29:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBy2wUjPF1RproqP8VxzdvilNlkDA9R2LaH7s/m3geX3gnPj5wX2qbjz3o2BjIKrcU1RWbkcBmCbjmfL@googlegroups.com X-Received: by 2002:a17:907:1c8d:b0:c2e:4fa2:f3f7 with SMTP id a640c23a62f3a-c31aa0230f4mr1215331066b.22.1791908994983; Tue, 13 Oct 2026 09:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1791908994; cv=none; d=google.com; s=arc-20260327; b=DiDJxlfpayz/ugkbuy9DrT6w2vBSUmM0tgV0BY2IaqfjZd2FjohVMG6/nHAuqWoeav TsRfvpSDuk5sH4CkAYU6Fr4KElp3VdwAL+VtlHg6sN2FLMEc2+6roZ9hsKIVRMHc4v39 Ye9Y2mz2x2KqhpCHPMxh5cYhwRnpuG2rVJsdpQUzDG+q4wRcQOElMXL2qswkQvZckrg4 /IwMjQTW7ytJIyB4naHK55N72WxbK8IBGG/Bvz4G2WDa0iPs1mIwb2LTar7cR+iF0Dkm QV/7rLapdNVYL0fnM3ZKh44ywM6aZB6V8HTktih2B/fxjn13QFTEWrrOkfBODngqAb2D 7niw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id; bh=d0Idwt8V38Nn8452pag3xgpnZpthyWZr6cLxE/uw5/E=; fh=ez+yYIN2+t1/A1KtVD1essDQ6+anTTnZTbSXjuK9WaU=; b=r+1t7UH4q6MtOk+Xsgr1H7auTBReO4npAlzpeE7BCKqHyQUGGRfaYWHvx3pYOlcQdB sZfAB7hPIyp8mp3VG30oZ0357Uhxoaj3Oco4fBKXi1SbjuepLdf7nkNcim7solQ10Akb F/6f6gu9zXV/URINTFN/LHnHuKBGCZKIp/N1eei24BKFGfGuAE87j/+aMmBxoZFiWljt XWUkWXl3kGn3ggltny/yVMR3fkDMZmMaKUON1dJV5hWcH/ZYNoQFM9UC3CDz+FFoQllb KzAFP8+Knto14tPQmD16BujoRGAgoZwp6pEf+C7Qj4brQXT9dUcEFjbdhvylJ8NSIZtU DrfA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id a640c23a62f3a-c369b03d2acsi5077966b.9.2026.10.13.09.29.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Oct 2026 09:29:54 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 69DGRpq1002802 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Oct 2026 18:27:54 +0200 Message-ID: <70c7fb3c-b4c1-4d8f-bac2-96c88eda0538@ilbers.de> Date: Tue, 13 Oct 2026 18:27:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] avoid use of bitbake syntax for argument variables To: Felix Moessbauer , isar-users@googlegroups.com References: <20260928104852.2449161-1-felix.moessbauer@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20260928104852.2449161-1-felix.moessbauer@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: RBPYlg6lcI3j Applied to next, thanks. Zhihang On 9/28/26 12:48, 'Felix Moessbauer' via isar-users wrote: > When using bitbake syntax to access argument variables (e.g. ${1}), > the reference to the variable ends up in the signatures (with an empty > value, as this is never set by bitbake). This is dangerous, as if this > ever is assigned by bitbake, it will break all scripts in the same > context. In addition, the entries (just '1') end up in the cache > signatures - which is ugly but has no other negative impact (yet). > > Instead, we now access these variables in shell-style ($1) and also drop > the not needed quotes on assigments (in POSIX shell, the right part of an > assignment does split words). > > Signed-off-by: Felix Moessbauer > --- > meta/classes-recipe/deb-dl-dir.bbclass | 8 ++++---- > meta/classes-recipe/repository.bbclass | 10 +++++----- > meta/classes-recipe/rootfs.bbclass | 18 +++++++++--------- > meta/classes-recipe/sbuild.bbclass | 6 +++--- > meta/recipes-devtools/base-apt/base-apt.bb | 2 +- > .../linux/files/debian/isar/common.tmpl | 2 +- > .../linux/files/debian/isar/install.tmpl | 4 ++-- > 7 files changed, 25 insertions(+), 25 deletions(-) > > diff --git a/meta/classes-recipe/deb-dl-dir.bbclass b/meta/classes-recipe/deb-dl-dir.bbclass > index 60e2fecc..bafe3a63 100644 > --- a/meta/classes-recipe/deb-dl-dir.bbclass > +++ b/meta/classes-recipe/deb-dl-dir.bbclass > @@ -115,8 +115,8 @@ dbg_pkgs_download() { > } > > deb_dl_dir_import() { > - export pc="${DEBDIR}/${2}" > - export rootfs="${1}" > + export pc=${DEBDIR}/$2 > + export rootfs=$1 > export uid=$(id -u) > export gid=$(id -g) > > @@ -151,8 +151,8 @@ deb_dl_dir_import() { > } > > deb_dl_dir_export() { > - export pc="${DEBDIR}/${2}" > - export rootfs="${1}" > + export pc=${DEBDIR}/$2 > + export rootfs=$1 > export owner=$(id -u):$(id -g) > mkdir -p "${pc}" > > diff --git a/meta/classes-recipe/repository.bbclass b/meta/classes-recipe/repository.bbclass > index d255d1c8..b9097de5 100644 > --- a/meta/classes-recipe/repository.bbclass > +++ b/meta/classes-recipe/repository.bbclass > @@ -122,7 +122,7 @@ repo_del_package() { > export GNUPGHOME="${GNUPGHOME}" > fi > set -- $( dpkg-deb --show --showformat '${Package} ${Architecture}' "${file}" ) > - local p="${1}" a="${2}" > + local p=$1 a=$2 > reprepro -b "${dir}" --dbdir "${dbdir}" -C main \ > removefilter "${codename}" \ > 'Package (= '${p}'), Architecture (= '${a}'), $PackageType (= deb)' > @@ -169,15 +169,15 @@ repo_contains_package() { > package=$(reprepro -b ${dir} --dbdir ${dbdir} \ > --list-format '${$fullfilename}\n' \ > listfilter ${codename} ' > - Package (= '${2}'), > - Version (= '${4}'), > - Architecture (= '${6}'), > + Package (= '$2'), > + Version (= '$4'), > + Architecture (= '$6'), > $PackageType (= deb)') > > # we only need the first match (should there be more). Use shell builtins to avoid > # spawning an additional process (e.g. "head") > set -- ${package} > - package="${1}" > + package=$1 > > # package found in the database? > if [ -n "$package" ]; then > diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass > index 83cd56ea..e957566a 100644 > --- a/meta/classes-recipe/rootfs.bbclass > +++ b/meta/classes-recipe/rootfs.bbclass > @@ -118,31 +118,31 @@ rootfs_cmd() { > bwrap_binds="" > bwrap_rootfs="" > > - while [ "${#}" -gt "0" ] && [ "${1}" != "--" ]; do > - case "${1}" in > + while [ "${#}" -gt "0" ] && [ "$1" != "--" ]; do > + case "$1" in > --bind) > if [ "${#}" -lt "3" ]; then > bbfatal "--bind requires two arguments" > fi > - bwrap_binds="${bwrap_binds} --bind ${2} ${3}" > + bwrap_binds="${bwrap_binds} --bind $2 $3" > shift 3 > ;; > --chdir) > if [ "${#}" -lt "2" ]; then > - bbfatal "${1} requires an argument" > + bbfatal "$1 requires an argument" > fi > - bwrap_args="${bwrap_args} ${1} ${2}" > + bwrap_args="${bwrap_args} $1 $2" > shift 2 > ;; > -*) > - bbfatal "${1} is not a supported option!" > + bbfatal "$1 is not a supported option!" > ;; > *) > if [ -z "${bwrap_rootfs}" ]; then > - bwrap_rootfs="${1}" > + bwrap_rootfs="$1" > shift > else > - bbfatal "unexpected argument '${1}'" > + bbfatal "unexpected argument '$1'" > fi > ;; > esac > @@ -152,7 +152,7 @@ rootfs_cmd() { > bwrap_args="${bwrap_args} --bind ${bwrap_rootfs} /" > fi > > - if [ "${#}" -le "1" ] || [ "${1}" != "--" ]; then > + if [ "${#}" -le "1" ] || [ "$1" != "--" ]; then > bbfatal "no command specified (missing --)" > fi > shift # remove "--", command and its arguments follows > diff --git a/meta/classes-recipe/sbuild.bbclass b/meta/classes-recipe/sbuild.bbclass > index 6db29251..f2916931 100644 > --- a/meta/classes-recipe/sbuild.bbclass > +++ b/meta/classes-recipe/sbuild.bbclass > @@ -82,7 +82,7 @@ sbuild_add_env_filter() { > echo "];" >> ${SBUILD_CONFIG} > fi > > - FILTER=${1} > + FILTER=$1 > > sed -i -e "/'\^${FILTER}\\$/d" \ > -e "/^\$environment_filter =.*/a '^${FILTER}\$'," ${SBUILD_CONFIG} > @@ -96,7 +96,7 @@ sbuild_export() { > echo "};" >> ${SBUILD_CONFIG} > fi > > - VAR=${1}; shift > + VAR=$1; shift > VAR_LINE="'${VAR}' => '${@}'," > > sed -i -e "/^'${VAR}' =>/d" ${SBUILD_CONFIG} \ > @@ -155,7 +155,7 @@ EOF > } > > sbuild_dpkg_log_export() { > - export dpkg_partial_log="${1}" > + export dpkg_partial_log=$1 > > ( flock 9 > set -e > diff --git a/meta/recipes-devtools/base-apt/base-apt.bb b/meta/recipes-devtools/base-apt/base-apt.bb > index 06b1f6c8..97e3ae16 100644 > --- a/meta/recipes-devtools/base-apt/base-apt.bb > +++ b/meta/recipes-devtools/base-apt/base-apt.bb > @@ -13,7 +13,7 @@ KEYFILES ?= "" > BASE_REPO_FEATURES ?= "" > > populate_base_apt() { > - base_distro="${1}" > + base_distro=$1 > > find "${DEBDIR}"/"${base_distro}-${BASE_DISTRO_CODENAME}" -name '*\.deb' | while read package; do > # NOTE: due to packages stored by reprepro are not modified, we can > diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > index 72d3e428..b7001ff5 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl > @@ -47,7 +47,7 @@ deb_kern_kbuild_cross_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD_CROSS} > declare -A kern_pkgs > > main() { > - local target=${1} > + local target=$1 > > if [ ! -f ${S}/debian/isar/${target} ]; then > echo "error: ${target} is not a supported build target!" >&2 > diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > index 4c28ecc6..7975404b 100644 > --- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > +++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl > @@ -6,7 +6,7 @@ > . ${S}/debian/isar/common > > get_kernel_arch() { > - case "${1}" in > + case "$1" in > amd64|i386) echo "x86";; > arm64) echo "arm64";; > armhf) echo "arm";; > @@ -255,7 +255,7 @@ install_headers() { > > install_kbuild() { > kernel_kbuild_dir=usr/lib/linux-kbuild-${krel} > - destdir=${1}/${kernel_kbuild_dir} > + destdir=$1/${kernel_kbuild_dir} > src_kbuild_files=$(mktemp) > obj_kbuild_files=$(mktemp) > -- 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 visit https://groups.google.com/d/msgid/isar-users/70c7fb3c-b4c1-4d8f-bac2-96c88eda0538%40ilbers.de.