From: "Martin Liška" <mliska@suse.cz>
To: elfutils-devel@sourceware.org
Subject: [PATCH] debuginfod: print filename for "cannot open archive" error
Date: Wed, 17 Aug 2022 09:12:18 +0200 [thread overview]
Message-ID: <1d95d22d-9582-755a-9de1-3f5d8fc3ebe0@suse.cz> (raw)
Report the file that has such a problem so that one can inspect it.
Signed-off-by: Martin Liska <mliska@suse.cz>
---
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;
--
2.37.1
next reply other threads:[~2022-08-17 7:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 7:12 Martin Liška [this message]
2022-08-17 10:58 ` Frank Ch. Eigler
2022-08-17 11:18 ` [PATCH v2] " Martin Liška
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d95d22d-9582-755a-9de1-3f5d8fc3ebe0@suse.cz \
--to=mliska@suse.cz \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).