Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current state of installing specific versions? #3045

Closed
janpio opened this issue Jan 29, 2019 · 9 comments
Closed

Current state of installing specific versions? #3045

janpio opened this issue Jan 29, 2019 · 9 comments
Labels

Comments

@janpio
Copy link
Contributor

janpio commented Jan 29, 2019

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 #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: #2254 #1780 And here even is an open issue to document this behavior: #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
Copy link
Contributor Author

janpio commented Jan 30, 2019

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
Copy link
Contributor Author

janpio commented Jan 30, 2019

Another problem seems to be when the current manifest config does not match the path of older download URLs as it was recently changed: 91d9723

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)

@r15ch13
Copy link
Member

r15ch13 commented Feb 3, 2019

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

@573
Copy link
Contributor

573 commented May 15, 2019

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
Copy link
Contributor

573 commented May 16, 2019

@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
Copy link
Contributor

573 commented May 17, 2019

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

@rashil2000
Copy link
Member

Tracked in ScoopInstaller/Main#3292

@ClassicDarkChocolate
Copy link
Contributor

ClassicDarkChocolate commented May 26, 2022

Current:

> scoop install opentrack@2022.1.1
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 opentrack@2022.1.1
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

@rashil2000
Copy link
Member

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 - #3894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants