mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-25 01:34:34 +03:00
Merge pull request #2667 from cgwalters/deploy-require-repo
lib: Stop using old `ostree_sysroot_get_repo()` API
This commit is contained in:
commit
c93fb71913
@ -1807,7 +1807,6 @@ parse_os_release (const char *contents,
|
||||
*/
|
||||
static gboolean
|
||||
install_deployment_kernel (OstreeSysroot *sysroot,
|
||||
OstreeRepo *repo,
|
||||
int new_bootversion,
|
||||
OstreeDeployment *deployment,
|
||||
guint n_deployments,
|
||||
@ -1855,6 +1854,8 @@ install_deployment_kernel (OstreeSysroot *sysroot,
|
||||
if (!glnx_shutil_mkdir_p_at (sysroot->boot_fd, bootconfdir, 0775, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
OstreeRepo *repo = ostree_sysroot_repo (sysroot);
|
||||
|
||||
/* Install (hardlink/copy) the kernel into /boot/ostree/osname-${bootcsum} if
|
||||
* it doesn't exist already.
|
||||
*/
|
||||
@ -2378,13 +2379,6 @@ write_deployments_bootswap (OstreeSysroot *self,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
/* Need the repo to try and extract the versions for deployments.
|
||||
* But this is a "nice-to-have" for the bootloader UI, so failure
|
||||
* here is not fatal to the whole operation. We just gracefully
|
||||
* fall back to the deployment index. */
|
||||
g_autoptr(OstreeRepo) repo = NULL;
|
||||
(void) ostree_sysroot_get_repo (self, &repo, cancellable, NULL);
|
||||
|
||||
/* Only show the osname in bootloader titles if there are multiple
|
||||
* osname's among the new deployments. Check for that here. */
|
||||
gboolean show_osname = FALSE;
|
||||
@ -2402,7 +2396,7 @@ write_deployments_bootswap (OstreeSysroot *self,
|
||||
for (guint i = 0; i < new_deployments->len; i++)
|
||||
{
|
||||
OstreeDeployment *deployment = new_deployments->pdata[i];
|
||||
if (!install_deployment_kernel (self, repo, new_bootversion,
|
||||
if (!install_deployment_kernel (self, new_bootversion,
|
||||
deployment, new_deployments->len,
|
||||
show_osname, cancellable, error))
|
||||
return FALSE;
|
||||
|
@ -492,7 +492,6 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(OstreeRepo) repo = NULL;
|
||||
char *refs_to_fetch[] = { NULL, NULL };
|
||||
const char *from_revision = NULL;
|
||||
g_autofree char *origin_refspec = NULL;
|
||||
@ -506,8 +505,7 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
|
||||
else
|
||||
refs_to_fetch[0] = self->origin_ref;
|
||||
|
||||
if (!ostree_sysroot_get_repo (self->sysroot, &repo, cancellable, error))
|
||||
return FALSE;
|
||||
OstreeRepo *repo = ostree_sysroot_repo (self->sysroot);
|
||||
|
||||
if (self->origin_remote)
|
||||
origin_refspec = g_strconcat (self->origin_remote, ":", self->origin_ref, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user