chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.05k stars 890 forks source link

During upgrade of a package not all files in the lib folder are present #3375

Open gep13 opened 6 months ago

gep13 commented 6 months ago

Checklist

What You Are Seeing?

When performing an upgrade of a package, files that are created during the installation/usage of the software that the package installs, and placed into the package lib folder, are not present during the upgrade of the package.

For example, let's say you have a package that during installation, creates a file in the lib folder to store "stuff". This could be configuration information for example. During an upgrade, you may want to use the information in this file, to do other "stuff". However, this file that was placed there during installation, or after installation, isn't present in the lib folder during the upgrade.

What is Expected?

Any files that are added to the lib folder during installation, or after, should be present in the lib folder during installation. This is how things worked in 1.x of Chocolatey CLI.

See the testing steps below for more information on this regression.

How Did You Get This To Happen?

Run the following commands in 1.x and 2.x of Chocolatey CLI, and you should get the following results:

choco install retain-package-files-on-upgrade --version 0.1.0 --source . -y
choco upgrade retain-package-files-on-upgrade --source . -y

image

image

Notice that the "The file doesn't exist, but it likely should..." message appears both during install and upgrade when run through 2.x, but only appears once when installed via 1.x.

retain-package-files-on-upgrade.0.2.0.zip retain-package-files-on-upgrade.0.1.0.zip

System Details

Installed Packages

N/A

Output Log

N/A

Additional Context

N/A

gep13 commented 6 months ago

@pauby as requested, I have marked this issue with the High Priority label.