ScoopInstaller / Scoop

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

[Bug] checkver.ps1 detects a new version, but scoop update * does not update the app #5422

Closed papanito closed 1 year ago

papanito commented 1 year ago

Bug Report

Current Behavior

The bucket contains by default a version kubectl 1.23.0. While there is a never version available

 .\bin\checkver.ps1 -App kubectl -Dir ..\..\..\buckets\main\bucket\
kubectl: 1.26.0 (scoop version is 1.23.0) autoupdate available

It is not installed while running scoop update *

PS C:\Users\papanito\scoop\apps\scoop\current> scoop update *
Latest versions for all apps are installed! For more information try 'scoop status'
PS C:\Users\papanito\scoop\apps\scoop\current> scoop update kubectl
kubectl: 1.23.0 (latest version)
Latest versions for all apps are installed! For more information try 'scoop status'

Expected Behavior

Scoop is able to update to newer app versions.

Additional context/output

We use only an internal bucket. The internal bucket pulls software from an Artifactory, which proxies necessary repos, e.g.

{
    "version": "1.23.0",
    "description": "Control the Kubernetes cluster manager.",
    "homepage": "https://kubernetes.io/docs/user-guide/kubectl-overview/",
    "license": "Apache-2.0",
    "architecture": {
        "64bit": {
            "url": "https://artifactory.intra/remote-generic-kubernetes-release/release/v1.23.0/kubernetes-client-windows-amd64.tar.gz",
            "hash": "xxxxxxx"
        }
    },
    "extract_dir": "kubernetes\\client",
    "bin": "bin\\kubectl.exe",
    "checkver": {
        "url": "https://artifactory.intra/remote-generic-kubernetes-release/release/stable.txt",
        "regex": "v([\\d.]+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://artifactory.intra/remote-generic-kubernetes-release/release/v$version/kubernetes-client-windows-amd64.tar.gz"
            },
            "32bit": {
                "url": "https://artifactory.intra/remote-generic-kubernetes-release/release/v$version/kubernetes-client-windows-386.tar.gz"
            }
        },
        "hash": {
            "url": "$url.sha1"
        }
    }
}

Possible Solution

System details

Windows version: Windows Server 2022

OS architecture: 64bit

PowerShell version:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      20348  1366

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

{
    "last_update":  "2023-03-03T10:45:28.7544240+01:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}
rashil2000 commented 1 year ago

scoop update will update the app when it detects a change in the manifest in the upstream bucket repository. It has nothing to do with checkver.

papanito commented 1 year ago

So how the auto update is then triggered? Only if I update the mainfest? so the autoupdate information is only used to update the manifest then`?

r15ch13 commented 1 year ago

Yep, autoupdate is just for checkver. You have to run checkver periodically to update the manifest.

papanito commented 1 year ago

I see, I have to run checkver -U. Works fine, thanks for the hint