#51 API - mapping between ["module_name", "version"] and source of data
Closed 7 years ago Opened 7 years ago by msuchy.

I am trying to create Copr backend for Rida. In function buildroot_add_dependency() I get
["module_name", "version"]
and in this function I am supposed to add this module to buildroot of all builds.

In Copr that means I add a DNF repository to that build. So I need to get mapping between the module and the DNF repository.

Currently Rida somehow expose the Koji tag (in function get_module_tag()). But I need to progress more. To get from koji tag to repository.

@contyk told me that such API shoul be generic and it should provide "source of data". As it can be more than DNF repository. That is fine with me. But right now I will just care about DNF repositories anyway.


So after discussion with one of Copr developers, it seems we need to be able to get URL to repository from Koji tag. Since Koji is not hosting the built packages in form of repository, we would have to workaround that using some external service which would do the hosting.

Let's discuss that and write some conclusion here later.

@jkaluza changed the status to Closed

7 years ago

This is "just" half of the work. Your PR is mapping from tag to repo (thanks for that). We need to do the same for Copr (jkadlcik should be about to be finished with that) and then provide general method module_name_to_repo() which will be handled by koji builder using tag_to_repo() and in Copr builder using that different function.

@ralph changed the status to Open

7 years ago

We have that general method in GenericBuild.tag_to_repo, which calls the particular implementation based on the builder used.

What we should do here is to store the name of builder in PDC (maybe) to identify what builder has been used for particular module.

@frostyx, @msuchy is this still an issue we need to follow up on?

@ralph as I see it, we can close the issue now. There is method repo_from_tag for both KojiModuleBuilder and CoprModuleBuilder and method tag_to_repo wrapping them up in GenericBuilder.

Thank you and @jkaluza
for implementing it for us.

Metadata Update from @ralph:
- Issue status updated to: Closed (was: Open)

7 years ago

Login to comment on this ticket.

Metadata