Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

Current state of installing specific versions?

Open janpio opened this issue 5 years ago • 8 comments

I am just getting started with using scoop and I think I am in love ❤️

One thing that I found missing was a way to install specific versions of programs.

There is a documented "workaround" with another bucket that works for ruby and python: https://github.com/lukesampson/scoop/wiki/Switching-Ruby-and-Python-Versions But this is also only for major versions and only works for these two special cases.

Then I found https://github.com/lukesampson/scoop/pull/1332 which seems to implement parts of what I was looking for - but closes with "Lets leave this as a bit of a hidden feature for a while. I'll write some docs for it soon enough" (in 2017). There are other issues that mention this syntax, its possible problems and its missing documentation: https://github.com/lukesampson/scoop/issues/2254 ScoopInstaller/Scoop#1780 And here even is an open issue to document this behavior: ScoopInstaller/Scoop#2141

  • Did I mess up and miss the excellent documentation on this feature?
  • Is the <program>@<version> syntax considered stable and usable now?
  • Are PRs and wiki edits welcome to document the current behavior?
  • Is there a way to get older version numbers via scoop?

janpio avatar Jan 29 '19 17:01 janpio

Ok, one "problem" (feature?) seems to be that you generally can not install an older version over a newer version:

PS C:\Users\Jan> scoop install [email protected]
WARN  'ruby' (2.6.0-1) is already installed.
Use 'scoop update ruby' to install a new version.

janpio avatar Jan 30 '19 13:01 janpio

Another problem seems to be when the current manifest config does not match the path of older download URLs as it was recently changed: https://github.com/lukesampson/scoop/commit/91d9723b08e86a2db4f94e6164b7fa598f42d49c

PS C:\Users\Jan> scoop install [email protected]
WARN  Given version (2.5.3-1) does not match manifest (2.6.0-1)
WARN  Attempting to generate manifest for 'ruby' (2.5.3-1)
Autoupdating ruby
Downloading rubyinstaller-2.5.3-1-x86.7z to compute hashes!
The request was aborted: The connection was closed unexpectedly.
URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.3-1/rubyinstaller-2.5.3-1-x86.7z is not valid
Could not find hash!
Could not install [email protected]

New generated path is https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.3-1/rubyinstaller-2.5.3-1-x86.7z, correct one would have been https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/rubyinstaller-2.5.3-1-x86.7z

(Workaround (?) here was to clone the old manifest, and publish it as a gist that I can use to install: https://gist.github.com/janpio/40e014d0ae31215b4bab2b5bbe5a69e8/3500373c9484ca8c3c89aac4998cda333451a555 + https://gist.githubusercontent.com/janpio/40e014d0ae31215b4bab2b5bbe5a69e8/raw/3500373c9484ca8c3c89aac4998cda333451a555/scoop_ruby_20_to_25.json)

janpio avatar Jan 30 '19 13:01 janpio

There is also another issue. Every manifest that uses custom capture groups will not work. (Like $matchVersion, $matchHead, $matchMyAwesomeCaptureGroup`) See aria2.json or brotli.json

r15ch13 avatar Feb 03 '19 17:02 r15ch13

With chrome getting:

current $ scoop install [email protected] WARN Given version (73.0.3683.68) does not match manifest (74.0.3729.131) WARN Attempting to generate manifest for 'chrome' (73.0.3683.68) Autoupdating chrome DEBUG[1557912977] $substitutions (hashtable) -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:149:5 DEBUG[1557912977] $substitutions.$buildVersion 68 DEBUG[1557912977] $substitutions.$baseurl https://redirector.gvt1.com/edgedl/release2/chrome/$match32_73.0.3683.68 DEBUG[1557912977] $substitutions.$dashVersion 73-0-3683-68 DEBUG[1557912977] $substitutions.$url https://redirector.gvt1.com/edgedl/release2/chrome/$match32_73.0.3683.68/73.0.3683.68_ch… DEBUG[1557912977] $substitutions.$matchHead 73.0.3683 DEBUG[1557912977] $substitutions.$preReleaseVersion 73.0.3683.68 DEBUG[1557912977] $substitutions.$majorVersion 73 DEBUG[1557912977] $substitutions.$basename 73.0.3683.68_chrome_installer.exe DEBUG[1557912977] $substitutions.$patchVersion 3683 DEBUG[1557912977] $substitutions.$cleanVersion 730368368 DEBUG[1557912977] $substitutions.$minorVersion 0 DEBUG[1557912977] $substitutions.$version 73.0.3683.68 DEBUG[1557912977] $substitutions.$underscoreVersion 73_0_3683_68 DEBUG[1557912977] $substitutions.$matchTail .68 DEBUG[1557912977] $hashfile_url = $null -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:152:5 Downloading 73.0.3683.68_chrome_installer.exe to compute hashes! The remote server returned an error: (404) Not Found. URL https://redirector.gvt1.com/edgedl/release2/chrome/$match32_73.0.3683.68/73.0.3683.68_chrome_installer.exe#/cosi.7z is not valid Could not find hash! Could not install [email protected]

573 avatar May 15 '19 09:05 573

@janpio, it seems just like the checksum ($match32 part) is missing there as well as @r15ch13 pointed out already. Does it make sense as a workaround to factor these out from the manifest? Must confess I am a noobie here.

573 avatar May 16 '19 05:05 573

I have a workaround described here until the match-issue is sorted out. Applies to chrome only.

573 avatar May 17 '19 07:05 573

Tracked in ScoopInstaller/Main#3292

rashil2000 avatar Jan 15 '22 09:01 rashil2000

Current:

> scoop install [email protected]
WARN  Given version (2022.1.1) does not match manifest (2022.2.0)
WARN  Attempting to generate manifest for 'opentrack' (2022.1.1)
Autoupdating opentrack
Downloading opentrack-2022.1.1-portable.7z to compute hashes!
The remote server returned an error: (404) Not Found.
URL https://github.com/opentrack/opentrack/releases/download/opentrack-2022.1.1/opentrack-2022.1.1-portable.7z is not valid
Could not install [email protected]
Select-CurrentVersion: C:\Users\User\scoop\apps\scoop\current\lib\core.ps1:228
Line |
 228 |      return $null -ne (Select-CurrentVersion -AppName $app -Global:$gl …
     |                                                       ~~~~
     | Cannot bind argument to parameter 'AppName' because it is an empty string.

WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Couldn't find manifest for ''.

My workaround through git: https://gist.github.com/ClassicDarkChocolate/4f10ad43e5de4fb103fa2ac5a1727005

Install-ScoopPackage opentrack -Version "2022.1.1"
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Installing 'opentrack' (2022.1.1) [64bit]
Starting download with aria2 ...
Download: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: 7a3a84|OK  |   4.6MiB/s|C:/Users/User/scoop/cache/opentrack#2022.1.1#https_github.com_opentrack_opentrack_releases_download_opentrack-2022.1.1_opentrack-2022.1.1-win32-portable.7z
Download: Status Legend:
Download: (OK):download completed.
Checking hash of opentrack-2022.1.1-win32-portable.7z ... ok.
Extracting opentrack-2022.1.1-win32-portable.7z ... done.
Linking ~\scoop\apps\opentrack\current => ~\scoop\apps\opentrack\2022.1.1
Creating shim for 'opentrack'.
Creating shortcut for Opentrack (opentrack.exe)
Persisting ini
Running post-install script...
INFO  [Portable Mode] Adding Portable Mode File...
'opentrack' (2022.1.1) was installed successfully!
Get-ScoopPackageVersions opentrack -IncludeDescription
Hash                                     Version  Description
----                                     -------  -----------
6e1c9cba00efb8aa116535ad179619ee8732f89a 2022.2.0 opentrack: Update to version 2022.2.0 (#8475)
9a2b4839fcff6e067b809e0d64e716d16a1aab97 2022.1.1 opentrack: Update to version 2022.1.1
75c10dd2870347a858c4c515300bbf6e870a2891 2022.1.0 opentrack: Use portable configuration (#7764)
8d0caface45481b219cf7f6ac503c2055eb86c66 2022.1.0 opentrack: Update to version 2022.1.0 (#7760)
29e791f7199cac2c338389905f1f218f75882eeb 2021.2.0 opentrack: Update to version 2021.2.0
64152b36fd2ec720b801a8c2afcca175910c935a 2021.1.3 opentrack: Update to version 2021.1.3
f3ed480f34a61388195e61d28d3b9d75234828f2 2021.1.2 opentrack: Update to version 2021.1.2
f53ef196da93e1358494e6713b64cd85f2f53c2f 2021.1.1 opentrack: Update to version 2021.1.1
17350aacc60360dfd91fd442ff7e6cc5802edb6e 2021.1.0 opentrack: Update to version 2021.1.0
b64503227229e2ec2ba7122e8a2db8f4c480d14f 2.3.13   opentrack: Update to version 2.3.13
9e0dd92c4cd7e7590a4cbf4717f4e2c9e02660a8 2.3.12   opentrack: Update to version 2.3.12
1cbce5781679731251eb46ff77d6467b82d78bd0 2.3.11   opentrack: Update to version 2.3.11
85905703f10c691a32a8514e2989dafb2b8c4d2b 2.3.10   Add multiple missing manifest descriptions (#2497)
ff7c24db0945c3e315b74c648d2d4ad51b2820b5 2.3.10   Move all manifest files to bucket subdirectory
Invoke-ScoopPackageCommand info opentrack -CommandArgs "--verbose" -Version "2.3.10"
Name        : opentrack
Description : An application dedicated to tracking user's head movements and relaying the information to games and flight simulation software.
Version     : 2.3.10
Bucket      : extras
Website     : https://github.com/opentrack/opentrack
License     : ISC (https://spdx.org/licenses/ISC.html)
Updated at  : 5/16/2022 19:05:35
Updated by  : tech189
Manifest    : C:\Users\Zack\scoop\buckets\extras\bucket\opentrack.json
Binaries    : opentrack.exe
Shortcuts   : Opentrack

ClassicDarkChocolate avatar May 26 '22 01:05 ClassicDarkChocolate

There is also another issue. Every manifest that uses custom capture groups will not work. (Like $matchVersion, $matchHead, $matchMyAwesomeCaptureGroup`) See aria2.json or brotli.json

I don't think there's a meaningful way to solve this problem. The captured variables are populated from the checkver.url, and that URL, at any given time, will only have the latest 'values'.

Using git history is a good workaround to this - https://github.com/ScoopInstaller/Scoop/issues/3894

rashil2000 avatar Sep 10 '23 20:09 rashil2000