Skip to content

Commit

Permalink
db: Add some error prefixing around rpmdb loading
Browse files Browse the repository at this point in the history
In cockpit-project/cockpit#9090 (comment)
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
  • Loading branch information
cgwalters authored and rh-atomic-bot committed May 4, 2018
1 parent 5037c85 commit f39eeee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/rpmostree-package.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/libpriv/rpmostree-rpm-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f39eeee

Please sign in to comment.