Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

dnu packages add doesn't overwrite destination if it already exists #1726

Closed
Eilon opened this issue Apr 28, 2015 · 4 comments
Closed

dnu packages add doesn't overwrite destination if it already exists #1726

Eilon opened this issue Apr 28, 2015 · 4 comments
Assignees
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Apr 28, 2015

Repro:

  1. Create a NuGet package (doesn't matter what's in it)
  2. Run dnu packages add MyPackage.1.0.0.nupkg c:\pkgs
  3. Modify the original NuGet package in some verifiable way (e.g. change something in the nuspec, add a file, etc.)
  4. Run dnu packages add MyPackage.1.0.0.nupkg c:\pkgs again

Result:
Step (4) does nothing, though there's no warning of any sort. That is, the original "exploded" package remains in c:\pkgs, untouched.

Expected:
Step (4) should overwrite the destination.


This in fact causes issues in our own build system where we publish packages to the volatile feed on the CI. For example with a lot of internal packages that we consume (e.g. Roslyn), their package id's and version numbers don't change on each build, so our build system thinks it's updating Roslyn builds in the volatile feed with dnu packages add ... when in fact it's no-op'ing.

@Eilon
Copy link
Member Author

Eilon commented Apr 28, 2015

@danroth27 @davidfowl

@davidfowl
Copy link
Member

Ugh, we should fix that.

@Eilon
Copy link
Member Author

Eilon commented May 4, 2015

@muratg can we get someone to take a look at this this week? This is a must-fix to ship even the next preview because we use this command on the CI and it doesn't work as we want it to.

@muratg muratg added this to the 1.0.0-beta5 milestone May 4, 2015
@muratg muratg added the bug label May 4, 2015
@davidfowl
Copy link
Member

@ChengTian a simple change would be to compare the sha's. If they differ then overwrite. Also we should print out a message that shows what action was taken (overwrite, vs already exists).

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

No branches or pull requests

4 participants