Commit Graph

6 Commits

Author SHA1 Message Date
Matthew Barnes
63d7ff8d5f daemon: Add rpmostreed_parse_revision()
Determines a revision argument to either be a SHA256 checksum or a version
metadata value.

The revision string may have a "revision=" prefix to denote a SHA256
checksum, or a "version=" prefix to denote a version metadata value.  If
the revision string lacks either prefix, the function attempts to infer
the type of revision.  The prefixes are case-insensitive.
2015-11-06 09:10:48 -05:00
Matthew Barnes
316f927aef daemon: Add rpmostreed_repo_lookup_cached_version()
Similar to rpmostreed_repo_lookup_version(), except without pulling from
a remote repository.  It traverses whatever commits are available in the
local repository.
2015-11-06 09:10:48 -05:00
Matthew Barnes
b3ecdd10b6 daemon: Add primitives for version lookup
rpmostreed_repo_pull_ancestry() downloads an ancestry of commit objects
starting from a given refspec.  An optional visitor function is called
for each commit object.  The visitor function can stop the recursion,
such as when looking for a particular commit.

rpmostreed_repo_lookup_version() builds on this by supplying a visitor
function that examines commit metadata for a particular version value.
When the version value is found, the commit's checksum is returned to
the caller.
2015-11-06 09:10:48 -05:00
Giuseppe Scrivano
b5cd3f2d1e rpmostreed: refactor common code in the new function rpmostreed_reboot
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-10-07 08:22:36 +02:00
Matthew Barnes
22c5d5a654 daemon: Add rpmostreed_sysroot_load_state()
Replaces rpmostreed_load_sysroot_and_repo() with a slightly more
convenient API.
2015-09-09 22:00:05 -04:00
Matthew Barnes
aaadcba77b daemon: Rename all the things!
Use 'rpmostreed' as the symbol prefix.
2015-09-09 22:00:05 -04:00