Skip to contentSkip to conversation

ref-variables: Given example for naming sources

PATCH In review Joshua Watt 2 participants 2 messages Oct 16, 2020 – Oct 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ref-variables: Given example for naming sources

Adds an example to SRC_URI that explains how to name sources in SRC_URI and how to associate SRCREVs and checksums with the names

---
 documentation/ref-manual/ref-variables.rst | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
documentation/ref-manual/ref-variables.rst +12 -2
index 316e8aabf..d65d0a4a5 100644
@@ -7236,8 +7236,18 @@ system and gives an overview of their function and contents.
          tree when using the Git fetcher is used.
 
       -  ``name`` - Specifies a name to be used for association with
-         ``SRC_URI`` checksums when you have more than one file specified
-         in ``SRC_URI``.
+         ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one
+         file or git repository specified in ``SRC_URI``. For example:
+         ::
+
+            SRC_URI = "git://example.com/foo.git;name=first \
+                       git://example.com/bar.git;name=second \
+                       http://example.com/file.tar.gz;name=third"
+
+            SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
+            SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
+            SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
+
 
       -  ``downloadfilename`` - Specifies the filename used when storing
          the downloaded file.
Signature · 1 line
2.28.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Joshua,

Quoted 20 lines · Joshua Watt

Adds an example to SRC_URI that explains how to name sources in SRC_URI and how to associate SRCREVs and checksums with the names

---
 documentation/ref-manual/ref-variables.rst | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
documentation/ref-manual/ref-variables.rst +2 -2
index 316e8aabf..d65d0a4a5 100644
@@ -7236,8 +7236,18 @@ system and gives an overview of their function and contents.
          tree when using the Git fetcher is used.
 
       -  ``name`` - Specifies a name to be used for association with
-         ``SRC_URI`` checksums when you have more than one file specified
-         in ``SRC_URI``.
+         ``SRC_URI`` checksums or :term:`SRCREV` when you have more than one
+         file or git repository specified in ``SRC_URI``. For example:

documentation/ref-manual/ref-variables.rst system and gives an overview of their function and contents. · line 7250

Quoted 10 lines
documentation/ref-manual/ref-variables.rst +10 -0
+         ::
+
+            SRC_URI = "git://example.com/foo.git;name=first \
+                       git://example.com/bar.git;name=second \
+                       http://example.com/file.tar.gz;name=third"
+
+            SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
+            SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
+            SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
+

Well, I discovered something today :)

Looking in poky, I found vulkan-demos recipe which has interesting SRCREVs:

```
SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf"
SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c"

SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \
           git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \
           git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0 \
	   ...
	   "

SRCREV = "4818f85916bf88c1ca8c2ed1a46e0e758651489e"
```

Would that benefit from an explanation in the same paragraph, should we "fix" the recipe or do we just ignore it exists :) ?

Otherwise, considering it's used in master poky the way you explain it:

Thanks,
Quentin