Page MenuHomeFreeBSD

Mk/Uses/cargo.mk: Fix cargo-extract target
ClosedPublic

Authored by jbo on Dec 31 2023, 6:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 4:52 AM
Unknown Object (File)
Thu, May 9, 11:00 PM
Unknown Object (File)
Thu, May 9, 10:57 PM
Unknown Object (File)
Thu, May 9, 2:22 PM
Unknown Object (File)
Fri, Apr 26, 4:01 PM
Unknown Object (File)
Fri, Apr 26, 2:49 AM
Unknown Object (File)
Thu, Apr 25, 4:59 PM
Unknown Object (File)
Apr 18 2024, 11:36 AM
Subscribers

Details

Summary

Fix an issue where the cargo-extract target fails when a port sets DIST_SUBDIR.

PR: 275634


Note: This is my first commit touching Mk/. I'd suggest reviewing this extra carefully :)
My shell scripting skills are also below-average.

Test Plan

I have tested this with the following script:

#!/bin/sh

PORTS_DIR=/usr/ports
for d in $(portgrep -u cargo -o); do
	echo "Testing port: " $d
	dir=$PORTS_DIR/$d
	make -C $dir extract || echo $d >> failures.lst
done	

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jbo requested review of this revision.Dec 31 2023, 6:06 PM
jbo created this revision.
jbo edited the test plan for this revision. (Show Details)
jbo edited the summary of this revision. (Show Details)

lgtm as mentor, but I defer to rust for the context knowledge :D

tobik added a subscriber: tobik.

Same general problem as D39205. In https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275922 you can see it in distinfo too where crates that should go into DISTDIR/rust/crates now go into DISTDIR/jetbrains/rust/crates:

TIMESTAMP = 1702039441
SHA256 (jetbrains/rust/crates/autocfg-1.1.0.crate) = d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa
SIZE (jetbrains/rust/crates/autocfg-1.1.0.crate) = 13272
[...]

But that shouldn't block committing this patch as is.

This revision is now accepted and ready to land.Jan 5 2024, 12:19 PM
This revision was automatically updated to reflect the committed changes.