microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.23k stars 1.45k forks source link

Winget can't update program with dependencies #4880

Open Shockingrivs opened 3 weeks ago

Shockingrivs commented 3 weeks ago

Brief description of your issue

When updating yt-dlp, winget will install the dependency Gyan.FFmpeg, and continue to yt-dlp but finishes the program before it can install it and also blocking the next packages in queue, when prompted to install all packages yt-dlp will still be fisrt in queue and repeating until uninstalled and reinstalled.

Steps to reproduce

  1. install a previous version of yt-dlp that can be updated.
  2. type the command winget update -r -u -h

Expected behavior

download and install yt-dlp and Gyan.FFmpeg uodates and continue updating the other packages

Actual behavior

download of Gyan.FFmpeg, check the hash of the program and extracting the files, then abruptly stoping and returning to the command prompt.

Environment

Administrador de paquetes de Windows v1.8.1911 Copyright (c) Microsoft Corporation. Todos los derechos reservados.

Windows: Windows.Desktop v10.0.22631.4317 Arquitectura del sistema: X64 Paquete: Microsoft.DesktopAppInstaller v1.23.1911.0

Directorios de WinGet

Registros %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalS… Configuración de usuario %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalS… Directorio de vínculos portátiles (usuario) %LOCALAPPDATA%\Microsoft\WinGet\Links Directorio de vínculos portátiles (equipo) C:\Program Files\WinGet\Links Raíz de paquete portátil (usuario) %LOCALAPPDATA%\Microsoft\WinGet\Packages Raíz de paquete portátil C:\Program Files\WinGet\Packages Raíz de paquete portátil (x86) C:\Program Files (x86)\WinGet\Packages Descargas del instalador %USERPROFILE%\Downloads

Vínculos

Declaración de privacidad https://aka.ms/winget-privacy Contrato de licencia https://aka.ms/winget-license Avisos de terceros https://aka.ms/winget-3rdPartyNotice Página principal https://aka.ms/winget Términos de Microsoft Store https://www.microsoft.com/en-us/storedocs/terms-of-sale

Configuración de administrador Estado

LocalManifestFiles Deshabilitado BypassCertificatePinningForMicrosoftStore Deshabilitado InstallerHashOverride Deshabilitado LocalArchiveMalwareScanOverride Deshabilitado ProxyCommandLineOptions Deshabilitado DefaultProxy Deshabilitado

thmeyer-msft commented 3 weeks ago

I can agree with this problem, especially this package, but it seems there also other packages with don't get updated correctly, like IrfanSkiljan.IrfanView for example.

A short look into the log shows, that winget is first updates the package yt-dlp, and afterwards the package Gyan.FFmpeg which seems a bit weird as the dependency is updated after the package which requires it. 🤪 After the dependency is checked and launched the real package isn't called again

Debug_Log_Winget.txt

Also the real file of yt-dlp isn't available in the in the downloaded cache directory %LOCALAPPDATA%\Temp\WinGet

beeradmoore commented 2 weeks ago

I came to report the exact same problem with the exact same pacakges.

Even if I uninstall both packages, then install ffmpeg (winget install gyan.ffmpeg), and then install yt-dlp (winget install yt-dlp.yt-dlp) it looks like it re-installs ffmpeg again.

Found yt-dlp [yt-dlp.yt-dlp] Version 2024.10.07
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
This package requires the following dependencies:
  - Packages
      Gyan.FFmpeg
(1/1) Found FFmpeg [Gyan.FFmpeg] Version 7.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...
Command line alias added: "ffmpeg"
Command line alias added: "ffplay"
Command line alias added: "ffprobe"
Successfully installed

Downloading https://github.com/yt-dlp/yt-dlp/releases/download/2024.10.07/yt-dlp.exe
  ██████████████████████████████  17.9 MB / 17.9 MB
Successfully verified installer hash
Starting package install...
Command line alias added: "yt-dlp"
Successfully installed

EDIT: I just did another set of updates with winget upgrade --all and now it says this

Name                      Id                       Version     Available    Source
----------------------------------------------------------------------------------
....
....
....
yt-dlp                    yt-dlp.yt-dlp            2024.10.07  2024.10.22   winget

Installing dependencies:
This package requires the following dependencies:
  - Packages
      Gyan.FFmpeg
....
(4/4) Found yt-dlp [yt-dlp.yt-dlp] Version 2024.10.22
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
(1/1) Found FFmpeg [Gyan.FFmpeg] Version 7.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Extracting archive...
Successfully extracted archive

It didn't run first this time. Odd that it talked about dependencies first, and then again last. It did install those other 3 packages I had. After install I checked the version

yt-dlp --version
2024.10.07

It did not update.

stephengillie commented 2 weeks ago

Problems with the interoperation of yt-dlp.yt-dlp and Gyan.FFmpeg have been documented for some time:

This impacts my personal laptops as well. Sometimes, issues with Gyan.FFmpeg would cancel the entire winget upgrade --all process. One of the packages might be having an installation issue, but as a feature request, the package manager should be robust enough to handle and recover from this.