ScoopInstaller / Main

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

[Bug]: Not able to install mingw older versions after the latest ucrt changes #4638

Closed peterzhuamazon closed 1 year ago

peterzhuamazon commented 1 year ago

Prerequisites

Package Name

mingw

Expected/Current Behaviour

scoop install mingw@12.2.0-rt_v10-rev1

This should install the older version of mingw without ucrt.

Steps to Reproduce

Expected to install an older version of mingw, as the new one with ucrt breaks our build, and no options to switch to msvcrt one.

PS C:\Users\Administrator> scoop install mingw@12.2.0-rt_v10-rev1
WARN  Given version (12.2.0-rt_v10-rev1) does not match manifest (12.2.0-rt_v10-rev2)
WARN  Attempting to generate manifest for 'mingw' (12.2.0-rt_v10-rev1)
Autoupdating mingw
Downloading i686-$match1-release-posix-dwarf-ucrt-$matchBuild.7z to compute hashes!
The request was aborted: The connection was closed unexpectedly.
URL https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev1/i686-$match1-release-posix-dwarf-ucrt-$matchBuild.7z is not valid
Could not install mingw@12.2.0-rt_v10-rev1
Select-CurrentVersion : Cannot bind argument to parameter 'AppName' because it is an empty string.
At C:\Users\Administrator\scoop\apps\scoop\current\lib\core.ps1:239 char:54
+     return $null -ne (Select-CurrentVersion -AppName $app -Global:$gl ...
+                                                      ~~~~
    + CategoryInfo          : InvalidData: (:) [Select-CurrentVersion], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Select-CurrentVersion

You cannot call a method on a null-valued expression.
At C:\Users\Administrator\scoop\apps\scoop\current\lib\manifest.ps1:36 char:5
+     $app = $app.TrimStart('/')
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Couldn't find manifest for ''.

This can only be resolved by using scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/dad0cee42bb2c0be7acf9f341fba2a55e415e0f2/bucket/mingw.json.

Possible Solution

scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/dad0cee42bb2c0be7acf9f341fba2a55e415e0f2/bucket/mingw.json

The above is ok but still not idea.

Scoop and Buckets Version

PS C:\Users\Administrator\opensearch-build> scoop version
WARN  scoop: 'version' isn't a scoop command. See 'scoop help'.
PS C:\Users\Administrator\opensearch-build> scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
416a9c7fd (HEAD -> master, origin/master, origin/HEAD) todolist: Update to version 8

'github-gh' bucket:
5143315 (HEAD -> master, origin/master, origin/HEAD) gh v2.26.1

'java' bucket:
44712660 (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.372-6.0.202304051813

'main' bucket:
61bcafecc (HEAD -> master, origin/master, origin/HEAD) haxe@4.3.0: Fix hash (Closes #4637)

'versions' bucket:
45b5c5a86 (HEAD -> master, origin/master, origin/HEAD) rstudio-daily: Update to version 2023.05.0-daily-194

Scoop Config

last_update                       no_junction scoop_branch scoop_repo
-----------                       ----------- ------------ ----------
2023-04-07T01:06:05.6050371+00:00        True master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

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

Additional Softwares

No response

rashil2000 commented 1 year ago

The artifact naming scheme has changed, so using the raw URL for installing older version is the only way now, I'm afraid.