FreeBSD Bugzilla – Attachment 209681 Details for
Bug 242416
Mk/Uses/cargo.mk: "make cargo-crates" fails to generate CARGO_CRATES with new Cargo.lock format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
cargo-crates.diff
cargo-crates.diff (text/plain), 1.54 KB, created by
Tobias Kortkamp
on 2019-12-04 11:37:53 UTC
(
hide
)
Description:
cargo-crates.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2019-12-04 11:37:53 UTC
Size:
1.54 KB
patch
obsolete
>Index: Mk/Scripts/cargo-crates.awk >=================================================================== >--- Mk/Scripts/cargo-crates.awk (revision 518965) >+++ Mk/Scripts/cargo-crates.awk (working copy) >@@ -6,6 +6,9 @@ > gl_tuple_len = 0 > crates_len = 0 > package_name = "<unknown>" >+ crate_name = "<unknown>" >+ crate_version = "<unknown>" >+ crate_source = "<unknown>" > > gitlab_sites["https://gitlab.com"] = 1 > gitlab_sites["https://gitlab.freedesktop.org"] = 1 >@@ -13,19 +16,37 @@ > gitlab_sites["https://gitlab.redox-os.org"] = 1 > } > >-/^"checksum .* .* \(registry\+.*\)" = ".*"/ { >- # $2: crate >- # $3: version >- # $4: url >- # $6: checksum >- crates[crates_len++] = sprintf("%s-%s", $2, $3) >-} >+/^name = ".*"/ { >+ crate_name = $3 >+ gsub(/"/, "", crate_name) > >-/^name = ".*"/ { > package_name = $3 > gsub("[^a-zA-Z_]", "", package_name) > } > >+/^version = ".*"/ { >+ crate_version = $3 >+ gsub(/"/, "", crate_version) >+} >+ >+/^source = ".*"/ { >+ crate_source = $3 >+ gsub(/"/, "", crate_source) >+} >+ >+/^\[\[package\]\]$/ { >+ add_crate() >+} >+ >+function add_crate() { >+ if (crate_source == "registry+https://github.com/rust-lang/crates.io-index") { >+ crates[crates_len++] = sprintf("%s-%s", crate_name, crate_version) >+ } >+ crate_name = "<unknown>" >+ crate_version = "<unknown>" >+ crate_source = "<unknown>" >+} >+ > function split_url(s) { > # scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment] > split(s, url_scheme, "://") >@@ -112,6 +133,8 @@ > } > > END { >+ add_crate() >+ > if (gh_tuple_len > 0 && ENVIRON["USE_GITHUB"] == "") { > printf "USE_GITHUB=\tnodefault\n" > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tobik
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 242416
: 209681