Date: Wed, 7 Aug 2019 10:37:10 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r508310 - head/Mk/Scripts Message-ID: <201908071037.x77AbAfg063933@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Wed Aug 7 10:37:10 2019 New Revision: 508310 URL: https://svnweb.freebsd.org/changeset/ports/508310 Log: Mk/Uses/cargo.mk: cargo-crates to flag unknown git hosts To avoid some head scratching print a warning instead of being silent when encountering unhandled git hosts. Modified: head/Mk/Scripts/cargo-crates.awk Modified: head/Mk/Scripts/cargo-crates.awk ============================================================================== --- head/Mk/Scripts/cargo-crates.awk Wed Aug 7 09:59:52 2019 (r508309) +++ head/Mk/Scripts/cargo-crates.awk Wed Aug 7 10:37:10 2019 (r508310) @@ -72,7 +72,9 @@ function split_url(s) { tag = url["fragment"] } + added = 0 if (url["host"] == "github.com") { + added = 1 gh_tuple[gh_tuple_len++] = sprintf(\ "%s:%s:%s:%s", account, project, tag, package_name) } else { @@ -88,8 +90,13 @@ function split_url(s) { gl_tuple[gl_tuple_len++] = sprintf(\ "%s:%s:%s:%s:%s", site, account, project, tag, package_name) } + added = 1 break } + } + + if (!added) { + printf "Warning: Ignoring git source on line %d: %s\n", NR, $3 > "/dev/stderr" } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908071037.x77AbAfg063933>