OBS: Parametrized branch name in scmsync?

Hello!

I like to use single OBS Project definition to build and publish repositories for multiple openSUSE versions (LEAP 16.0, 16.1 and Tumbleweed) which is normally possible and I use it regularly.

But I have issue how to tell “shared” Package’s <scmsync> element to use specific branch for each repository, something like:

<package name="xsane" project="home:hpaluch-pil:pool:factory">
  <!-- ... -->
  <scmsync>https://src.opensuse.org/pool/xsane#{repo}</scmsync>
</package>

Currently I have to specify fixed branch name instead of {repo} which is problem, because I need:

  • factory for Tumbleweed repo
  • leap-16.0 for LEAP 16.0 repo
  • leap-16.1 for LEAP 16.1 repo

But it would mean that I have to setup complete copy of Project+Packages for each above distribution to have scmsync pointing to different branch.

Question: Is there some workaround - how to use single Project/packages in OBS for different scmsync branches in current OBS?

I haven’t found a way to use multiple revisions of source in a single package, and I think such a feature would require some overhaul of the UI in addition to the backend changes.

The farthest I can go is using a distinct package name for each branch in a project. And disable all build flags for the project, then enable them individually in the corresponding packages. eg.

Thank you, for your tip and example!

I’m fine with having dedicated package per repo, just need single project for all repositories to have single place to see build results - which is achieved with your solution.

Additionally, using your approach have another benefit: doing full project checkout will get contents of all branches so I can use Linux text processing tools to work with all branches at same time, which is generally very useful.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.