From f39eeee671cf52b25c7ea8798f56f493fc27b025 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 4 May 2018 08:57:37 -0400 Subject: [PATCH] db: Add some error prefixing around rpmdb loading In https://github.com/cockpit-project/cockpit/pull/9090#issuecomment-386564044 we're seeing: `Txn DownloadUpdateRpmDiff ... failed: open(O_TMPFILE): No such file or directory` Looking at the error paths in the rpmdb diff code, there's not really any error prefixing. Let's add some so this is easier to debug. Closes: #1356 Approved by: jlebon --- src/lib/rpmostree-package.c | 1 + src/libpriv/rpmostree-rpm-util.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/lib/rpmostree-package.c b/src/lib/rpmostree-package.c index d3c46082..e82e36b1 100644 --- a/src/lib/rpmostree-package.c +++ b/src/lib/rpmostree-package.c @@ -249,6 +249,7 @@ _rpm_ostree_package_list_for_commit (OstreeRepo *repo, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("Loading package list", error); g_autofree char *checksum = NULL; if (!ostree_repo_resolve_rev (repo, rev, FALSE, &checksum, error)) return FALSE; diff --git a/src/libpriv/rpmostree-rpm-util.c b/src/libpriv/rpmostree-rpm-util.c index bd77b074..63b60803 100644 --- a/src/libpriv/rpmostree-rpm-util.c +++ b/src/libpriv/rpmostree-rpm-util.c @@ -771,6 +771,7 @@ checkout_only_rpmdb (OstreeRepo *repo, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("rpmdb checkout", error); g_autofree char *commit = NULL; if (!ostree_repo_resolve_rev (repo, ref, FALSE, &commit, error)) return FALSE; @@ -804,6 +805,7 @@ get_sack_for_root (int dfd, DnfSack **out_sack, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("Loading sack", error); g_return_val_if_fail (out_sack != NULL, FALSE); g_autofree char *fullpath = glnx_fdrel_abspath (dfd, path);