[Enhancement] Install multiple packages with single command line #191
Comments
@Redsandro Hey thanks for the kudos! This also doesn't mean that features like this cannot be added. We've discussed this a couple of times in the mailing list, however upon searching it doesn't appear that it was ever made into an Enhancement. We are definitely adding this feature. Issue 2 - Stopping on ErrorThe second note, that chocolatey stops on error is not a behavior we want in v1. Please file it as a separate issue. |
Also, it's important to note that apt-get is very stable in it's feature set. It's been around for awhile and is a mature product. Chocolatey on the other hand is not even to v1 yet. It's immature and not stable in it's feature set yet. Something to keep in mind. :D |
Don't get me wrong, I am enthusiastic about this and don't mean to be nitpicky! Ofcourse it's not gonna be apt-get all the way. But the ease of installing your favourite apps on a clean OS all at once using a single command is arguably one of the most useful and widely used features of a package manager. I've used apt-get, yum, aptitude, pacman and dpkg, and they all do this. I guess I automatically assumed it is expected behavior of a package manager. Sorry, I am new to this, I just googled around, found chocolately and npackd. One of the reasons I chose chocolately first was because I read it was older, so I didn't really think about not even to v1 yet. :P (The other reason is that the Chocolately site is much nicer and has terminal support out of the box. Very nice!) (Admittedly I installed npackd afterwards to install the packages that had failed in chocolately (like Security Essentials) and/or didn't have a 64 bit candidate.) (Since Chocolately is much nicer, but npackd fails less often, think of the amount of bases that are belong to you if the projects are merged! ;)) |
Actually I would have to verify, but I believe npackd is older. Chocolately has been around for about a year and a half. I don't mind nitpicky at all! It's a way we get better. I honestly don't use packages.config that much. I prefer
That's why we definitely want the ability to pass in a list and to keep going if one fails. |
This lifehacker article about npackd is older by a month than chocolatey: http://m.lifehacker.com/5754305/npackd-is-a-linux+like-package-manager-for-windows And to avoid confusion, the date of the article is a month before chocolatey development started. |
Hey you are right. It's a wonder I made it through school, I still don't do my homework right. :P Thanks for the hints. Is powershell different from the normal shell? Could you give an example on how to do the array thing on powershell? It would give me some power before v1 hits the stage. On Linux it would be: Now you mention it, I think it's also possible in normal shell (cmd), probably something like this iirc: |
By the way, since Chocolately can internally process a list from XML (packages.conf), isn't it relatively easy to implement a feature to use a command-line list? I imagine the list from XML will end up in an unshifting array or something. I don't know powershell coding but using javascript pseudocode it would be something like this: // Use command line multiple input if no packages.conf is specified
if (arguments.length > 2) // Multiple packages found
for (var n=2; n<arguments.length; n++) // From first to last package
install_array.push(arguments[n]); // Create installation array Where:
|
I updated Here is the update: #304 |
Agreed that the xml batch stopping on error is annoying. |
This is fixed in 6ca7ed1 |
also in alpha2 prerelease... |
|
or |
I noticed I did |
This sounds reasonable at first glance, however, does it feel natural to say --beta when it installs an alpha or rc? And .... if there was a beta version and a more recent alpha, wouldn't you want it to install the beta and not the alpha based on the wording of the switch? |
True. I hadn't thought of that. It's not as simple as I thought. Monday half brain day. |
My brain is ...... well somewhat fried. :) |
I come from an Ubuntu environment, and found Chocolately by googling apt-get for windows.
On the introduction page it sais: "Chocolatey is like apt-get, but built with Windows in mind".
However, the FIRST thing that anyone used to apt-get does is make it install multiple packages like so:
cinst app1 app2 app3 (...) app20
Which doesn't work. You have to hack together some XML file called packages.conf to install multiple packages.
Which brings me to the second issue: On error, Chocolately just stops!
You have to remove the finished packages from the XML, including the failed one, and try again. I think Chocolately should just continue going, and mention the failed packages after everything is done.
Otherwise you can never leave your computer unattended and move on to the next one, knowing at least everything that doesn't fail will be installed once you get back.
Perhaps that last annoyance is what is talked about in issue #154, but I am not sure.
The text was updated successfully, but these errors were encountered: