Coder Social home page Coder Social logo

Comments (14)

rismoney avatar rismoney commented on August 11, 2024

I just saw this. Precisely what I was thinking on the google board. Are there challenges you see with this, because I think I can build something around this pretty easily. I haven't worked with nuget long (or chocolatey more than a few days), but maybe this should ultimately address dependencies in nuspec. Like force removal, manual step through dependencies, or just the singleton specified.

from chocolatey.

rismoney avatar rismoney commented on August 11, 2024

I should have a pull request by Tues for uninstall sometime this weekend. Just got it working! Awesomeness

from chocolatey.

ferventcoder avatar ferventcoder commented on August 11, 2024

make it cuninst as the shortcut. Folks have expressed issues with the cunst (too close to another word)

from chocolatey.

ferventcoder avatar ferventcoder commented on August 11, 2024

If there is only one version, it shouldn't prompt.

from chocolatey.

ferventcoder avatar ferventcoder commented on August 11, 2024

Dependencies are not removed right now. That could get very tricky as multiple items in the repo could depend on the same package (application really) to be installed. Plus the dependency may not be a runtime dependency, only an install dependency.

Consider ruby.devkit - it has dependencies on 7zip.commandline and ruby. Ruby is the hard dependency, 7zip is only so it can unpack the files. Which dependency would you remove? The proper answer is probably neither as I might still want ruby around. Thoughts?

from chocolatey.

rismoney avatar rismoney commented on August 11, 2024

Agree on name for obvious reasons.
I am not up to dependencies. Have a few ideas, but all rely on persisting a dependency.file in some form. Only until last dependency is removed can underlying be removed, unless forced.
Agree on not prompting

from chocolatey.

mika76 avatar mika76 commented on August 11, 2024

Maybe as a first step, just tell people what the dependencies are so that they can remove manually...

from chocolatey.

ccoenen avatar ccoenen commented on August 11, 2024

IIRC apt-get / aptitude has a special flag that marks a package as "installed as dependency" vs. "installed by a user". Dependencies would automatically be removed, once no other package requires its presence anymore. The flag will be turned into a "installed by user", if the user "installs" the package the normal way (i.e. not as a dependeny).

I do think, chocolatey should (at some point) do it very similarly. right now, i think, uninstalling one package (just that one specified package) would be fine, too.

from chocolatey.

rismoney avatar rismoney commented on August 11, 2024

Does chocolatey even know about dependencies or is this purely a nuget construct?

from chocolatey.

smarts avatar smarts commented on August 11, 2024

IMHO the ideal uninstall command would remove the package XYZ and all packages that exist only in XYZ's dependency graph. If this is too complex or (from the end-user's perspective) too expensive, removing no dependencies is probably the way to go.

The downside is that you could easily end up w/ a bloated system if you install/uninstall a lot. In that case, you might want some sort of "orphan-finding" command that will find orphaned packages. That said, it brings back the notion of a package being user-chosen vs. just a dependency, because otherwise every non-dependent package will show up as an orphan.

from chocolatey.

rismoney avatar rismoney commented on August 11, 2024

strictly nuget handling for now-

@ferventcoder https://github.com/chocolatey/chocolatey/blob/master/src/functions/Chocolatey-NuGet.ps1#26 is each $line here the packages and dependencies returned by nuget?

We can check if $line is not match for $packagename (therefore it must be a dependency) to place a flag in \lib$dependency, like dependency_of.XYZ.ver

That's trivial.

The uninstaller then needs to do what? We instead save $nugetOutput L24 to \lib$packagefolder and reparse it at uninstall time.

Further we can make L 29+ we can make it install/uninstall agnostic.

from chocolatey.

rryk avatar rryk commented on August 11, 2024

👍

from chocolatey.

ferventcoder avatar ferventcoder commented on August 11, 2024

#389 & #295
#187

from chocolatey.

ferventcoder avatar ferventcoder commented on August 11, 2024

I think this is done-ish. New tickets will get added to choco regarding plussing up autouninstaller and registry name going into chocopackages.

from chocolatey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.