Package Details: powershell 7.4.1-4

Git Clone URL: https://aur.archlinux.org/powershell.git (read-only, click to copy)
Package Base: powershell
Description: A cross-platform automation and configuration tool/framework (latest release)
Upstream URL: https://github.com/PowerShell/PowerShell
Keywords: .net automation microsoft net powershell script scripting shell
Licenses: MIT
Submitter: jsteel
Maintainer: kylesferrazza (richardba, carsme)
Last Packager: carsme
Votes: 83
Popularity: 1.38
First Submitted: 2016-11-26 22:16 (UTC)
Last Updated: 2024-03-10 11:11 (UTC)

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 11 12 13 .. 18 Next › Last »

kylesferrazza commented on 2019-10-28 17:12 (UTC)

@skypixel

I agree it would make sense to package OneGet with this package. I am currently working on adding it to the build. I would appreciate a patch if you have the time to work on it before I get to it.

DDoSolitary commented on 2019-10-27 17:21 (UTC)

Hello, I'm unable to run pwsh after building&installing this package. It says:

Error:
  An assembly specified in the application dependencies manifest (pwsh.deps.json) was not found:
    package: 'Markdig.Signed', version: '0.17.1'
    path: 'lib/netcoreapp2.1/Markdig.Signed.dll'

skypixel commented on 2019-10-13 09:58 (UTC)

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 (UTC) (edited on 2019-09-12 21:44 (UTC) by kylesferrazza)

@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'

agowa commented on 2019-07-28 23:09 (UTC)

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 (UTC) (edited on 2019-06-15 04:12 (UTC) by sogaiu)

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 (UTC)

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 (UTC) (edited on 2019-05-14 22:51 (UTC) by sengle)

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.