From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by sourceware.org (Postfix) with ESMTPS id 9E46F3858402 for ; Tue, 2 Nov 2021 09:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E46F3858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 9B294C000E; Tue, 2 Nov 2021 09:18:28 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 0E48D581C23; Tue, 2 Nov 2021 10:18:27 +0100 (CET) From: Dodji Seketeli To: tangmeng Cc: libabigail@sourceware.org Subject: Re: [PATCH v2] abicompat: Add prompt message for abnormal operation Organization: Me, myself and I References: <20211029092343.32219-1-tangmeng@uniontech.com> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 02 Nov 2021 10:18:27 +0100 In-Reply-To: <20211029092343.32219-1-tangmeng@uniontech.com> (tangmeng@uniontech.com's message of "Fri, 29 Oct 2021 17:23:43 +0800") Message-ID: <871r3yapb0.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2021 09:18:32 -0000 Hello, tangmeng a =C3=A9crit: > When using abicompat, if the user configures the > lib2 path while using the xxx option, the configuration > of lib2 is not actually processed in the command > execution process, and there is no prompt message. > It will cause lib2 to be considered to have been processed, > so a warning is added here to prompt the user. Thanks! I have just re-worded this introduction a little bit. [...] > -/// An description of a change of the type of a function. It contains > +/// An description of a change of the type of a function. It contains It's a common pattern we use throughout the code to add one extra space after the dot. This is convention used in the code of GNU projects and we kept it for historical reasons. So it's not a problem. I changed the "An description" into "A description", however. So, here is the patch that was applied to the master branch of the Git repository. Thanks! >From ba18218ec2b8cf32b86aef4c4b539411ef0bd645 Mon Sep 17 00:00:00 2001 From: tangmeng Date: Fri, 29 Oct 2021 17:23:43 +0800 Subject: [PATCH] abicompat: Add prompt message for abnormal operation When using abicompat, if the uses the --weak-mode option and also provides a lib2 path on the command line, the lib2 path is silently ignored. This patch provides a warning to notify the user that the lib2 path is ignored in that case. * tools/abicompat.cc (main): Notify the user when the path to the second library is ignored because the --weak-mode option was provided. Also, fix comment. Signed-off-by: tangmeng Signed-off-by: Dodji Seketeli --- tools/abicompat.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/abicompat.cc b/tools/abicompat.cc index 60cd794f..cf944a49 100644 --- a/tools/abicompat.cc +++ b/tools/abicompat.cc @@ -390,7 +390,7 @@ perform_compat_check_in_normal_mode(options& opts, return status; } =20 -/// An description of a change of the type of a function. It contains +/// A description of a change of the type of a function. It contains /// the declaration of the function we are interested in, as well as /// the differences found in the type of that function. struct fn_change @@ -638,6 +638,13 @@ main(int argc, char* argv[]) return 0; } =20 + if (opts.weak_mode && !opts.lib2_path.empty()) + { + emit_prefix(argv[0], cout) + << "WARNING: The \'--weak-mode\' option is used. The " + << opts.lib2_path << " will be ignored automatically\n"; + } + ABG_ASSERT(!opts.app_path.empty()); if (!abigail::tools_utils::check_file(opts.app_path, cerr, opts.prog_nam= e)) return abigail::tools_utils::ABIDIFF_ERROR; --=20 2.32.0 --=20 Dodji