ScoopInstaller / Extras

📦 The Extras bucket for Scoop.
https://scoop.sh
The Unlicense
1.8k stars 1.37k forks source link

[Bug]: msiafterburner - not persisting all user configs #9788

Open luxzg opened 1 year ago

luxzg commented 1 year ago

Prerequisites

Package Name

msiafterburner

Expected/Current Behaviour

"Regular" MSI Afterburner keeps these folders and files on uninstall because they contain user-made changes:

scoop package only persists this folder:

This means that any monitoring plugins added or configured by user will be reset on update & deleted on cleanup.

Due to Monitoring folder also containing package provided dlls, it would be expected to at least persist files in this manner: \Plugins\Monitoring\*.cfg.user

Steps to Reproduce

scoop install msiafterburner

Open MSI Afterburner and add custom checks from plugins offered, eg I've added checks from PerfCounter.

When new version is released:
scoop update msiafterburner

Customizations will be gone.

Possible Solution

Either persist files \Plugins\Monitoring\*.cfg.user or add a Note for user to move the files manually before cleanup deletes them.

Scoop and Buckets Version

Current Scoop version:
v0.3.1 - Released at 2022-11-15

'extras' bucket:
b4ebfb2dc (HEAD -> master, origin/master, origin/HEAD) jackett: Update to version 0.20.2267

'java' bucket:
fec2bd1a (HEAD -> master, origin/master, origin/HEAD) temurin8-nightly-jre: Update to version 8.0.362-3.0.202211181811

'main' bucket:
e13981012 (HEAD -> master, origin/master, origin/HEAD) tflint: Update to version 0.43.0

Scoop Config

last_update          scoop_repo                              scoop_branch
-----------          ----------                              ------------
19.11.2022. 16:05:54 https://github.com/ScoopInstaller/Scoop master

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.0
PSEdition                      Core
GitCommitId                    7.3.0
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

FlawlessCasual17 commented 1 year ago

@luxzg Do you mind sharing the names of the files you want persisted from the \Plugins\Monitoring\ folder?

luxzg commented 1 year ago

Not at all.

After I've uninstalled MSI Afterburner (choosing to KEEP user files during uninstall) I was left with 3 files in my Monitoring folder:

AIDA64.cfg.user
LibreHardwareMonitor.dll
PerfCounter.cfg.user

.dll file is additional plugin I've used briefly, and two .cfg.user files contain changes to selections in Plugin settings.

EDIT: I've taken a look at json now as well

   "persist": "Profiles",

In my case that would skip these files:

Plugins\\Monitoring\\AIDA64.cfg.user
Plugins\\Monitoring\\LibreHardwareMonitor.dll
Plugins\\Monitoring\\PerfCounter.cfg.user

I'm not sure how to solve the .dll situation, as there could be dozens of custom .dlls possible. But there aren't any other Plugins\\Monitoring\\*.cfg.user files except user modified ones, so all those could be easily included to persistance if persist command accepts wildcard + extension scheme.

FlawlessCasual17 commented 1 year ago

@luxzg is the LibreHardwareMonitor.dll file that important?

FlawlessCasual17 commented 1 year ago

@luxzg Can you test these manifests for me?

scoop bucket add MyScoop 'https://github.com/Zliced13/MyScoop'
scoop install rtss_fixed
scoop install msiafterburner_fixed
luxzg commented 1 year ago

LibreHardwareMonitor.dll isn't important in my case, as those are downloaded and added from Internet, so can be easily replaced. Still, it would stop monitoring of those items until user fixes it manually. It would be easiest to persist whole folder, I am just too new with scoop to understand the details of persisting process. Eg. if app update is allowed to overwrite these persisted items or not.

Anyway, I did test these fixes and I have a few observations:

So I'd say msiafterburner fix works. Sure enough we'd need to update. Maybe you can fake a new version in json while I add some modifications to files and see what happens after update and cleanup?

Edit: I did change cfg.user files, uninstall, then install again, files are still kept with my modification. Is that enough for a test?

FlawlessCasual17 commented 1 year ago

Edit: I did change cfg.user files, uninstall, then install again, files are still kept with my modification. Is that enough for a test?

Yes, if the files are still there after you used the scoop uninstall command (without the -p switch), that means it's being persisted.