From patchwork Wed Aug 17 07:12:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 56798 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 73D803857C4B for ; Wed, 17 Aug 2022 07:12:26 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 1606C38582BA for ; Wed, 17 Aug 2022 07:12:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1606C38582BA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3A59933B2F; Wed, 17 Aug 2022 07:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1660720339; h=from:from:reply-to: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=toaii09Z3cbo/7+WJsjwpov1floSISKDLnE2Silk5UI=; b=cHzenrrzS1pN6LNxynz6Jz6spaksWTpyqcjnhC/vWRdpFt74UpavAvtRwQ8YWj6dV6Iazw lDnARtOGDy0WrliAEiATOIfdQ4jRwymRWfRLeNwSdDHFgZmYmx/vGBkW0cG7FMU8bFYseD 885tOBNOHju4SSy7uIXmCvJeX7+WdQA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1660720339; h=from:from:reply-to: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=toaii09Z3cbo/7+WJsjwpov1floSISKDLnE2Silk5UI=; b=ABVmgZW+pRWTSupVHYFhJ5s27yN/Etk0MQhdSaGYN9/05dLEGO848WF1DVPJMhzkL5+UG1 ClBGwKrgI5PBiqBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 207F613A8E; Wed, 17 Aug 2022 07:12:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bBF7BtOU/GLXNgAAMHmgww (envelope-from ); Wed, 17 Aug 2022 07:12:19 +0000 Message-ID: <1d95d22d-9582-755a-9de1-3f5d8fc3ebe0@suse.cz> Date: Wed, 17 Aug 2022 09:12:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] debuginfod: print filename for "cannot open archive" error To: elfutils-devel@sourceware.org Content-Language: en-US X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" Report the file that has such a problem so that one can inspect it. Signed-off-by: Martin Liska --- debuginfod/debuginfod.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 9245be53..67683354 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -1714,7 +1714,7 @@ handle_buildid_r_match (bool internal_req_p, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + throw archive_exception(a, "cannot open archive " + b_source0 + " from pipe"); // archive traversal is in three stages, no, four stages: // 1) skip entries whose names do not match the requested one @@ -2973,7 +2973,7 @@ archive_classify (const string& rps, string& archive_extension, rc = archive_read_open_FILE (a, fp); if (rc != ARCHIVE_OK) - throw archive_exception(a, "cannot open archive from pipe"); + throw archive_exception(a, "cannot open archive " + rps + " from pipe"); if (verbose > 3) obatched(clog) << "libarchive scanning " << rps << endl;