Starship: AUR install with RUA fails as PKGBUILD file is missing RUSTUP_TOOLCHAIN

Created on 18 Oct 2020  路  3Comments  路  Source: starship/starship

Bug Report

Current Behavior

rua install starship fails. rua is a build tool for ArchLinux, AUR. It runs makepkg in an isolated environment and installation produces the error:

==> Making package: starship 0.46.2-1 (Sun 18 Oct 2020 19:59:08 BST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading starship-0.46.2.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   126  100   126    0     0    364      0 --:--:-- --:--:-- --:--:--   364
100 5178k    0 5178k    0     0  1250k      0 --:--:--  0:00:04 --:--:-- 1454k
==> Validating source files with sha256sums...
    starship-0.46.2.tar.gz ... Passed
==> Extracting sources...
  -> Extracting starship-0.46.2.tar.gz with bsdtar
==> Starting build()...
error: no override and no default toolchain set
==> ERROR: A failure occurred in build().
    Aborting...
Build failed with exit code 4 in /home/harry/.cache/rua/build/starship

Expected Behavior

rua install starship correctly installs starship.

Possible Solution

As recommended by https://github.com/vn971/rua/issues/133 the PKGBUILD file should set

RUSTUP_TOOLCHAIN=stable cargo build --release ....

Workaround

Run rua install starship untill it fails, then: cd ~/.config/rua/pkg/starship && makepkg -si.

Environment

  • Starship version: starship 0.46.2
  • Shell type: zsh
  • Shell version: zsh 5.8 (x86_64-pc-linux-gnu)
  • Shell plugin manager: oh-my-zsh
  • Terminal emulator: ubuntu default
  • Operating system: arch linux
馃悰 bug

All 3 comments

Thanks for the heads up, and sorry for the late response--my life has been a little crazy recently.

In the unlikely event that users actually do want all their software built with nightly for some reason, I've modified the PKGBUILD with RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-stable}, which will select the stable chain if RUSTUP_TOOLCHAIN is not already defined in the user's environment.

I've made the appropriate changes to the PKGBUILD and pushed them, but I haven't bumped pkgrel because this is a build-system update, so anyone who already has starship installed shouldn't need to do a reinstall. Could you check to see if it works for you?

I can test by uninstslling and reinstalling? I will try this next time I am at my pc. :)

yep it works. Thanks a million!

Was this page helpful?
0 / 5 - 0 ratings