From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83941A00BE for ; Tue, 8 Mar 2022 19:53:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 743D74069F; Tue, 8 Mar 2022 19:53:02 +0100 (CET) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by mails.dpdk.org (Postfix) with ESMTP id 3D78D40395 for ; Tue, 8 Mar 2022 19:52:59 +0100 (CET) Received: by mail-wm1-f41.google.com with SMTP id 19so24317wmy.3 for ; Tue, 08 Mar 2022 10:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3wGtuYacpdE0Y5PbObvaMO1lUcDcBHYVQ+Y9+0xT4y0=; b=hN7nQNgp+5+QX6qXFRd3u50xKwygosRic0f3qbisO5fDGPHO16ZLv4WbU+F/Fr7c+g Q6hpKz+LyNM8a7M7Z2lzItEbq8B9KmeyWVhLeUzhf4DJMa2kOCwYuY8bayud3UKG5azv Zr6WshDGYQzbE50/Y+nKZBSMWbLLM5io7q8aDkJJyL4J9mYKvM3K29zUxE+8RtaXBGBn V2dIk31SmCA6hCAzqedjZlnirpZvDQ8Yevrir1GlsOGpgfZJ7zAA/CziB2k07JdbRdak aoIXQvuAe88skZU38FCuL3JjmsP3awvbTQ/KkP/M3CpDtNsdkWbjpOAYsI+/mdpELmdc lGLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3wGtuYacpdE0Y5PbObvaMO1lUcDcBHYVQ+Y9+0xT4y0=; b=DE5pK1rKuec24Qvf7mSPEk34AFUHau/aybaYuCA9KFwb/GNUh8xqp3/i3EhheXlikf 37fDj2+O8Cj1jPAgGkbcwsfLeiyGIznUYzRkKguNusNs1693N5H1Zng80tXd+xkdAmav 5uOPr+OwGLSOXlbVsinxNHa/U6r581xtKVtWrVIBEmOcqt6WLgj6UjzmKzotG8GdR0bn wOiWWw79EWmxhu+xeWZCK3Ovn6d8buSgovpPtMfGJQZ7FQ/f7hKekrdZeShhbWg7Cadm V3KIY97WGUO7ayR4xJmdGSh6jIj/9bVow7UWlJcHnGj3NrmMHbnG3KxTgmLWAeOQ4WMj FIEw== X-Gm-Message-State: AOAM532UsZyIQRmoyzX76xM976TghmbY5pUgpVxvlBbAFXuUTIxfuQNv SIMO9hM9EhvmVGUJ8VWEekdmUA== X-Google-Smtp-Source: ABdhPJyKqKauKDB2zn303KbJ6BQPRJ47WBqJebcXHbf0+r+cMTpjBJQv2w+DqodcHgtYvyPUBMlXVA== X-Received: by 2002:a7b:ce02:0:b0:381:2007:f75c with SMTP id m2-20020a7bce02000000b003812007f75cmr4718184wmc.6.1646765579741; Tue, 08 Mar 2022 10:52:59 -0800 (PST) Received: from usaari01.cust.communityfibre.co.uk ([2a02:6b6a:b497:0:56cc:e50e:f065:6a0c]) by smtp.gmail.com with ESMTPSA id t9-20020a05600c198900b0037bd5fabd10sm3418474wmq.48.2022.03.08.10.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 10:52:59 -0800 (PST) From: Usama Arif To: dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net Cc: fam.zheng@bytedance.com, liangma@bytedance.com, Usama Arif , stable@dpdk.org Subject: [PATCH] build: encapsulate grep for local_miss_maps in a function Date: Tue, 8 Mar 2022 18:52:43 +0000 Message-Id: <20220308185243.3629626-1-usama.arif@bytedance.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org check-symbols-maps.sh runs with the -e option to exit as soon as there is an error. Currently the build is failing as the search of grep -L is empty (which is the case for all version.map files as they have the local symbol) which causes the script to return with an error. This patch encapsulates the grep call in a function, so that only the function errors out and the build is successful. Fixes: b403498e14 ("build: hide local symbols in shared libraries") Cc: stable@dpdk.org Signed-off-by: Usama Arif --- devtools/check-symbol-maps.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 8266fdf9ea..96c479138f 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -53,7 +53,14 @@ if [ -n "$duplicate_symbols" ] ; then ret=1 fi -local_miss_maps=$(grep -L 'local: \*;' $@) +find_local_miss_maps () +{ + local local_miss_maps=$(grep -L 'local: \*;' $@) + echo "$local_miss_maps" + +} + +local_miss_maps=$(find_local_miss_maps $@) if [ -n "$local_miss_maps" ] ; then echo "Found maps without local catch-all:" echo "$local_miss_maps" -- 2.25.1