Page MenuHomeFreeBSD

lang/rust: don't hardcode manifest files
ClosedPublic

Authored by jbeich on Jan 3 2019, 9:16 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jbeich created this revision.Jan 3 2019, 9:16 PM
tobik accepted this revision.Jan 8 2019, 3:45 PM
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
jbeich marked an inline comment as done.Jan 21 2019, 11:26 AM

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.

jbeich marked an inline comment as done.Jan 21 2019, 11:27 AM
This revision was automatically updated to reflect the committed changes.