From patchwork Tue Feb 28 11:30:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 65747 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B703384BC18 for ; Tue, 28 Feb 2023 11:31:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B703384BC18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677583865; bh=30VOe6LmOJ0BQKjHqe/VPAWtOlYqKAg0zgNXDPgneE8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=ZiMCO/SuPPq7ah+mce619OiPhykG2uCae1g+ypUNiHW41N6CN1Y8XhH4/3LLsircI PjJLxyInfDzvbSEnHfU/9mPlVN7ZcV8dj31uUjRcCKRwGnzxgVfSze1os5uF0NZTwx ggz3wrXuRjW92GaHR/fP6pCYaCermZPvZVmgtWIY= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 32384385020B for ; Tue, 28 Feb 2023 11:30:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 32384385020B Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-417-jlOUH51nMvyPe5cuNDY93w-1; Tue, 28 Feb 2023 06:30:37 -0500 X-MC-Unique: jlOUH51nMvyPe5cuNDY93w-1 Received: by mail-qv1-f70.google.com with SMTP id x18-20020ad44592000000b00571bb7cdc42so4963650qvu.23 for ; Tue, 28 Feb 2023 03:30:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677583837; h=mime-version:user-agent:message-id:date:organization:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=30VOe6LmOJ0BQKjHqe/VPAWtOlYqKAg0zgNXDPgneE8=; b=PsbXFx64lbZ2hxnsZBjQeDvGwJc7BU9j+9EirAap+doOj9KAmerLcYpov2QDfagLKa vPPyM1FPJZi9sMZYmt5LBrcvCCWiyCrzWnRk39VjLeTVmI78VLen0aMrMGr/sUe5qh7k Rs2bOwo0gARmx+WyBn/5m/5a0Ps7VJkY4jGI7X2s93R5DR4eqSjtAtmO4Zc6DWNEfZdY 0wW74lPKMNshWuhAYUd0deO50nH99x19ocPImGggTvgPkLK6iaweSQuIE1N3dAg3x+kR XSQcniQcuG1K1MvXkCLVii3ot5UGaqAI57zyY+r+zPe8MqgA7JcvT1kERyvqR2MYAWdw Jt1Q== X-Gm-Message-State: AO0yUKVkrIrtzi7rbJa7Ee5WnmSxYhiUXioIQ9x4R2SmOiPlS/Ith9yQ C8BaReEKliHF7zFWkZUpFoWTLdZbhebTigtjUF0H1x4LA6YlvXzyloSFMtHLDYq4VzgDDozdv1M mvNop5YfSi0MdGa/GYZuRums18MTaUzQfi0opS8zsQzLtkwcgQrTqFJNh/gbQRWG936dUFQzfVw == X-Received: by 2002:a05:622a:1303:b0:3bf:c6ec:e960 with SMTP id v3-20020a05622a130300b003bfc6ece960mr4221587qtk.32.1677583836898; Tue, 28 Feb 2023 03:30:36 -0800 (PST) X-Google-Smtp-Source: AK7set8Cmow9kbNSaoM5cWCSyObVXcXiy9Qwug8CSXVngaljPLpeeDd1RuvIjEd949nou9boU+nmGg== X-Received: by 2002:a05:622a:1303:b0:3bf:c6ec:e960 with SMTP id v3-20020a05622a130300b003bfc6ece960mr4221519qtk.32.1677583836284; Tue, 28 Feb 2023 03:30:36 -0800 (PST) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id 14-20020a05620a040e00b006fbb4b98a25sm6584904qkp.109.2023.02.28.03.30.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 03:30:35 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 04377581C79; Tue, 28 Feb 2023 12:30:32 +0100 (CET) To: libabigail@sourceware.org Subject: [PATCH, applied] abipkgdiff: Emit better logs in verbose mode Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Tue, 28 Feb 2023 12:30:32 +0100 Message-ID: <87k002rprb.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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-Patchwork-Original-From: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" Hello, When invoked with --verbose, abipkgdiff emits some logs that could use better clarity. Fixed thus. * tools/abipkgdiff.cc (package::erase_extraction_directory): Say explicitly what's DONE. (extract_rpm): Add newline to log. Say explicitly what's DONE on which package. (extract_deb, extract_tar) (erase_created_temporary_directories_parent, compare_to_self) (create_maps_of_package_content): Say explicitly what's DONE on which package. Signed-off-by: Dodji Seketeli --- tools/abipkgdiff.cc | 70 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc index c588481c..8383ae98 100644 --- a/tools/abipkgdiff.cc +++ b/tools/abipkgdiff.cc @@ -726,12 +726,16 @@ public: if (system(cmd.c_str())) { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " FAILED\n"; + emit_prefix("abipkgdiff", cerr) + << "Erasing temporary extraction directory" + << " FAILED\n"; } else { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " DONE\n"; + emit_prefix("abipkgdiff", cerr) + << "Erasing temporary extraction directory" + << " DONE\n"; } } @@ -947,7 +951,7 @@ extract_rpm(const string& package_path, << package_path << " to " << extracted_package_dir_path - << " ..."; + << " ...\n"; string cmd = "test -d " + extracted_package_dir_path + " || mkdir -p " + extracted_package_dir_path + " ; cd " + @@ -957,12 +961,22 @@ extract_rpm(const string& package_path, if (system(cmd.c_str())) { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " FAILED\n"; + emit_prefix("abipkgdiff", cerr) + << "Extracting package " + << package_path + << " to " + << extracted_package_dir_path + << " FAILED\n"; return false; } if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " DONE\n"; + emit_prefix("abipkgdiff", cerr) + << "Extracting package " + << package_path + << " to " + << extracted_package_dir_path + << " DONE\n"; return true; } @@ -1000,13 +1014,22 @@ extract_deb(const string& package_path, if (system(cmd.c_str())) { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " FAILED\n"; + emit_prefix("abipkgdiff", cerr) + << "Extracting package " + << package_path + << " to " + << extracted_package_dir_path + << " FAILED\n"; return false; } if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " DONE\n"; - + emit_prefix("abipkgdiff", cerr) + << "Extracting package " + << package_path + << " to " + << extracted_package_dir_path + << " DONE\n"; return true; } @@ -1053,12 +1076,22 @@ extract_tar(const string& package_path, if (system(cmd.c_str())) { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " FAILED\n"; + emit_prefix("abipkgdiff", cerr) + << "Extracting tar archive " + << package_path + << " to " + << extracted_package_dir_path + << " FAILED\n"; return false; } if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << " DONE\n"; + emit_prefix("abipkgdiff", cerr) + << "Extracting tar archive " + << package_path + << " to " + << extracted_package_dir_path + << " DONE\n"; return true; } @@ -1097,12 +1130,18 @@ erase_created_temporary_directories_parent(const options &opts) if (system(cmd.c_str())) { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << "FAILED\n"; + emit_prefix("abipkgdiff", cerr) + << "Erasing temporary extraction parent directory " + << package::extracted_packages_parent_dir() + << "FAILED\n"; } else { if (opts.verbose) - emit_prefix("abipkgdiff", cerr) << "DONE\n"; + emit_prefix("abipkgdiff", cerr) + << "Erasing temporary extraction parent directory " + << package::extracted_packages_parent_dir() + << "DONE\n"; } } @@ -1783,7 +1822,10 @@ compare_to_self(const elf_file& elf, diff = compute_diff(corp, reread_corp, ctxt); if (opts.verbose) emit_prefix("abipkgdfiff", cerr) - << "... Comparing the ABIs: DONE\n"; + << "Comparing the ABIs: of \n" + << " '" << corp->get_path() << "' against \n" + << " '" << abi_file_path << "':" + << "DONE\n"; abidiff_status s = abigail::tools_utils::ABIDIFF_OK; if (diff->has_changes()) @@ -2381,7 +2423,7 @@ create_maps_of_package_content(package& package, options& opts) is_ok = true; if (opts.verbose) emit_prefix("abipkgdiff", cerr) - << " Analysis of " << package.path() << " DONE\n"; + << " Analysis of linux package " << package.path() << " DONE\n"; return is_ok; }