libostree/upgrader: Add an API to retrieve an origin description
This will be used by "rpm-ostree upgrade".
This commit is contained in:
parent
90883674a9
commit
9389b7961c
|
|
@ -329,6 +329,20 @@ ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ostree_sysroot_upgrader_get_origin_description:
|
||||||
|
* @self: Upgrader
|
||||||
|
*
|
||||||
|
* Returns: A one-line descriptive summary of the origin, or %NULL if unknown
|
||||||
|
*/
|
||||||
|
char *
|
||||||
|
ostree_sysroot_upgrader_get_origin_description (OstreeSysrootUpgrader *self)
|
||||||
|
{
|
||||||
|
if (!self->origin)
|
||||||
|
return NULL;
|
||||||
|
return g_key_file_get_string (self->origin, "origin", "refspec", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ostree_sysroot_upgrader_check_timestamps:
|
* ostree_sysroot_upgrader_check_timestamps:
|
||||||
* @repo: Repo
|
* @repo: Repo
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ GKeyFile *ostree_sysroot_upgrader_get_origin (OstreeSysrootUpgrader *self);
|
||||||
gboolean ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self, GKeyFile *origin,
|
gboolean ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self, GKeyFile *origin,
|
||||||
GCancellable *cancellable, GError **error);
|
GCancellable *cancellable, GError **error);
|
||||||
|
|
||||||
|
char *ostree_sysroot_upgrader_get_origin_description (OstreeSysrootUpgrader *self);
|
||||||
|
|
||||||
gboolean ostree_sysroot_upgrader_check_timestamps (OstreeRepo *repo,
|
gboolean ostree_sysroot_upgrader_check_timestamps (OstreeRepo *repo,
|
||||||
const char *from_rev,
|
const char *from_rev,
|
||||||
const char *to_rev,
|
const char *to_rev,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue