Skip to content

Allow other repository implementations

Zygmunt Krynicki requested to merge feature/repo-iface into master

The initial netotad simply loaded an fsrepo and used it directly. Over time it was performing less and less operations on the fsrepo internals and used more methods which might allow other implementations.

We now need NetOTA to provide a repository with a test backend for SysOTA unit tests. For that we must completely isolate fsrepo from the handler code, so that other handlers can be used as well.

The new Repo interface exposes the set query methods through. Query{Packages,Streams,Archives}. Previously all those methods took a fsrepo-specific QueryOption. Now QueryOption becomes a dummy marker interface and Repo offers a way to create specific options for filtering by package name and stream name.

The handler no longer takes an fsrepo but instead uses the interface type. This makes it almost possible to expose the handler as a library function.

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

Merge request reports