Make failure to find packages fatal, add more error prefixing

To help debug https://bugzilla.redhat.com/show_bug.cgi?id=1925584
This commit is contained in:
Colin Walters 2021-02-06 20:13:27 +00:00 committed by OpenShift Merge Robot
parent d22d241754
commit 8ddaf0bbd6
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ add_package_refs_to_set (RpmOstreeRefSack *rsack,
/* TODO: convert this to an iterator to avoid lots of malloc */
if (pkglist->len == 0)
sd_journal_print (LOG_WARNING, "Failed to find any packages in root");
return glnx_throw (error, "Failed to find any packages in root");
else
{
for (guint i = 0; i < pkglist->len; i++)
@ -187,7 +187,7 @@ generate_pkgcache_refs (OstreeSysroot *sysroot,
return FALSE;
if (!add_package_refs_to_set (rsack, FALSE, referenced_pkgs, cancellable, error))
return FALSE;
return glnx_prefix_error (error, "Deployment index=%d", i);
}
/* In rojig mode, we need to also reference packages from the base; this
* is a different refspec format.

View File

@ -2260,7 +2260,7 @@ rpmostree_context_prepare (RpmOstreeContext *self,
DNF_PACKAGE_INFO_UPDATE,
DNF_PACKAGE_INFO_DOWNGRADE, -1);
if (!sort_packages (self, self->pkgs, cancellable, error))
return FALSE;
return glnx_prefix_error (error, "Sorting packages");
}
return TRUE;