openSUSE:Build Service Concept project linking

Jump to: navigation, search

Project Linking

Source Link

OBS 2.0 offers a way to reuse all sources from another project. This can be a local project or a project on a remote OBS instance. To link a project add a link element to your project meta file, for example via

osc meta prj -e YOUR_PROJECT

A link to make all source of openSUSE:Factory available would look like this:

<project name="openSUSE:Factory:Staging">
 <title>openSUSE Factory Staging</title>
 <description>This is a staging project for openSUSE:Factory. Critical components get tested here before they get submitted to openSUSE:Factory.
 </description>
 <link project="openSUSE:Factory"/>
 <person role="maintainer" userid="adrianSuSE"/>
 ...

All source packages which are available in openSUSE:Factory are now also available openSUSE:Factory:Staging project. They can be checked out or branched. Please note that they do not get listed by default, when you list the project content.

Rebuild mechanisms

Linked sources do not get rebuilt by default when linking a project. You can rebuild them with two different mechanisms. The obvious one is to rebuild all sources again in your project. This can be done by setting the linkedbuild attribute to "all":

 <repository linkedbuild="all" name="standard">
 ...
   <arch>i586</arch>
 ...
 </repository>

In this case all packages get rebuild in the same way. Except that in case changed or additional package sources may exists in your project these will be picked. You can also disable package builds by creating the package in your project and set it to build disabled.

Another way to do the rebuild is via just rebuild packages which are influenced by your own packages. A setup can look like this:

 <repository linkedbuild="localdep" name="localdep">
   <path repository="standard" project="openSUSE:Factory"/>
   <arch>i586</arch>
   ...
 </repository>

This will reuse the binaries defined via the path element. By default no package will build and all packages will be stated as "excluded". But when a package get added to your project this and all depending packages will be rebuild.

This is especially useful to test new packages which modify the provides and requires.

Publish Behaviour

When a linked project is published, all binaries from rebuilt packages are published but any binaries from the source project which are not rebuilt are not published.

Any installation should have repos from both the <link> project and the source project.

Link Chains

Creating a <link> to a project which is itself a <link> is permitted. Unusual behaviour should be reported (and noted here).

Linked Projects and Remote OBS links

Project link works over inter-OBS links but does have some bugs.

Changing the packages in linked project

The project link does not create new source instances of packages. You need to create them manually in addition for example via the "osc branch" command. Afterward you will be able to change the source in the linking project of that package without affecting the other one.