ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.6k stars 970 forks source link

[Bug]: scoop install llvm@13.0.1 fails due to current autoupdate file list not matching old version's file list #5621

Open shinymerlyn opened 8 months ago

shinymerlyn commented 8 months ago

Prerequisites

Package Name

llvm@13.0.1

Expected/Current Behaviour

Expected: Downloads and installs the llvm package at version 13.0.1 (for my win64 architecture)

Actual: Fails to validate the hash of the LLVM-13.0.1-woa64 package (arm64 architecture) because in version 13 they didn't release an exe file for that arch, but released a zip file instead.

I have tried also adding the -a win64 flag (matching the key in the .json for the win64 arch of the llvm package. not sure if that's the right flag or not). It still tried to download all architectures and validate the hashes for them, and failed to install because of the failed download.

Steps to Reproduce

PS> scoop update
Updating Scoop...
Updating 'extras' bucket...
Updating 'main' bucket...
Updating 'sysinternals' bucket...
Updating 'versions' bucket...
Scoop was updated successfully!
PS> scoop install llvm@13.0.1
WARN  Given version (13.0.1) does not match manifest (18.1.1)
WARN  Attempting to generate manifest for 'llvm' (13.0.1)
Autoupdating llvm
Downloading LLVM-13.0.1-win32.exe to compute hashes!
Loading LLVM-13.0.1-win32.exe from cache
Computed hash: e3fe488076686de281a334ade7bb3cbc6080b009782d39d2ac024f8bd897be4b
Downloading LLVM-13.0.1-win64.exe to compute hashes!
Loading LLVM-13.0.1-win64.exe from cache
Computed hash: 9d15be034d52ec57cfc97615634099604d88a54761649498daa7405983a7e12f
Downloading LLVM-13.0.1-woa64.exe to compute hashes!
The request was aborted: The connection was closed unexpectedly.
URL https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/LLVM-13.0.1-woa64.exe#/dl.7z is not valid
Could not install llvm@13.0.1

Possible Solution

I don't know the current set of scoop features (yet) that might be able to work around this.

Only validating for the current/specified arch would probably help.

Being able to specify the set of files on a per-version basis might help. Maybe that's already a feature? If so, I can submit a PR for it, if someone points me to a working example.

Scoop and Buckets Version

PS> scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
c905a44d4 (HEAD -> master, origin/master, origin/HEAD) ripme: Update to version 2.1.9

'main' bucket:
f9db0375f (HEAD -> master, origin/master, origin/HEAD) scons: Update to version 4.7.0

'sysinternals' bucket:
e669cc0 (HEAD -> main, origin/main, origin/HEAD) chore(ci): switch to `pull_request_target` trigger

'versions' bucket:
1e6b06104 (HEAD -> master, origin/master, origin/HEAD) oss-cad-suite-nightly: Update to version 2024-03-18

Scoop Config

PS> scoop config

last_update                       scoop_branch scoop_repo
-----------                       ------------ ----------
2024-03-17T21:34:46.7003816-07:00 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.4170
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.4170
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

shinymerlyn commented 8 months ago

Note: I also submitted a "hash check failure" before this, but the bot told me to just install the latest version, which isn't exactly what I'm trying to do.

https://github.com/ScoopInstaller/Main/issues/5620