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

WinGetPackage does not work when source is removed #5144

Open
Gijsreyn opened this issue Jan 17, 2025 · 1 comment
Open

WinGetPackage does not work when source is removed #5144

Gijsreyn opened this issue Jan 17, 2025 · 1 comment
Labels
Command-Configure Issue related to WinGet Configuration Issue-Bug It either shouldn't be doing this or needs an investigation.

Comments

@Gijsreyn
Copy link
Contributor

Gijsreyn commented Jan 17, 2025

Brief description of your issue

I was playing around with the winget-cli-restsource in combination with the WinGetPackage DSC module and noticed something unexpected.

When I deployed the whole solution and added the source using the winget source add command, everything was working perfectly when I deployed the following:

properties:
  resources:
    - resource: Microsoft.Windows.Developer/DeveloperMode
      directives:
        description: Enable Developer Mode
        allowPrerelease: true
      settings:
        Ensure: Present
    - resource: Microsoft.WinGet.DSC/WinGetPackage
      directives:
        description: Install PowerShell 7
      settings:
        id: Microsoft.PowerShell
        source: winget
  configurationVersion: 0.2.0

After finishing up my testing with the private REST source, I deleted the resources in Azure. Here comes the interesting part: the source was, of course, still present, and an attempt to re-apply the configuration started to fail even though the source had been defined in the configuration file:

Image

Of course, after removing the source, it worked again. However, this looks like these rough edge cases.

Steps to reproduce

  1. Create a WinGet Configuration file leveraging the Microsoft.WinGet.DSC/WinGetPackage resource targetting winget as source
  2. Add a new REST source
  3. Remove connectivity towards the REST source

Package aren't able to install.

Expected behavior

Package should be able to install.

Actual behavior

An error occurred while connecting to the catalog.

Environment

Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.2033
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled
@Gijsreyn
Copy link
Contributor Author

Similiar issue reported: #4784

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jan 17, 2025
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Command-Configure Issue related to WinGet Configuration and removed Needs-Triage Issue need to be triaged labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Configure Issue related to WinGet Configuration Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

2 participants