From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750962531146137600 X-Received: by 2002:a5d:46ca:: with SMTP id g10mr525081wrs.193.1571862972485; Wed, 23 Oct 2019 13:36:12 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:fc85:: with SMTP id g5ls2122072wrr.4.gmail; Wed, 23 Oct 2019 13:36:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+PWZWV1oEwipXKsj7DdkXBLTJtFZkt98jQYTdlXtk5/UKM13gn3G0QQs/D3YhxTyWIkaC X-Received: by 2002:a5d:488f:: with SMTP id g15mr564440wrq.9.1571862971808; Wed, 23 Oct 2019 13:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571862971; cv=none; d=google.com; s=arc-20160816; b=zsXtxbYsvPvnmTcD6RVCPh2Axbp9ylhtyMRWr5EXyEhJbwfmoVmxwHPIxAKVcbH3wm hxP0R4A0jwM/EcPVGAUNPcJIAkT1CgMH4kaptt5N2a/MM9rkIzgpxtpQfQw7FTd+owBv 8HGwwrXKkZT0bkrJ0jARZXxcSRndu1MWlY+5qTLr7TrGnTv9wMAdnVFJlyWaeWEd/Loq LHwzw+68vvplFBaFb/+PgX4HepjY+9uq0jJoF2CPMPSBbdpb9XK5wnocZwLS6twxA87e 54hYlhuTS1vuM/XWqy9EDmCyT15qhZ9k7JsLvZuJOScgwVvxkMkV/ROml7wp7KIbA078 7kYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date; bh=YIdfFwE0A37zDO0MUwzuAn2EzG8xqEbbmWwJHeh9vIg=; b=JrM9iJcxs0CB/s954/IpS78i1SeKAvD1CHpj2sCWApvh4qcDzOvHAkqnMHEHVagLi/ 2thzH9NbCQazlf1eJR6WQQH+0m15P8ExmKdGAyGZFtiqIaMgkcTN8h0fMjE0jIcjcICX YX3RUTypSi7uqlOjfVweLu+0LkdhZ4Qnt8Rrq+70ie/wdY9z9+vIEQn3Ur6R5jaJpy8m hR9ANFkfuNiCUOXov67XJvQ94duq14WOpRXdpe8pcpOnPkom0tKjPd+gp2Ai8+WqPcUq ZSj2iwOUQNKDZywE12ayX010xyUgEKnLMq/kpB97m6OxOf8Yc4J2PDy0uoNQ0DeI/fFS WEJg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id v2si28411wma.3.2019.10.23.13.36.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2019 13:36:11 -0700 (PDT) Received-SPF: neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 85.214.156.166 is neither permitted nor denied by best guess record for domain of ibr@radix50.net) smtp.mailfrom=ibr@radix50.net Received: from yssyq.m.ilbers.de (dslb-084-061-174-150.084.061.pools.vodafone-ip.de [84.61.174.150]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x9NKa9LX013113 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Oct 2019 22:36:11 +0200 Date: Wed, 23 Oct 2019 22:36:04 +0200 From: Baurzhan Ismagulov To: isar-users@googlegroups.com Subject: Re: [PATCHv2 2/9] base-apt: use the "basename" command instead of pattern substitution Message-ID: <20191023203604.4fnnttjymfypiktg@yssyq.m.ilbers.de> Mail-Followup-To: isar-users@googlegroups.com References: <20191023114227.31308-1-henning.schild@siemens.com> <20191023114227.31308-3-henning.schild@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023114227.31308-3-henning.schild@siemens.com> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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-TUID: bkoM+hzUpI3S On Wed, Oct 23, 2019 at 01:42:20PM +0200, Henning Schild wrote: > Cosmetic and not functional. Let us not reinvet the wheel and possibly > make mistakes. ... > --- a/meta/classes/base-apt-helper.bbclass > +++ b/meta/classes/base-apt-helper.bbclass > @@ -26,7 +26,7 @@ populate_base_apt() { > # robust than querying reprepro by name. > > # Check if this package is taken from Isar-apt, if so - ingore it. > - base_name=${package##*/} > + base_name=$( basename "${package}") I'm not in favor of this one. The suggested replacement spawns a subshell and executes a binary, which is much more expensive than shell's builtin operation, and that is executed in a loop. The current code is correct. The variable name explains what it does. With kind regards, Baurzhan.