libostree/upgrader: Add an API to retrieve an origin description

This will be used by "rpm-ostree upgrade".
This commit is contained in:
Colin Walters committed 2014-03-25 16:46:39 -04:00
1 parent 90883674a9
commit 9389b7961c
2 files changed
+16

No files matched your search

+14
View File
@@ -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