From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E4AAD3858D38 for ; Mon, 23 Jan 2023 20:27:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4AAD3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674505662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wY+oj+jP+Euu5TPfhBhugrYJ6ooruyxjalz0mIKGohs=; b=cELo7Ildejjoov7B3msFdTVFCdSecwW3GZk/NKoV3EBM0M8s9vD8KYdqdjcdgy+5VTn3PE Z6Oi9Jv7KJQ0VuhjMR9vll4Gv6TggVCvQjz/HxwWqwA6KvYk58D5ygjRcOUTbR0gkTewTF ulT22QoL7i6vt3SLAIzKm1e1coe7buU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-451-He1nOqhhPV2zAqBZPB5B3w-1; Mon, 23 Jan 2023 15:27:41 -0500 X-MC-Unique: He1nOqhhPV2zAqBZPB5B3w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 070988030A0 for ; Mon, 23 Jan 2023 20:27:41 +0000 (UTC) Received: from prarit.7a2m.lab.eng.bos.redhat.com (prarit-guest.7a2m.lab.eng.bos.redhat.com [10.16.222.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2A6B2026D2A; Mon, 23 Jan 2023 20:27:40 +0000 (UTC) From: Prarit Bhargava To: debugedit@sourceware.org Cc: Prarit Bhargava Subject: [PATCH] scripts/find-debuginfo.in: Add --no-per-file-msg Date: Mon, 23 Jan 2023 15:27:37 -0500 Message-Id: <20230123202737.3632441-1-prarit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.6 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 List-Id: Projects with a large number of compiled files end up with a large number of 'extracting debug info from' messages in the build log. In the case of the Fedora kernel these messages account for 8504 lines in the log, or 61% of the entire log [1]. Removing these lines make the log easier to view and comprehend for some projects, however, not all projects will want to silence these messages so suppressing them must be optional. Add a --no-per-file-msg which allows users to disable the per file scanning message and in its place output a single general message in the log. [1] https://kojipkgs.fedoraproject.org//packages/kernel/6.2.0/0.rc5.20230123git2475bf0250de.38.fc38/data/logs/x86_64/build.log Signed-off-by: Prarit Bhargava --- scripts/find-debuginfo.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in index b07a52fe4b98..f262b00cfcb1 100755 --- a/scripts/find-debuginfo.in +++ b/scripts/find-debuginfo.in @@ -38,6 +38,7 @@ Options: [--build-id-seed SEED] [--unique-debug-suffix SUFFIX] [--unique-debug-src-base BASE] +[--no-per-file-msg] [[-l filelist]... [-p 'pattern'] -o debuginfo.list] [builddir] @@ -94,6 +95,9 @@ will be called /usr/debug/src/. This makes sure the debug source dirs are unique between package version, release and achitecture (Use --unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}") +If --no-per-file-msg is given then the 'extract debuginfo from ...' +message is not output for each file. + All file names in switches are relative to builddir ('.' if not given). EOF } @@ -146,6 +150,9 @@ n_jobs=1 # exit early on --version or --help done=false +# Output the "extracting debug info from" message for each file. +per_file_msg=true + BUILDDIR=. out=debugfiles.list srcout= @@ -239,6 +246,9 @@ while [ $# -gt 0 ]; do srcout=$2 shift ;; + --no-per-file-msg) + per_file_msg=false + ;; --version) echo "find-debuginfo @VERSION@" done=true; @@ -437,7 +447,7 @@ do_file() get_debugfn "$f" [ -f "${debugfn}" ] && return - echo "extracting debug info from $f" + $per_file_msg && echo "extracting debug info from $f" # See also cpio SOURCEFILE copy. Directories must match up. debug_base_name="$RPM_BUILD_DIR" debug_dest_name="/usr/src/debug" @@ -544,6 +554,7 @@ n_files=$(wc -l <"$temp/primary") if [ $n_jobs -gt $n_files ]; then n_jobs=$n_files fi +$per_file_msg || echo "Extracting debuginfo from files ..." if [ $n_jobs -le 1 ]; then while read nlinks inum f; do do_file "$nlinks" "$inum" "$f" -- 2.39.1