Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

chocolatey version all version for a specific package added #260

Closed

Conversation

rismoney
Copy link
Contributor

usage: .\chocolatey.ps1 version sysinternals -version all -lo

we might need to do a compare-object allinstalled current to get
a list of 'old' packages to not cleanup if using cup. Currently
cup doesnt do any cleanup and orphans packages in lib

usage: .\chocolatey.ps1 version sysinternals -version all -lo

we might need to do a compare-object allinstalled current to get
a list of 'old' packages to not cleanup if using cup.  Currently
cup doesnt do any cleanup and orphans packages in lib
@rismoney
Copy link
Contributor Author

overall we probably need a refactor of this function (probably a whole bunch of them) but anyway-

this adds the ability to get alist of all versions of a product installed.
i welcome thoughts. I based this off, the current master, as I have modded chocolatey.ps1 and version in another PR for error handling, so if those get merged first, I will rebase those mods back in.

@ferventcoder
Copy link
Contributor

I think we need to look at list or search -localonly - It's much much faster.

clist nodejs -lo -all

5052e19

@ferventcoder
Copy link
Contributor

So this is going to be choco list pkgname -lo and choco list pkgname -lo -all

@ferventcoder
Copy link
Contributor

I mean super fast :)

@gep13
Copy link
Member

gep13 commented Apr 26, 2013

Should we add a task, somewhere, to get the documentation updated to reflect this change, or where do things like that get logged so they are not forgotten?

@ferventcoder
Copy link
Contributor

It will be a documentation change. Cver is very specific and clist is not.
We may need a flag to make it a very specific filter.

On Friday, April 26, 2013, Gary Ewan Park wrote:

Should we add a task, somewhere, to get the documentation updated to
reflect this change, or where do things like that get logged so they are
not forgotten?


Reply to this email directly or view it on GitHubhttps://github.com//pull/260#issuecomment-17056837
.


Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@rismoney
Copy link
Contributor Author

Ok - so this is confusing...as clist and cver have been for quite some time. But I think we are missing the intent for this PR.

I am running the current source version now... (btw - sysinternals is pkg version for demonstrative purposes)
The functionality I added gave this-

C:\Chocolatey> chocolatey version sysinternals -version all -lo

name                                                        found
----                                                        -----
sysinternals                                                1.2012.05.20130124
sysinternals                                                2.0

This is the list of packages installed locally on my system.

The chocolatey list sysinternals -lo -all gives this (which looks like a 
sysinternals 1.2012.05.20130124
sysinternals 1.2012.05.23

This is the list of packages on the feed. not sure what local only does in this use case, unless it is not developed yet...

@rismoney
Copy link
Contributor Author

Perhaps I was obtuse...My goal for this PR, was to be able to query locally installed packages and their respective versions (and not check feed) and return as an object.

@ferventcoder
Copy link
Contributor

It is developed, but you have to have the latest source installed. Otherwise the -lo is going to be ignored. I just added it last night. :)

@ferventcoder
Copy link
Contributor

It points to the local chocolatey lib folder as a source and good old nuget to do the searching.

@rismoney
Copy link
Contributor Author

I just built it from source 30 min ago...

@ferventcoder
Copy link
Contributor

We can upgrade the list to return object - I'm not sure if it does now.

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

Successfully merging this pull request may close these issues.

None yet

3 participants