From patchwork Wed Mar 22 16:31:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 66749 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 0942B385B517 for ; Wed, 22 Mar 2023 16:31:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0942B385B517 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679502676; bh=NFsdqSrti6eBr3+mRHbK0fGn0oCd9u3J4Rux9fLxafQ=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=RxesnD7O0gl9eTNYDTAKfJvxV4LoFl0GYsOxJoH2m9e/ObZlQX4qrumA/rJEU920u L0yz1KsXR0FKeowk821HyBW51lZ0NQXfO+XC6C857dC1ZKn4FuCfkDNPMOsNAMt1l4 a0HRBHjlPbuZpgO+AQKkJtFS4qgSsrgbDhgrst2o= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 339DF3858D3C for ; Wed, 22 Mar 2023 16:31:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 339DF3858D3C Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612--tcmAlRvOneNV4gax52jCg-1; Wed, 22 Mar 2023 12:31:06 -0400 X-MC-Unique: -tcmAlRvOneNV4gax52jCg-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5411f21f849so193490867b3.16 for ; Wed, 22 Mar 2023 09:31:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679502665; 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=NFsdqSrti6eBr3+mRHbK0fGn0oCd9u3J4Rux9fLxafQ=; b=sk3atmTocXBLpTXU2o09I3hGA6ihJDc/efEb2QZAN6+jxO0k2BHrsR4lNw/YWWQ1hF drMJVN0GWVKjWHRtGwpAQy8pfmxznzQqlT6McuZikj+8nlOzknH/d5VERYHFUTl23tfc DgdEkHWLe2kQXg2j6/5qa7PxGlEIv3W3agN7cSysT+Qrn5Ml0Xj9LgwsBrFRAcFd97Is UpsFC58OnDCjR9Da98fL0P5xAjmfhQihHweDrNTYqaTsKWDbloEaZkX77IMWteot1al5 yK9xnQRl51e8tLmXMSrsC9qdZkB4wYGRwb3bbEuHGaP02YshqJudLEP/EqfkPfCipOub OnSQ== X-Gm-Message-State: AAQBX9dOBL8ZOC+o9/fnXF2l7eygS5AeFRikB0OwxYQY2ejj2GbhFnhC tu/8l/2MlnK2nVHpzO7E2uWxRwnRJ6h/NPIII1gBr50hNLUitQekUDWMRfPLJVSKSi0i2SsZfIW tOH9jxNaFrWsWcH2UZViMYgCrX0YY9HhsnQPbU3o+utw4E737oxsN+zN/NoU0D407nTa2eM9FsD 1d X-Received: by 2002:a81:6bc1:0:b0:536:eb74:8089 with SMTP id g184-20020a816bc1000000b00536eb748089mr387553ywc.30.1679502665237; Wed, 22 Mar 2023 09:31:05 -0700 (PDT) X-Google-Smtp-Source: AKy350bEJ52Q0ZPuI3AiOOT91CMwgW+GpohCsJqYMDOEcQrIhr95XVc1BbWbqaDGIA+EI1IpMcLWDg== X-Received: by 2002:a81:6bc1:0:b0:536:eb74:8089 with SMTP id g184-20020a816bc1000000b00536eb748089mr387517ywc.30.1679502664661; Wed, 22 Mar 2023 09:31:04 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id w8-20020a05620a148800b0073bb0ef3a8esm11585841qkj.21.2023.03.22.09.31.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 09:31:04 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id E421B581C79; Wed, 22 Mar 2023 17:31:02 +0100 (CET) To: libabigail@sourceware.org Subject: [PATCH, applied] Bug 29911 - fedabipkgdiff forgets to provide some debuginfo RPMs to abipkgdiff Organization: Red Hat / France X-Operating-System: Fedora 38 X-URL: http://www.redhat.com Date: Wed, 22 Mar 2023 17:31:02 +0100 Message-ID: <874jqcoiih.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.8 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, Some packages like foo-utils.rpm can be associated with two debuginfo RPMs: One foo-utils-debuginfo.rpm and foo-debuginfo.rpm. This is because the foo-debuginfo.rpm contains debug info that has been factorized out of all the sub-packages of foo, foo-utils being one of those sub-packages. In those cases, fedabipkgdiff needs to provide foo-debuginfo.rpm and foo-utils-debuginfo.rpm to abipkgdiff so that it can find all the necessary debuginfo. This patch fixes fedabipkgdiff accordingly and adds some more logging to abipkgdiff to make it emit an explicit message for cases like this. * tools/abipkgdiff.cc (compare_to_self): Emit an error message when in verbose mode, for cases where we fail to find the alternate debug info. * tools/fedabipkgdiff (generate_comparison_halves): Always provide all associated debuginfo packages to abipkgdiff. Signed-off-by: Dodji Seketeli --- tools/abipkgdiff.cc | 13 +++++++++++++ tools/fedabipkgdiff | 18 +++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc index 46b920a1..a2b6ab8b 100644 --- a/tools/abipkgdiff.cc +++ b/tools/abipkgdiff.cc @@ -1716,6 +1716,19 @@ compare_to_self(const elf_file& elf, return abigail::tools_utils::ABIDIFF_ERROR; } + else if (c_status & abigail::fe_iface::STATUS_ALT_DEBUG_INFO_NOT_FOUND) + { + if (opts.verbose) + emit_prefix("abipkgdiff", cerr) + << "Could not read find alternate DWARF debug info for '" + << elf.path + << "'. You might have forgotten to provide a debug info package\n"; + + if (detailed_error_status) + *detailed_error_status = c_status; + + return abigail::tools_utils::ABIDIFF_ERROR; + } if (opts.verbose) emit_prefix("abipkgdiff", cerr) diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff index c05bd8b1..db23d5a3 100755 --- a/tools/fedabipkgdiff +++ b/tools/fedabipkgdiff @@ -612,26 +612,18 @@ def generate_comparison_halves(rpm_col1, rpm_col2): debuginfo_list1 = [] debuginfo_list2 = [] - # If this is a *devel* package we are looking at, then get all - # the debug info packages associated to with the main package - # and stick them into the resulting comparison half. - - if _rpm.is_devel: - debuginfo_list1 = rpm_col1.get_all_debuginfo_rpms(_rpm) - else: - debuginfo_list1.append(rpm_col1.get_matching_debuginfo(_rpm)) + # Get all debug info packages associated to with the main + # package and stick them into the resulting comparison half. + debuginfo_list1 = rpm_col1.get_all_debuginfo_rpms(_rpm) devel1 = rpm_col1.get_sibling_devel(_rpm) if global_config.self_compare: debuginfo_list2 = debuginfo_list1 devel2 = devel1 else: - if rpm2.is_devel: - debuginfo_list2 = rpm_col2.get_all_debuginfo_rpms(rpm2) - else: - debuginfo_list2.append(rpm_col2.get_matching_debuginfo(rpm2)) - devel2 = rpm_col2.get_sibling_devel(rpm2) + debuginfo_list2 = rpm_col2.get_all_debuginfo_rpms(rpm2) + devel2 = rpm_col2.get_sibling_devel(rpm2) yield (ComparisonHalf(subject=_rpm, ancillary_debug=debuginfo_list1,