diff options
| author | Phaedrus Leeds <mwleeds@protonmail.com> | 2021-10-13 11:52:19 -0700 |
|---|---|---|
| committer | Phaedrus Leeds <mwleeds@protonmail.com> | 2021-10-13 11:52:22 -0700 |
| commit | e71d20f12453d22eaee7aaeb6587015f8c289c24 (patch) | |
| tree | b77dc5a3c3d83f83e8ff66ad3c6a3fb2dd8aae22 | |
| parent | 4f6c13e7511dcef2965ed2c1d1a29982427fed0a (diff) | |
| download | flatpak-improve-ref-not-found-error.tar.gz | |
common: Improve a few REF_NOT_FOUND error messagesimprove-ref-not-found-error
This would have been helpful in my work on #4453
| -rw-r--r-- | common/flatpak-dir.c | 6 | ||||
| -rw-r--r-- | common/flatpak-installation.c | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 80ff5e5f..5cba0f5d 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -1229,7 +1229,8 @@ flatpak_remote_state_lookup_sparse_cache (FlatpakRemoteState *self, summary_v = get_summary_for_ref (self, ref); if (summary_v == NULL) return flatpak_fail_error (error, FLATPAK_ERROR_REF_NOT_FOUND, - _("No entry for %s in remote summary flatpak sparse cache "), ref); + _("No entry for %s in remote %s summary flatpak sparse cache"), + ref, self->remote_name); summary = var_summary_from_gvariant (summary_v); meta = var_summary_get_metadata (summary); @@ -1264,7 +1265,8 @@ flatpak_remote_state_lookup_sparse_cache (FlatpakRemoteState *self, } return flatpak_fail_error (error, FLATPAK_ERROR_REF_NOT_FOUND, - _("No entry for %s in remote summary flatpak sparse cache "), ref); + _("No entry for %s in remote %s summary flatpak sparse cache"), + ref, self->remote_name); } static DirExtraData * diff --git a/common/flatpak-installation.c b/common/flatpak-installation.c index 0daf3d66..28ddd0dc 100644 --- a/common/flatpak-installation.c +++ b/common/flatpak-installation.c @@ -2543,7 +2543,6 @@ flatpak_installation_fetch_remote_ref_sync_full (FlatpakInstallation *self, if (dir == NULL) return NULL; - ref = flatpak_decomposed_new_from_parts (flatpak_kinds_from_kind (kind), name, arch, branch, error); if (ref == NULL) return NULL; @@ -2565,7 +2564,8 @@ flatpak_installation_fetch_remote_ref_sync_full (FlatpakInstallation *self, return flatpak_remote_ref_new (ref, checksum, remote_name, state->collection_id, state); g_set_error (error, FLATPAK_ERROR, FLATPAK_ERROR_REF_NOT_FOUND, - "Reference %s doesn't exist in remote", flatpak_decomposed_get_ref (ref)); + "Reference %s doesn't exist in remote %s", + flatpak_decomposed_get_ref (ref), remote_name); return NULL; } |
