Page MenuHomeFreeBSD

lang/rust: don't hardcode manifest files
ClosedPublic

Authored by jbeich on Jan 3 2019, 9:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 11 2024, 1:58 AM
Unknown Object (File)
Jan 28 2024, 6:02 PM
Unknown Object (File)
Jan 28 2024, 6:02 PM
Unknown Object (File)
Jan 27 2024, 12:08 PM
Unknown Object (File)
Dec 23 2023, 3:58 AM
Unknown Object (File)
Dec 20 2023, 2:34 AM
Unknown Object (File)
Dec 19 2023, 11:14 PM
Unknown Object (File)
Nov 25 2023, 2:29 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

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

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 โ†—(On Diff #52527)

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 โ†—(On Diff #52527)

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.