Skip to content

Commit

Permalink
Mk/Uses/cargo.mk: Fix crate name and version split (take 2)
Browse files Browse the repository at this point in the history
cargo.mk is still too eager in splitting a crate's name and version
in two when the name contains a dash followed by a number.  For
example with utf-8-0.7.4 the wrong URL ends up being used in
MASTER_SITES

  .../utf/8-0.7.4/download/...

instead of

  .../utf-8/0.7.4/download/...

PR:		230413
Reported by:	Thomas Hurst <tom@hur.st>
  • Loading branch information
tobik authored and tobik committed Aug 7, 2018
1 parent 26493d7 commit bd81ca2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Mk/Uses/cargo.mk
Expand Up @@ -38,7 +38,7 @@ CARGO_DIST_SUBDIR?= rust/crates

# Generate list of DISTFILES.
.for _crate in ${CARGO_CRATES}
MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/-[0-9].*$//}/${_crate:C/^.*-([0-9].*)/\1/}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g}
MASTER_SITES+= ${MASTER_SITES_CRATESIO}/${_crate:C/^(.*)-[0-9].*/\1/}/${_crate:C/^.*-([0-9].*)/\1/}/download?dummy=/:cargo_${_crate:S/-//g:S/.//g}
DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}.tar.gz:cargo_${_crate:S/-//g:S/.//g}
.endfor

Expand Down

0 comments on commit bd81ca2

Please sign in to comment.