1

I have an issue with incorrect .nuspec data getting overwritten while pulling packages using Chocolatey (Nuget) via the command: choco download. The tag that is not updating correctly is <owner>.

On my internal Artifactory server, I’ll download a package (using choco download) & edit the .nuspec file. I'll edit multiple tags and then I'll re-push the package to the Artifactory server successfully. Upon reviewing the nupkg details on Artifactory, the correct package metadata is displayed. I can see this from the updated .nuspec file as well as the Nupkg info. Even the <owner> tag is updated correctly.

If I download that .nupkg from the Artifactory web browser, the .nupkg does indeed contain the updated .nupsec file with the updated <owner> tag. That is good.

If I download the package via Chocolatey, however, using the 'choco download' command, the corresponding .nuspec file has the old <owner>still. Other tags are updated but the intended <owner> tag is not.

What's even more remarkable is that if I update the <author> tag, it will update the <owner> tag as well with the same value! It does this every single time when using choco download.

In talking with Chocolatey support, the choco download command is basically just a Nuget unpacking command. There is nothing special about it being a Chocolatey command and Chocolatey support has ruled it out as being a Chocolatey problem. This issue does not exist with other Nuget repositories (like Nexus). I can replicate this on multiple issues of Artifactory.

Has anyone run into this before?

ferventcoder
  • 11,952
  • 3
  • 57
  • 90
  • Is chocolatey configured to download from a 'local' repository or from a 'virtual' repository? it is possible that while from the local repository, where you made the changes, you will get the modified version while from a virtual repository which aggregates multiple other repository you will get the original version – Dror Bereznitsky Jun 05 '19 at 10:01
  • Good call @DrorBereznitsky. I had not tried that previously. I just verified that when downloading from my 'local' repository (same machine), the issue does not exist. It only exists when downloading from a 'virtual' or 'remote' repository on Artifactory. – LeroyJenkins608 Jun 05 '19 at 12:09

1 Answers1

2

This can happen if you uploaded the modified version of the package to a local repository but resolving from a virtual repository which aggregates multiple repositories.
As a first step, make sure that the virtual repository you are resolving from includes the local repository which contains the modified package.
Next step is to "zap" the cache of the virtual repository. This can be done from the "Artifact Repository Browser" by right clicking the virtual repository and choosing "Zap Caches".

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57