paketo-community / rustup

A Cloud Native Buildpack that provides Rustup and installs a Rust toolchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rustup does not run when changing from base to tiny stack

dmikusa opened this issue · comments

When you build on the base image, it will install Rust for gnu libc. If you switch to the tiny stack, Rustup should run and install Rust with musl glibc. Presently, it does not run.

Rustup (musl libc) 1.25.2: Contributing to layer
Downloading from https://static.rust-lang.org/rustup/archive/1.25.2/x86_64-unknown-linux-musl/rustup-init
Verifying checksum
Copying to /layers/paketo-community_rustup/rustup-init-musl/bin
Cargo: Contributing to layer
Rustup: Reusing cached layer
Rust: Contributing to layer
Installing Rust
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

This is a caching issue. The cache attributes for the Rustup layer should include the glibc type or the stack so when that changes it will rerun.

What you can do to work around this is to clear the buildpack cache. If you run your next pack build with the --clear-cache flag, that should clear it out and you should see this line go away Rustup: Reusing cached layer. Don't forget to remove that argument on subsequent builds.