Re: Adding Avahi and USB drive support to libostree



On Mon, 2017-04-03 at 14:16 +0100, Philip Withnall wrote:
On Fri, 2017-03-31 at 14:46 -0400, Colin Walters wrote:
On Thu, Mar 30, 2017, at 08:03 PM, Philip Withnall wrote:
*snip*

In that case, the process for working out which peers to download
from
would be (ignoring internet and locally-mounted repositories for
the

...

Yep, agree with 1..5 there!

Thanks, I guess the next step is working out the API.

=> Strawman API and implementation here:

https://github.com/pwithnall/ostree/tree/lan-and-usb

I’d appreciate feedback on the API; I’ll continue working on it
tomorrow. As the commit message says, this is unfinished in places and
unpolished everywhere else. It compiles, and that’s all I’ll guarantee.

Key bits of API:
 • OstreeRepoFinder and its implementations, which resolve ref names
into a list of OstreeRepoFinderResults (one per potential remote).
(Steps 1 and 2 of the algorithm.)
 • ostree_repo_find_updates(), which wraps invocation of
OstreeRepoFinder, and handles downloading summary files and commit
metadata in order to work out which remotes have the most up to date
commits. (Steps 3 to 4.5 of the algorithm).
 • ostree_repo_pull_updates(), which will function like
ostree_repo_pull(), except it will use the remote URIs given in the
list of OstreeRepoFinders it receives (typically from
ostree_repo_find_updates()). (Steps 4.5 to 5 of the algorithm.)

I’m unsure about whether to make OstreeRepoFinder and its
implementations public. For the moment, they’re private, but I suspect
they should end up being public so people can use custom instances of
them with tweaked properties.

OstreeRepoFinderResult probably needs to be renamed to something a bit
more general (it grew from its original use in the code), and I need to
revisit which metadata is stored in it.

Thanks,
Philip

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]