Could I use Pash to install Chocolatey?

182 views
Skip to first unread message

Qian Hong

unread,
Feb 1, 2015, 11:54:55 AM2/1/15
to pash-p...@googlegroups.com
Hi all,

Thanks for the Pash Project, it is an amazing project.
However I am trying to install Chocolatey ( https://github.com/chocolatey/chocolatey/wiki/Installation ) using Pash, but I didn't have any good progress.

Chocolatey is a package manager for Windows users. The installation of Chocolatey heavily depends on Power Shell. I want to run Chocolatey on Wine on Linux to test thousands of Windows software installers, one way is to support Microsoft Power Shell + Microsoft .Net Framework on Wine first, which would be quite hard, the other way is using Pash + Mono on Wine, which I'm not sure how hard is it yet.

I tried the command line in chocolatey wiki, but nothing works so far. For example:

PASH Z:\home\fracting\src\Pash\Source\PashConsole\bin\Debug> (iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')))>$null 2>&1
Parse error: The parser internally crashed and gets reinitialized.
Although this shouldn't happen, it's likel...
  +CategoryInfo: ParserError, Reason: ParseException
  +FullyQualifiedErrorId: Parse


PASH Z:\home\fracting\src\Pash\Source\PashConsole\bin\Debug> Set-ExecutionPolicy Unrestricted
Command 'Set-ExecutionPolicy' not found.
  +CategoryInfo: ObjectNotFound, Reason: ParentContainsErrorRecordException
  +FullyQualifiedErrorId: CommandNotFoundException

PASH Z:\home\fracting\src\Pash\Source\PashConsole\bin\Debug> iex
Command 'Invoke-Expression' not found.
  +CategoryInfo: ObjectNotFound, Reason: ParentContainsErrorRecordException
  +FullyQualifiedErrorId: CommandNotFoundException

Anyone has idea what's wrong here? Is Pash complete enough to install Chocolatey itself and even support packages installation from Chocolatey repository?
If not, how hard is it to support Chocolatey and how could I start from hacking Pash?

Thank you for any advice, running Chocolatey using Pash on Wine will be very very useful for me. Thanks again for the great job!


--
Regards,
Qian Hong

-
http://www.winehq.org

Stefan Burnicki

unread,
Feb 2, 2015, 9:31:56 AM2/2/15
to pash-p...@googlegroups.com, frac...@gmail.com
Hi,

unfortunately not all Powershell features are implemented in Pash, yet.

The examples you gave don't work because those features aren't implemented. As for example redirecting is still incomplete (https://github.com/Pash-Project/Pash/issues/337),
and cmdlets are missing (https://github.com/Pash-Project/Pash/issues/283).

I cannot state exactly how hard it would be to support Chocolatey, but it's likely to be very hard. But anyway, we are continuously trying to improve Pash and support more features.
Help is always more than welcome. If you want to help us, feel free to start with the implementation of useful cmdlets or missing features. Just check our github issues and ask if you have specific questions.

Bringing Pash to a state that is good enough to run Chocolatey would indeed be an awesome goal, I think.

Regards,
Stefan 

Qian Hong

unread,
Feb 2, 2015, 10:58:13 AM2/2/15
to Stefan Burnicki, pash-p...@googlegroups.com
Hi Stefan,

On Mon, Feb 2, 2015 at 10:31 PM, Stefan Burnicki
<stefan....@gmail.com> wrote:
>
> unfortunately not all Powershell features are implemented in Pash, yet.
>
> The examples you gave don't work because those features aren't implemented. As for example redirecting is still incomplete (https://github.com/Pash-Project/Pash/issues/337),
> and cmdlets are missing (https://github.com/Pash-Project/Pash/issues/283).
>
> I cannot state exactly how hard it would be to support Chocolatey, but it's likely to be very hard. But anyway, we are continuously trying to improve Pash and support more features.
> Help is always more than welcome. If you want to help us, feel free to start with the implementation of useful cmdlets or missing features. Just check our github issues and ask if you have specific questions.
>
> Bringing Pash to a state that is good enough to run Chocolatey would indeed be an awesome goal, I think.

Thanks a lot for the answer and the resource, it helps a lot.
Making sure I'm not doing in the wrong way is a very important step,
I'll try to dig into Pash and see what I can do. If there is any
further question or any progress I'll come back again.

BTW, after worked around two issue in wine-mono, choco (new
chocolatey) starts to run on Wine, download package installation
scripts correctly, then fail on Pash. This is not good enough but at
least very interesting :)

Reference:
[1]https://bugs.winehq.org/show_bug.cgi?id=37996
[2]https://bugzilla.xamarin.com/show_bug.cgi?id=26639

Andreu Correa Casablanca

unread,
Feb 23, 2015, 6:37:47 AM2/23/15
to pash-p...@googlegroups.com, stefan....@gmail.com, frac...@gmail.com
Hi Quian,

how did you try Chocolatey on Wine? The installer script linked in their page doesn't work because it uses typed variables and Pash doesn't support it yet.
Reply all
Reply to author
Forward
0 new messages