Page MenuHomeFreeBSD

lang/rust: don't hardcode manifest files
ClosedPublic

Authored by jbeich on Jan 3 2019, 9:16 PM.
Tags
None
Referenced Files
F106410862: D18737.diff
Mon, Dec 30, 7:04 AM
Unknown Object (File)
Nov 23 2024, 6:58 AM
Unknown Object (File)
Oct 31 2024, 5:46 PM
Unknown Object (File)
Oct 16 2024, 5:32 AM
Unknown Object (File)
Oct 14 2024, 10:56 PM
Unknown Object (File)
Oct 14 2024, 10:56 PM
Unknown Object (File)
Oct 13 2024, 5:38 PM
Unknown Object (File)
Oct 12 2024, 1:36 PM
Subscribers

Details

Summary

After rP489132 lang/rust-nightly can omit components if they fail to build which doesn't play well with lang/rust hardcoding list of manifest files and what to strip(1). Given missing-tools=false is default since Rust 1.31.0 let's optimize.

An example error this review tries to fix:

Build completed successfully in 0:05:38
for f in lib/rustlib/manifest-cargo  lib/rustlib/manifest-clippy-preview  lib/rustlib/manifest-rls-preview  lib/rustlib/manifest-rustc  lib/rustlib/manifest-rustfmt-preview  lib/rustlib/manifest-rust-analysis-x86_64-unknown-freebsd  lib/rustlib/manifest-rust-std-x86_64-unknown-freebsd lib/rustlib/manifest-rust-docs; do  /usr/bin/sed -i.bak -E  -e 's|:/wrkdirs/usr/ports/lang/rust-nightly/work/stage|:|'  -e 's|(man/man[1-9]/.*\.[0-9])|\1.gz|'  /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f;  /bin/rm -f /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f.bak;  echo "/usr/local/$f" >> /wrkdirs/usr/ports/lang/rust-nightly/work/.PLIST.mktmp;  /usr/bin/awk ' /^file:/ {  file=$0;  sub(/^file:/, "", file);  print file;  }  /^dir:/ {  dir=$0;  sub(/^dir:/, "", dir);  system("find /wrkdirs/usr/ports/lang/rust-nightly/work/stage" dir " -type f | /usr/bin/sed -E -e \"s|/wrkdirs/usr/ports/lang/rust-nightly/work/stage||\"");  }'  /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/$f >> /wrkdirs/usr/ports/lang/rust-nightly/work/.PLIST.mktmp;  done
sed: /wrkdirs/usr/ports/lang/rust-nightly/work/stage/usr/local/lib/rustlib/manifest-rls-preview: No such file or directory
*** Error code 1
Test Plan

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 21822
Build 21090: arc lint + arc unit

Event Timeline

tobik added a subscriber: tobik.

Have you checked that the package lists are actually the same before and after the change? The Poudriere logs do not completely show this.

Without actually test building, this change looks ok to me on the surface, so I'm going to accept it.

lang/rust/Makefile
222

Can you change it to ECHO_CMD? Per bsd.commands.mk ${ECHO} should not be used since it might be set to just true.

This revision is now accepted and ready to land.Jan 8 2019, 3:45 PM

Have you checked that the package lists are actually the same before and after the change?

Yes, pkg info -ql rust (1.32.0) is identical on 11.2 amd64.

Without actually test building, this change looks ok to me on the surface, so I'm going to accept it.

All consumers were tested as part of D18858.

lang/rust/Makefile
222

I see you've done it in rP490479.

This revision was automatically updated to reflect the committed changes.
jbeich marked an inline comment as done.