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
F140782793: D43259.id132402.diff
Sun, Dec 28, 12:00 AM
F140710084: D43259.diff
Sat, Dec 27, 4:14 AM
Unknown Object (File)
Fri, Dec 26, 1:19 PM
Unknown Object (File)
Fri, Dec 19, 4:14 AM
Unknown Object (File)
Sun, Dec 14, 12:54 PM
Unknown Object (File)
Sun, Dec 14, 12:54 PM
Unknown Object (File)
Sun, Dec 14, 12:54 PM
Unknown Object (File)
Sun, Dec 14, 12:54 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55179
Build 52068: arc lint + arc unit

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.