Package Details: powershell 6.2.3-1

Git Clone URL: https://aur.archlinux.org/powershell.git (read-only)
Package Base: powershell
Description: A cross-platform automation and configuration tool/framework (latest release)
Upstream URL: https://github.com/PowerShell/PowerShell
Keywords: microsoft powershell shell
Licenses: MIT
Submitter: jsteel
Maintainer: kylesferrazza
Last Packager: kylesferrazza
Votes: 52
Popularity: 2.238798
First Submitted: 2016-11-26 22:16
Last Updated: 2019-09-20 00:50

Pinned Comments

kylesferrazza commented on 2017-10-26 18:01

Note that the binary is now called "pwsh"

Latest Comments

1 2 3 4 5 6 ... Next › Last »

skypixel commented on 2019-10-13 09:58

For those wondering, Install-Module doesn't work because OneGet is not included in this package (see https://github.com/PowerShell/PowerShell/issues/6472#issuecomment-375997500 ). @kylesferrazza is there any reason why OneGet is not included? Wouldn't it make sense to make it available since it's the main means to install external modules?

kylesferrazza commented on 2019-09-12 21:34

@agowa338

That patch breaks the build for me:

$ pwsh
Error:
  An assembly specified in the application dependencies manifest (pwsh.deps.json) was not found:
    package: 'runtime.linux-x64.Microsoft.NETCore.App', version: '2.1.12'
    path: 'runtimes/linux-x64/native/System.IO.Compression.Native.a'

agowa338 commented on 2019-07-28 23:09

The wrong folder gets copied, therefore some dependencies are fetched from the nuget cache after the package is installed. If you now try to run pwsh from any other user it will fail, as the nuget cache is no longer accessible (belongs to the build user). Same happens if you move the final package to a remote system, install and try to run it. (The global‑packages cache is located at ~/.nuget)

This can be fixed by:

diff --git a/PKGBUILD b/PKGBUILD
index 4991b8d..6daa85e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -80,18 +80,18 @@ package() {
   cd "$pkgname/src/powershell-unix"

   mkdir -p "$pkgdir/usr/lib/$pkgname"
-  cp -a "bin/Linux/netcoreapp2.1/linux-x64" "$pkgdir/usr/lib/$pkgname"
-  chmod 755 "$pkgdir/usr/lib/$pkgname/linux-x64/$binaryname"
+  cp -aR "bin/." "$pkgdir/usr/lib/$pkgname"
+  chmod 755 "$pkgdir/usr/lib/$pkgname/$binaryname"

   mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
   cp "../../LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

   mkdir -p "$pkgdir/usr/bin"
-  ln -s "/usr/lib/$pkgname/linux-x64/$binaryname" "$pkgdir/usr/bin/$binaryname"
+  ln -s "/usr/lib/$pkgname/$binaryname" "$pkgdir/usr/bin/$binaryname"

   chmod 644 \
-    "$pkgdir/usr/lib/powershell/linux-x64/libhostfxr.so" \
-    "$pkgdir/usr/lib/powershell/linux-x64/libhostpolicy.so" \
-    "$pkgdir/usr/lib/powershell/linux-x64/en-US/default.help.txt" \
-    "$pkgdir/usr/lib/powershell/linux-x64/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1"
+    "$pkgdir/usr/lib/$pkgname/libhostfxr.so" \
+    "$pkgdir/usr/lib/$pkgname/libhostpolicy.so" \
+    "$pkgdir/usr/lib/$pkgname/en-US/default.help.txt" \
+    "$pkgdir/usr/lib/$pkgname/Modules/PSDesiredStateConfiguration/PSDesiredStateConfiguration.psm1"
 }

sogaiu commented on 2019-06-15 04:11

Following up on earlier comments (e.g. having to do with PSReadLine), here is some info comparing the -bin and vanilla packages (at least as of version 6.2.1-1):

The output of Get-Module -listavailable for the powershell-bin package (6.2.1-1) is (sorry for the truncation):

ModuleType Version    Name                                PSEdition ExportedCommands
---------- -------    ----                                --------- ----------------
Manifest   1.2.3.0    Microsoft.PowerShell.Archive        Desk      {Compress-Archive, Expa…
Manifest   6.1.0.0    Microsoft.PowerShell.Host           Core      {Start-Transcript, Stop…
Manifest   6.1.0.0    Microsoft.PowerShell.Management     Core      {Add-Content, Clear-Con…
Manifest   6.1.0.0    Microsoft.PowerShell.Security       Core      {Get-Credential, Get-Ex…
Manifest   6.1.0.0    Microsoft.PowerShell.Utility        Core      {Export-Alias, Get-Alia…
Script     1.3.2      PackageManagement                   Desk      {Find-Package, Get-Pack…
Script     2.1.3      PowerShellGet                       Desk      {Find-Command, Find-DSC…
Script     0.0        PSDesiredStateConfiguration         Desk      {AddDscResourceProperty…
Script     2.0.0      PSReadLine                          Desk      {Get-PSReadLineKeyHandl…
Binary     1.1.2      ThreadJob                           Desk      Start-ThreadJob

while for this package, I saw:

ModuleType Version    Name                                PSEdition ExportedCommands
---------- -------    ----                                --------- ----------------
Manifest   6.1.0.0    Microsoft.PowerShell.Host           Core      {Start-Transcript, Stop…
Manifest   6.1.0.0    Microsoft.PowerShell.Management     Core      {Add-Content, Clear-Con…
Manifest   6.1.0.0    Microsoft.PowerShell.Security       Core      {Get-Credential, Get-Ex…
Manifest   6.1.0.0    Microsoft.PowerShell.Utility        Core      {Export-Alias, Get-Alia…
Script     0.0        PSDesiredStateConfiguration         Desk      {ValidateNodeResourceSo…

Not sure if it's related, but the issue tracker for powershell, came across:

https://github.com/PowerShell/PowerShell/issues/9005

May be some of these bits can help the current situation.

xopher_mc commented on 2019-05-25 10:36

For those having the locale problem make sure that the en_US.UTF-8 is uncommented in /etc/locale.gen. Then run as root locale-gen. The problem is that the locale must exist to be switched to, even if it isn't the locale you are usually using.

sengle commented on 2019-05-14 22:49

Sorry I missed what you were saying about PSReadLine not being in the build. Here is what I did as a workaround.

1) Download the archive from Github.

https://github.com/PowerShell/PowerShell/releases/download/v6.2.0/powershell-6.2.0-linux-x64.tar.gz

2) Extract PSReadLine from the Modules directory of the archive to the /usr/lib/powershell/linux-x64/Modules directory.

sudo tar -C /usr/lib/powershell/linux-x64 -xvf powershell-6.2.0-linux-x64.tar.gz ./Modules/PSReadLine

3) Now if you restart pwsh it should work fine or you can manually import the module and enable tab completion.

Import-Module PSReadLine

Set-PSReadLineKeyHandler -Key Tab -Function Complete

Hope this helps until the build is fixed.

kylesferrazza commented on 2019-04-28 14:22

@bdurbin Not sure why PSReadline isn't part of the build process but I'm happy to look into it or accept a patch if you figure it out before I do.

bdurbin commented on 2019-04-28 02:29

Just curious, but why is PSReadline not in this package, yet it's in powershell-bin? I can try to find some time to investigate, but I thought I'd ask.

FranklinYu commented on 2019-02-23 04:14

@DragonX256 There is only one commit for version 6.1.3 in Git log. There is probably something wrong with your package manager if it builds 6.1.3 twice. Please report to Yay instead of here.

DragonX256 commented on 2019-02-23 04:03

Isn't this package shouldn't have been built like powershell-git? It should built only once. On my system with yay package manager it already built 6.1.3-1 version two times because of new commits in repo.