From nobody Wed Oct 16 16:27:14 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XTGZp68jJz5YjVf; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XTGZp5Bydz4hZV; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hItj/5PbTWL5lvOfNCLSGVcVWMil6RzQKDCc7wdBdbA=; b=WwFKP/qN9xj7xzBVXnLu0aPb97prT/uuyzw99n/84iMddz4OTnyEbLhce5VaLvJc+lDeHj YXYutyqn2Q8AU8uotWK6M91XtVp5EFfyzRI5a5bpJQs2UZIz+j1Q3Q+G89mNfxt61tAkdd 3guIk86q8dBeTeFjxVJza8qGv82n6JC8x8Z4vvKY3MlB+S30oRPA45UsJ6MaljYILofVUG z2iXbp0BgmmSfrR4clSqaZV4m5KJmEZopwvQTr9yEF0d3cFQpCmqmfNJK5Cn1U6PXdkP/0 PUcdDIcvwlBvrDAnkD1mM4WN4zaDpAEGmGqjrCYPg2ZqnPbqhAQ+Ge6jtv9oMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729096034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hItj/5PbTWL5lvOfNCLSGVcVWMil6RzQKDCc7wdBdbA=; b=fJBBhRiHXJbjnWJtumX8KpSwCw+3BpmYyjIL9Ymmtglx6U8QA+AGNwHMoFABdYXux9VlEZ xu1tUX8NmrvlgnIHdUCbIlz0hgpnrt4BwGtWz9m67ugdE5n3RyjL0ZBB+lX4EHUM4nW9E4 RTrP1B+6XgMe3FNI4do9+8nPIc52IXKi+3BwcQfrhvjp/lri/sQKoMjtMJg9M/8Ta9G02X MjFdwNDekL3Hw4SRDHadx/iV5x6qNOUzPUYIzEZ+3Si7mleV6HrbdBISxiT9f3kYnK6AFM etBgIIVEj2EzbtAeWZZ0MwR5OiaLhKmAxftt/dNT98MCqYckeoozUm2bAKgYOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729096034; a=rsa-sha256; cv=none; b=NQ5iSVG7pI5WEopqnIB40JO1obDXpMsgUwxDTfWfCvyAk7RMmR9QnUHAndomnhnmcI/BNj OwIDAp7S65CBID8vIgD71y2KKMCxiK8YH/L3GV8NGs4xKnuhS6HrSU8/xE9A+FzWhHDIdN V9WlV5P/syKV9MnW5ocGj6qWYSYsPBbQQQBE5dVqSi971R11DDDITG/MgKzrIlYsiZLGW5 BYnw55NewaqoYVJqWP1Y7ZX4v/SuLJEXlRh4YrOI5Wf7JCfhC3f/KQBbDNQBqBErp3dJSN U4dVXEQjnzKuSb+cTxi6WYp7xyBFJJmWBoKPm8hjb0u//KsUwY9j8J2rTAD+Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XTGZp3lx9z1Cdr; Wed, 16 Oct 2024 16:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49GGREcj077191; Wed, 16 Oct 2024 16:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49GGREPJ077188; Wed, 16 Oct 2024 16:27:14 GMT (envelope-from git) Date: Wed, 16 Oct 2024 16:27:14 GMT Message-Id: <202410161627.49GGREPJ077188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 0aa4a9fc859f - main - bootstrap-packages.sh escape ++ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb commit 0aa4a9fc859fd43343e2d7b5094a50d1ca0948eb Author: Simon J. Gerraty AuthorDate: 2024-10-16 16:26:19 +0000 Commit: Simon J. Gerraty CommitDate: 2024-10-16 16:26:29 +0000 bootstrap-packages.sh escape ++ We need to escape + when egreping parent makefile too. Reviewed by: stevek --- targets/pseudo/bootstrap-packages/bootstrap-packages.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh index 58b2843a9422..fa87b069f6da 100755 --- a/targets/pseudo/bootstrap-packages/bootstrap-packages.sh +++ b/targets/pseudo/bootstrap-packages/bootstrap-packages.sh @@ -118,13 +118,17 @@ end_options() { EOF } +no_plus() { + case "$1" in + *+*) echo "$1" | sed 's,+,\\\\+,g';; + *) echo "$1";; + esac +} + find_opt() { mf=$1 - sub=$2 + sub="`no_plus $2`" shift 2 - case "$sub" in - *+*) sub=`echo "$sub" | sed 's,+,\\\\+,g'`;; - esac egrep "$@" "^[^#].*[[:space:]]$sub([[:space:]]|\$)" $mf | tr '{' '\n' | sed -n 's,^MK_\([^}]*\).*,\1,p' | @@ -142,8 +146,9 @@ sort -t= -k2 "$@" | sed 's,/Makefile:PACKAGE=, ,' | bname=${reldir##*/} # check parent does not have it commented out # otherwise we should ignore it. + # if the parent makefile does not exist, we will skip it. pmf=$SRCTOP/$dname/Makefile - egrep -q "^[^#].*[[:space:]]$bname([[:space:]]|\$)" $pmf || continue + egrep -q "^[^#].*[[:space:]]`no_plus $bname`([[:space:]]|\$)" $pmf 2> /dev/null || continue : reldir=$reldir case "$reldir" in *lib/*) sub=${reldir#*lib/};;