Page MenuHomeFreeBSD

Improve URL subsitution for custom crates whit CARGO_USE_GIT[HUB|LAB]

Authored by pizzamig on Apr 17 2021, 9:58 AM.



While maintaing a rust application, I found a cargo.toml that specifies
the git URL with { git="https://..." }, expects a form like { git = "https://..." }.
This patch improve the regex making the spaces around the '=' optional

Test Plan

Build all the ports using the CARGO_USE_GIT[HUB|LAB]
List of origins found with

grep -Rl ^CARGO_USE_GIT...= | xargs dirname | sort

Diff Detail

R11 FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pizzamig edited the summary of this revision. (Show Details)
pizzamig edited the test plan for this revision. (Show Details)
pizzamig edited reviewers, added: rust; removed: tobik.
pizzamig added a subscriber: tobik.

All ports that are affected by this are tagged with CARGO_USE_GITHUB and CARGO_USE_GITLAB. Assuming those ports all build (or alternatively if you have checked that the contents of Cargo.toml are the same before and after) then this is approved if you remove the superfluous [].


Why do you wrap the space in []? [ starts a list of characters but there is only one char in there AFAICT.

Remove useless [ ], as suggested by tobik@

Please commit it. Thanks.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 19 2021, 9:09 AM
This revision was automatically updated to reflect the committed changes.