From owner-svn-ports-head@freebsd.org Tue Sep 4 07:26:03 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B65A2FE5495; Tue, 4 Sep 2018 07:26:03 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66CBE8B44C; Tue, 4 Sep 2018 07:26:03 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 530F413F0B; Tue, 4 Sep 2018 07:26:03 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w847Q3Wb003840; Tue, 4 Sep 2018 07:26:03 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w847Q3pi003839; Tue, 4 Sep 2018 07:26:03 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201809040726.w847Q3pi003839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Tue, 4 Sep 2018 07:26:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478931 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 478931 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 07:26:03 -0000 Author: tobik Date: Tue Sep 4 07:26:02 2018 New Revision: 478931 URL: https://svnweb.freebsd.org/changeset/ports/478931 Log: Mk/Uses/cargo.mk: Let 'cargo-crates' generate Cargo.lock if it does not exist This will make maintaining ports easier when upstream does not provide a Cargo.lock on its own. It uses the crate registry and will output the newest crate versions available based on the restrictions in Cargo.toml. As such subsequent runs of `make cargo-crates` might not generate the same output. Upstream should still be encouraged to provide Cargo.lock if possible. Requested by: mat Differential Revision: https://reviews.freebsd.org/D17003 Modified: head/Mk/Uses/cargo.mk Modified: head/Mk/Uses/cargo.mk ============================================================================== --- head/Mk/Uses/cargo.mk Tue Sep 4 06:54:09 2018 (r478930) +++ head/Mk/Uses/cargo.mk Tue Sep 4 07:26:02 2018 (r478931) @@ -253,8 +253,15 @@ do-test: # Helper targets for port maintainers # -# cargo-crates will output the crates list from Cargo.lock. +# cargo-crates will output the crates list from Cargo.lock. If there +# is no Cargo.lock for some reason, try and generate it first. cargo-crates: extract + @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ + ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ + ${CARGO_CARGO_RUN} generate-lockfile \ + --manifest-path ${CARGO_CARGOTOML} \ + --verbose; \ + fi @${SETENV} USE_GITHUB=${USE_GITHUB} \ ${AWK} -f ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK}