- packages are linked via a
_link
file:
<link project="devel:languages:ruby" package="ruby2.6" baserev="d8b8358e9e7aa6fe732ceb2112fd227c">
<patches>
<!-- <branch /> for a full copy, default case -->
<!-- <apply name="patch" /> apply a patch on the source directory -->
<!-- <topadd>%define build_with_feature_x 1</topadd> add a line on the top (spec file only) -->
<!-- <add name="file.patch" /> add a patch to be applied after %setup (spec file only) -->
<!-- <delete name="filename" /> delete a file -->
</patches>
</link>
ruby2.6
in Virtualization:vagrant is just link to devel:languages:ruby/ruby2.6:
<link project="devel:languages:ruby" package="ruby2.6">
<patches>
</patches>
</link>
which produces this <linkinfo>
(via GET
https://api.opensuse.org/source/Virtualization:vagrant/ruby2.6?expand=0
):
<linkinfo
project="devel:languages:ruby" package="ruby2.6"
srcmd5="79e1007e6c69fc2b2161a462fd619346"
xsrcmd5="06c51075393fe15fe340289afec7f2ed"
lsrcmd5="f71d3715b36d6a5100ada5c7ede53032"/>
or this with expanded sources:
<linkinfo project="devel:languages:ruby" package="ruby2.6"
srcmd5="79e1007e6c69fc2b2161a462fd619346"
lsrcmd5="f71d3715b36d6a5100ada5c7ede53032"/>
the attributes appear to have the following meaning:
srcmd5
: md5 hash of the expanded sources of the latest revision of the package that is being linked to (here:devel:languages:ruby/ruby2.6
)lsrcmd5
: md5 hash of the unexpanded sources of the latest revision of package that contains the_link
(here:Virtualization:vagrant/ruby2.6
)xsrcmd5
: md5 hash of the expanded sources of the latest revision of package that contains the_link
(here:Virtualization:vagrant/ruby2.6
)
ruby2.6
in devel:languages:ruby links to openSUSE:Factory/ruby2.6:
<link project="openSUSE:Factory" baserev="d8b8358e9e7aa6fe732ceb2112fd227c">
<patches>
<branch/>
</patches>
</link>
which results in this <linkinfo>
for the unexpanded sources:
<linkinfo project="openSUSE:Factory" package="ruby2.6"
srcmd5="d8b8358e9e7aa6fe732ceb2112fd227c"
baserev="d8b8358e9e7aa6fe732ceb2112fd227c"
xsrcmd5="79e1007e6c69fc2b2161a462fd619346"
lsrcmd5="05e518fbd4c8058d539fd44156a8d09e"/>
and for the expanded:
<linkinfo project="openSUSE:Factory" package="ruby2.6"
srcmd5="d8b8358e9e7aa6fe732ceb2112fd227c"
baserev="d8b8358e9e7aa6fe732ceb2112fd227c"
lsrcmd5="05e518fbd4c8058d539fd44156a8d09e"/>
the attributes appear to have the following meaning:
srcmd5
: md5 hash of the sources of the package that is being linked to (hereopenSUSE:Factory/ruby2.6
)baserev
: this value is taken from the_link
file and is the same assrcmd5
lsrcmd5
: md5 hash of the source files of the unexpanded package that contains the_link
(heredevel:languages:ruby/ruby2.6
)xsrcmd5
: md5 hash of the source files of the expanded sources of the package containing the_link
(heredevel:languages:ruby/ruby2.6
)
ruby2.6
in devel:languages:ruby links to openSUSE:Factory/ruby2.6 let’s take a- look at revision 15 (srcmd5:
e4f3b3aeaa7a30e9c91eb94edf902c8c
, bydarix
, commited on <2019-02-25 Mon 21:36>) - unexpanded linkinfo:
<linkinfo project="openSUSE:Factory" package="ruby2.6"
srcmd5="d8b8358e9e7aa6fe732ceb2112fd227c"
baserev="57fb883a2c94fade46f6bf2615d37ed9"
xsrcmd5="8f4f4ddb9e351829dbd0c6a8f180c44f"
lsrcmd5="e4f3b3aeaa7a30e9c91eb94edf902c8c"/>
- expanded linkinfo:
<linkinfo project="openSUSE:Factory" package="ruby2.6"
srcmd5="d8b8358e9e7aa6fe732ceb2112fd227c"
baserev="57fb883a2c94fade46f6bf2615d37ed9"
lsrcmd5="e4f3b3aeaa7a30e9c91eb94edf902c8c"/>
which gives us the following meaning of the attributes:
srcmd5
: md5 hash of HEAD of the expanded sources of the package that is being linked to (openSUSE:Factory/ruby2.6
)baserev
: taken from the_link
file from devel:languages:ruby/ruby2.6 at revision 15, this is the revision at which the package was branched of fromopenSUSE:Factory/ruby2.6
lsrcmd5
: md5 hash of the unexpanded sources ofdevel:languages:ruby/ruby2.6
at revision 15xsrcmd5
: md5 hash of the expanded sources ofdevel:languages:ruby/ruby2.6
at revision 15
_link
files can specify specific revisions too, e.g. OBS:Server:Unstable/rubygem-rack has the following_link
at revision 16:
<link baserev="1e95a9532dc805f63f1769f099d7073d" package="rubygem-rack" project="devel:languages:ruby:extensions" rev="6e7876a909141a9340d68f47e5d8e4ac" vrev="49">
<patches>
<apply name="project.diff" />
</patches>
</link>
⇒ if the project specifies a rev, then we should prefer that