svn commit: r508230 - head/Mk/Scripts

Tobias Kortkamp tobik at FreeBSD.org
Tue Aug 6 06:43:44 UTC 2019


Author: tobik
Date: Tue Aug  6 06:43:43 2019
New Revision: 508230
URL: https://svnweb.freebsd.org/changeset/ports/508230

Log:
  Mk/Uses/cargo.mk: Fix cargo-crates to not output identical GH_TUPLE entries
  
  For example, in audio/spotifyd some crates have their sources on
  GitHub instead of crates.io and share the same repository and commit
  in Cargo.lock like
  
  [[package]]
  name = "librespot"
  source = "git+https://github.com/librespot-org/librespot.git#4e3576ba7c6146cf68e1953daeec929d619b26b1"
  
  [[package]]
  name = "librespot-audio"
  source = "git+https://github.com/librespot-org/librespot.git#4e3576ba7c6146cf68e1953daeec929d619b26b1"
  
  Based on this cargo-crates.awk would naively generate multiple
  identical entries like
  
  librespot-org:librespot:4e3576ba7c6146cf68e1953daeec929d619b26b1:librespot
  librespot-org:librespot:4e3576ba7c6146cf68e1953daeec929d619b26b1:librespotaudio
  
  This adds a lot of extra noise to the port and distinfo and is not
  really needed for anything.

Modified:
  head/Mk/Scripts/cargo-crates.awk

Modified: head/Mk/Scripts/cargo-crates.awk
==============================================================================
--- head/Mk/Scripts/cargo-crates.awk	Tue Aug  6 06:41:51 2019	(r508229)
+++ head/Mk/Scripts/cargo-crates.awk	Tue Aug  6 06:43:43 2019	(r508230)
@@ -50,7 +50,8 @@ function split_url(s) {
 	url["port"] = url_host[2]
 }
 
-/^source = "git\+(https|http|git):\/\/github.com\/.*#.*"/ {
+!gh_tuple_seen[$0] && /^source = "git\+(https|http|git):\/\/github.com\/.*#.*"/ {
+	gh_tuple_seen[$0] = 1
 	split_url(substr($3, 1, length($3) - 1))
 	
 	split(url["path"], path, "/")


More information about the svn-ports-all mailing list