5f7a2f2979
generate-copyright builds COPYRIGHT.html by reading each dependency's
licence files out of the bootstrap vendor directory. In-tree crates are
filtered out earlier (reuse covers them), so everything reaching
load_important_files is assumed to have been vendored.
cargo vendor only vendors REGISTRY sources. The libc fork arrives as a
[patch.crates-io] PATH dependency (02-libc-redox-fork.patch) living at
local/sources/libc, outside the rust tree -- neither in-tree nor
vendored. Joining the vendor root produced a directory that does not
exist, and read_dir failed the whole install step with a bare
Error: I/O Error: Os { code: 2, kind: NotFound }
naming no crate and no path, after the compiler had already built.
A path dependency's licence files live beside its own Cargo.toml, and
for such a crate that directory is the source of truth -- our fork ships
LICENSE-APACHE and LICENSE-MIT there. Falling back to the manifest
directory keeps those notices IN COPYRIGHT.html rather than dropping
them, which matters under the free/libre software policy in
local/AGENTS.md. Suppressing the step would have lost them.
The manifest directory is threaded from get_metadata (which holds the
full cargo_metadata::Package) to load_important_files and dropped again,
so get_metadata_and_notices keeps its existing public return type.
Patch ordering: 03 must follow 02, which introduces the path dependency
that makes it necessary.
Upstream-reportable: any downstream using [patch.crates-io] with a path
source hits this.