ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.85k stars 1.39k forks source link

How to stop scoop from auto-updating buckets? #3818

Closed wuchangen closed 2 years ago

wuchangen commented 4 years ago

tldr: title

I use a lot of buckets. It becomes tedious that every time I use scoop to install software, it automatically starts to update buckets. Which takes quite a few minutes. So is there an option to set it off? I looked at the wiki and couldn't find it. Thank you.

quantuumsnot commented 4 years ago

Yeah, I'm also wondering why scoop must check AND update all buckets when it's faster to check only the installed apps. Non-stop scoop update and scoop update * ...

Most if not all have the same source URL from where the latest version can be downloaded (date/version comparison are enough). Then it's better to update only the .json for each app

r15ch13 commented 4 years ago

apt, pacman and brew all work the same. First, update the local package database and then update the programs. In the case of these tools, you have to run the update manually (e.g. apt update), but Scoop enforces scoop update after 3 hours of the last run. This ensures that hashes and versions are up-to-date because we don't have a history of packages or have any control over the download servers. It was implemented by me to reduce the number of issues opened for wrong hashes and non-existent download URLs because a user didn't run scoop update beforehand.

The slowness of the bucket update comes from git pull. I tried to make this a parallel task, but sadly couldn't get it to work.

quantuumsnot commented 4 years ago

Update only INSTALLED apps, why should we update all buckets instead of updating only manifests of currently installed apps?

r15ch13 commented 4 years ago

And what if you want to install a new program? Or search locally for it?

quantuumsnot commented 4 years ago

Then update the buckets one by one only if scoop search yourapp returns false, for each installed bucket, ie: scoop searches in bucket 'main', finds nothing, update 'main' and retry, finds nothing v scoop searches in bucket 'extras', finds nothing > update 'extras' and retry, finds nothing v scoop searches in bucket 'extras', finds yourapp ...

ddavness commented 4 years ago

apt, pacman and brew all work the same. First, update the local package database and then update the programs.

I don't think this was ever true - at least not automatically. As far as I know you'd still be required to update stuff manually - apt update, pacman -Sy, etc.

chawyehsu commented 4 years ago

https://github.com/lukesampson/scoop/blob/11c42d782f8adb29fbe0d94daa5f121cdda935ab/libexec/scoop-install.ps1#L70-L72

change this to:

if (is_scoop_outdated) { 
    warn "Scoop is outdated. Maybe you are installing an older version of apps."
}

or whatever.

quantuumsnot commented 4 years ago

In general versions of scoop maintained apps shouldn't have anything in common with scoop. Any version of any package system must have backwards compatibility, ie even the latest version of scoop should install each one of the 'old' app versions and any of the latest app version can be installed by the oldest version of scoop

r15ch13 commented 4 years ago

@ddavness

I don't think this was ever true - at least not automatically.

You're right. You have to run apt update first.

@quantuumsnot Scoop can't install 'old' app versions in many cases. Many developers don't provide older versions of their programs or the URL is always the same (without a version number in it). Now you have an old manifest without the correct hash in your local outdated bucket and try to install the program. Scoop will report a hash mismatch and cancel. Many users would create a new ticket instead of running scoop update first. This was the case before the forced update was implemented.

Any other package system relies on an organized and consistent server structure that provides backward-compatible downloads.

Adding a config value to switch it off would be a solution, but it should still be on by default.

quantuumsnot commented 4 years ago

I know that but also know that version numbers and storing them in a file for compatibility should be mandatory. Often the newest version has and new bugs or incompatibilities with some systems

wuchangen commented 4 years ago

@h404bi That's what I needed. Thank you.

pjeby commented 1 year ago

Note for people finding this in future: you can now use -u or --no-update-scoop as an option to the install command (and a -l / --local option to the status command) to prevent bucket updates. I defined aliases so I can use scoop i and scoop s to install or check status locally as follows:

scoop alias add i 'scoop install -u @args' "Install package without updating scoop"
scoop alias add s 'scoop status -l @args' "Show package status without updating scoop"

Hopefully this will be of use to others coming across this issue in future.

TylerTemp commented 1 year ago

apt, pacman and brew all work the same

brew allows an env variable to disable this function, thus editing a profile file (or modify system env) can do it for all

apt allows editing config file to disable it once for all. (I might be wrong on this as I use apt-get much often)

So, either a env, a config, or a global first-class command-line option would be appreciated.

for example, if an --no-update-scoop is to be global then we can alias alias scoop="scoop --no-update-scoop" on cygwin, or wrap the original scoop bin file to a scoop.bat and give a higher priority in PATH. (I think scoop --no-update-scoop %* is the syntax?)

Otherwise, this is just painful.

gigberg commented 6 months ago

Note for people finding this in future: you can now use -u or --no-update-scoop as an option to the install command (and a -l / --local option to the status command) to prevent bucket updates. I defined aliases so I can use scoop i and scoop s to install or check status locally as follows:

scoop alias add i 'scoop install -u @args' "Install package without updating scoop"
scoop alias add s 'scoop status -l @args' "Show package status without updating scoop"

Hopefully this will be of use to others coming across this issue in future.

thanks, i have found for this feature these years

goyalyashpal commented 4 months ago