All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch:crate: create versioned 'name' entries
@ 2023-04-05 10:16 Enrico Scholz
  2023-04-05 12:03 ` [bitbake-devel] " Frédéric Martinsons
  2023-04-05 12:21 ` [PATCH, v2] fetch2/crate: create versioned 'name' entries Enrico Scholz
  0 siblings, 2 replies; 21+ messages in thread
From: Enrico Scholz @ 2023-04-05 10:16 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Enrico Scholz

From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>

It is common for rust packages to depend on different versions of the
same crate.  E.g.

|    crate://crates.io/windows_x86_64_msvc/0.42.2 \
|    crate://crates.io/windows_x86_64_msvc/0.48.0 \

Identification only by the plain crate name makes the sha256sum
ambiguous

| SRC_URI[windows_x86_64_msvc.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
| SRC_URI[windows_x86_64_msvc.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"

and requires lot of manual work to fix the SRC_URI list.

Making the 'name' property unique by appending the version allows
direct copy & paste of reported sha256sum errors to complete the
crates list.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 lib/bb/fetch2/crate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/crate.py b/lib/bb/fetch2/crate.py
index 590dc9c12681..a7021e5b367c 100644
--- a/lib/bb/fetch2/crate.py
+++ b/lib/bb/fetch2/crate.py
@@ -72,7 +72,7 @@ class Crate(Wget):
         ud.url = "https://%s/%s/%s/download" % (host, name, version)
         ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version)
         if 'name' not in ud.parm:
-            ud.parm['name'] = name
+            ud.parm['name'] = '%s-%s' % (name, version)
 
         logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename']))
 
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-04-06 14:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 10:16 [PATCH] fetch:crate: create versioned 'name' entries Enrico Scholz
2023-04-05 12:03 ` [bitbake-devel] " Frédéric Martinsons
2023-04-05 12:09   ` Enrico Scholz
2023-04-05 12:21     ` Frédéric Martinsons
2023-04-05 12:24       ` Enrico Scholz
2023-04-05 12:50         ` Frédéric Martinsons
     [not found]         ` <17530ADB1695B5D1.3977@lists.openembedded.org>
2023-04-05 16:28           ` Frédéric Martinsons
2023-04-05 16:44             ` Enrico Scholz
2023-04-05 17:05               ` Frédéric Martinsons
2023-04-06  8:45                 ` Richard Purdie
2023-04-06 10:05                   ` Frédéric Martinsons
2023-04-06 10:15                     ` Richard Purdie
2023-04-06 10:20                   ` Enrico Scholz
2023-04-06 12:14                     ` Richard Purdie
2023-04-06 13:00                       ` Frédéric Martinsons
2023-04-06 13:44                         ` Richard Purdie
2023-04-06 13:57                           ` Frédéric Martinsons
2023-04-06 14:01                       ` Enrico Scholz
2023-04-06 14:18                       ` ';sha256sum=' attribute in SRC_URI (was: [bitbake-devel] [PATCH] fetch:crate: create versioned 'name' entries) Enrico Scholz
2023-04-06 14:46                         ` Frédéric Martinsons
2023-04-05 12:21 ` [PATCH, v2] fetch2/crate: create versioned 'name' entries Enrico Scholz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.