mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-22 06:50:47 +03:00
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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:
|
||||
* @repo: Repo
|
||||
|
@ -45,6 +45,8 @@ GKeyFile *ostree_sysroot_upgrader_get_origin (OstreeSysrootUpgrader *self);
|
||||
gboolean ostree_sysroot_upgrader_set_origin (OstreeSysrootUpgrader *self, GKeyFile *origin,
|
||||
GCancellable *cancellable, GError **error);
|
||||
|
||||
char *ostree_sysroot_upgrader_get_origin_description (OstreeSysrootUpgrader *self);
|
||||
|
||||
gboolean ostree_sysroot_upgrader_check_timestamps (OstreeRepo *repo,
|
||||
const char *from_rev,
|
||||
const char *to_rev,
|
||||
|
Loading…
x
Reference in New Issue
Block a user