Placement of Chocolatey Operational Files Same Location as Package Files
After upgrading to 0.10.1, a package started giving the below error.
This is a code deploy package (deploys company .NET code) for which I use Chocolatey instead of plain NuGet because I can then run the automation code to set the code up without having to use Octopus deploy.
It uses XCOPY to do final placement of the very large file set.
I can add an exclude to the copy, but it brings two thoughts to mind:
- I know this is Chocolatey's own "personal" cache of the application files - but it is also the best location to pull files from for more hands on operations such as my use case. Would it possible it make sense to have runtime state data somewhere else completely?
- If it does not make sense to move runtime state data, maybe it could either all be in a subfolder (best?) or start with exactly the same prepend to enable excluding them? (maybe a folder starting with "." would be an easy indicator and ignored automatically by many things in chocolatey?
2016-09-22 20:04:52,718 [INFO ] - New File 13 .chocolateyPending
2016-09-22 20:04:52,718 [INFO ] - 2016/09/22 20:04:52 ERROR 32 (0x00000020) Copying File C:\ProgramData\chocolatey\lib\PackageID\.chocolateyPending
2016-09-22 20:04:52,718 [INFO ] - The process cannot access the file because it is being used by another process.
2016-09-22 20:04:52,718 [INFO ] -
2016-09-22 20:04:58,733 [ERROR] - The install of packageid was NOT successful.
2016-09-22 20:04:58,733 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\PackageID\tools\chocolateyinstall.ps1'.
I think we could set the pending file in a different location.
For now, can you xcopy with a filter?
Yes - robocopy actually - already had a filter for the .nupkg and .nuspec and a few others. Still have to test how it responds to a file starting with "." as Windows can be finicky about that.
Thankfully only one package for the time being, but as we do more code deploy packages, would be nice not to have to remember a pattern that has to be placed in them all.
Right. Hoping we can easily move the file (I think we can).
FYI robocopy /XF ".chocolatey*"
works to exclude the file. I haven't tested xcopy.
Workaround available, so reducing priority on this one.
Want a little longer to test it so pushing this change over to 0.10.3.