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

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

Open
5 tasks done
gep13 opened this issue Dec 21, 2023 · 1 comment
Open
5 tasks done

Comments

@gep13
Copy link
Member

gep13 commented Dec 21, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

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

  • Operating System: Windows 10
  • Windows PowerShell version: 5.1.19041.3803
  • Chocolatey CLI Version: 2.2.2
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: N/A
  • Terminal/Emulator: PowerShell

Installed Packages

N/A

Output Log

N/A

Additional Context

N/A

@gep13
Copy link
Member Author

gep13 commented Dec 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant