microsoft / microsoft/winget-pkgs

[Package Issue]: AdGuard.AdGuardHome (A glitch with "winget update" so big that the packages should be removed from pkgs unless a fix is found)

Open
#341,077 1 comment 0 reactions 0 assignees View on GitHub
Issue-Bug Needs-Triage
Dominant language
No language data
Stars
11.1k
Forks
9.7k
PR merge metrics
PR metrics pending

Description

### Please confirm these before moving forward

- [x] I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
- [x] I have not been informed if the issue is resolved in a preview version of the winget client.

### Category of the issue

Installation issue.

### Brief description of your issue

Related to #341071.

I noticed when updating with `winget update AdGuard.AdGuardHome` from 0.107.1 → 0.107.2 an hour ago that the update process overwrote **the entire folder**. This is a really, really bad thing when all the program's config files are also in that folder.

Program setup YAML? Poof.

Client settings? Poof.

Filterlist caches (and any custom filter entries)? Poof.

DNS lookup logs? Poof.

I've tried to see if setting `DefaultInstallLocation` and/or `InstallLocation` in the manifest to `C:\AdGuardHome` would work, but Winget seems to entirely disregard those values when it comes to portable packages… not to mention it probably wouldn't stop it from overwriting it anyway.

Setting `UpgradeBehavior: install` in the manifest doesn't seem to prevent the total overwrite.

So we've got a very big problem with this. Big enough it could warrant deleting all `AdGuard.AdGuardHome` and `AdGuard.AdGuardHome.Beta` packages from this repo.

### Steps to reproduce

1) Run `winget install AdGuard.AdGuardHome -v 0.107.1`
2) In the installed folder, create any file of any sort, for example `a.txt`
3) Run `winget update AdGuard.AdGuardHome`
4) The file from step 2 has been deleted.

### Actual behavior

The ***entire*** folder gets overwritten and/or deleted during a `winget update`.

### Expected behavior

***ONLY*** the main `AdGuardHome.exe` file should be overwritten during a `winget update`.

### Environment

```raw
indows Package Manager v1.12.470
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.7705
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.27.470.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

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 Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Enabled
LocalArchiveMalwareScanOverride Enabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
```

### Screenshots and Logs

None that would be the relevant that I know of.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the listed winget install and update commands, creating a.txt between versions. Then inspect the AdGuard.AdGuardHome manifest settings, especially DefaultInstallLocation, InstallLocation, and UpgradeBehavior. Done means the update preserves files in the portable package folder, or the affected package manifests are clearly identified for removal if that cannot be achieved.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
build-system, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.