Skip to content

bootstrap tries to create prefix without taking DESTDIR into account #77721

Closed
@gyakovlev

Description

@gyakovlev

8e7606f uncovered a regression in bootstrap

The usual distribution/packager workflow is

define prefix as path intended prefix for installation.
during install phase define DESTDIR, so installation is dumped there to be packed up by package manager.

but with 8e7606f installer tries to create a prefix, ignoring destdir.

expected behaviour is to create ${DESTDIR}/${prefix}

so if prefix=/usr it works fine, as /usr always exists. and it will install to ${DESTDIR}/usr/...
if prefix=/usr/lib/rust/$ver , bootstrap will attempt to create prefix directory directly if it does not exist yet, but it should prepend DISTDIR at this step, as creating directories on host filesystem is not allowed in sandboxed builds, and it will fail if building as non-root user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions