Please add to PKGBUILD: options=('!strip')
This will speed up packaging significantly.
It is a handy option when repackaging binary.
| Git Clone URL: | https://aur.archlinux.org/visual-studio-code-bin.git (read-only, click to copy) |
|---|---|
| Package Base: | visual-studio-code-bin |
| Description: | Visual Studio Code (vscode): Editor for building and debugging modern web and cloud applications (official binary version) |
| Upstream URL: | https://code.visualstudio.com/ |
| Licenses: | custom: commercial |
| Conflicts: | code |
| Provides: | code, vscode |
| Submitter: | dcelasun |
| Maintainer: | dcelasun |
| Last Packager: | dcelasun |
| Votes: | 1668 |
| Popularity: | 31.05 |
| First Submitted: | 2017-12-18 19:14 (UTC) |
| Last Updated: | 2026-05-20 10:43 (UTC) |
« First ‹ Previous 1 .. 35 36 37 38 39 40 41 42 43 44 45 .. 90 Next › Last »
Please add to PKGBUILD: options=('!strip')
This will speed up packaging significantly.
It is a handy option when repackaging binary.
Thanks @ItachiSan and @TheCycoONE, I've updated the PKGBUILD.
Hi @cdelasun,
As @TheCycoONE has mentioned, there are some issues with the sources definition.
Sources in the source array (not the _ARCH ones) are used for all architectures, while architecture specific ones will be used on the specific architecture.
With this said you can improve the PKGBUILD in this way:
diff --git a/PKGBUILD b/PKGBUILD
index 1e1ee8d..9801312 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,38 +14,18 @@ conflicts=('code')
depends=(libxkbfile gnupg gtk3 libsecret nss gcc-libs libnotify libxss glibc lsof)
optdepends=('glib2: Needed for move to trash functionality'
'libdbusmenu-glib: Needed for KDE global menu')
-source=(code_x64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/${pkgver}/linux-x64/stable
- ${_pkgname}.desktop ${_pkgname}-url-handler.desktop)
-
-
-source_x86_64=(code_x64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-x64/stable
- ${_pkgname}.desktop ${_pkgname}-url-handler.desktop
- )
-source_aarch64=(code_arm64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-arm64/stable
- ${_pkgname}.desktop ${_pkgname}-url-handler.desktop
- )
-source_armv7h=(code_armhf_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-armhf/stable
- ${_pkgname}.desktop ${_pkgname}-url-handler.desktop
- )
-source_i686=(code_ia32_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-ia32/stable
- ${_pkgname}.desktop ${_pkgname}-url-handler.desktop
- )
-
-sha256sums=('e08e5826afdb838cb3a04d9f13d2161f3d7219884b85fcfe133401fbb415dda1'
- '0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
+source=(${_pkgname}.desktop ${_pkgname}-url-handler.desktop)
+source_x86_64=(code_x64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-x64/stable)
+source_aarch64=(code_arm64_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-arm64/stable)
+source_armv7h=(code_armhf_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-armhf/stable)
+source_i686=(code_ia32_${pkgver}.tar.gz::https://vscode-update.azurewebsites.net/latest/linux-ia32/stable)
+# This generates cleaner checksums
+sha256sums=('0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
'be3d123aacd575d8f836728266eb421ea70399d713d1fc30378dbc5602b519fb')
-sha256sums_x86_64=('e08e5826afdb838cb3a04d9f13d2161f3d7219884b85fcfe133401fbb415dda1'
- '0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
- 'be3d123aacd575d8f836728266eb421ea70399d713d1fc30378dbc5602b519fb')
-sha256sums_i686=('64360439cc2fa596838062f7e6f9757b79d4b775a564f18bad6cbad154bf850c'
- '0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
- 'be3d123aacd575d8f836728266eb421ea70399d713d1fc30378dbc5602b519fb')
-sha256sums_aarch64=('657dc3190e44095efe283e9c2b776c68fffaf6ad6675db13dca173f918701001'
- '0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
- 'be3d123aacd575d8f836728266eb421ea70399d713d1fc30378dbc5602b519fb')
-sha256sums_armv7h=('b5003b3a87ef57f508996fa85e3ea285ac942f69734a68ddc889386f3ec2a244'
- '0deefcb638e06c35a52e7e9fb8e19b2dc393f01e5c1c122d2938cddeb22cf8de'
- 'be3d123aacd575d8f836728266eb421ea70399d713d1fc30378dbc5602b519fb')
+sha256sums_x86_64=('e08e5826afdb838cb3a04d9f13d2161f3d7219884b85fcfe133401fbb415dda1')
+sha256sums_i686=('64360439cc2fa596838062f7e6f9757b79d4b775a564f18bad6cbad154bf850c')
+sha256sums_aarch64=('657dc3190e44095efe283e9c2b776c68fffaf6ad6675db13dca173f918701001')
+sha256sums_armv7h=('b5003b3a87ef57f508996fa85e3ea285ac942f69734a68ddc889386f3ec2a244')
package() {
The multiarch handling seems slightly off, on aarch64 it downloads and extracts both the x64 and arm64 versions, and the shared files are checked multiple times.
The end result works, but I think only the non-arch files (.desktop files) belong in source=, and they shouldn't be repeated in the source_arch sections.
With version 1.50.1 I've added ARM builds to this package. I don't have an ARM system to test with so let me know if you see any issues.
The current version of this package only supports x64, not the (new) arm or arm64/aarch64 builds of VSCode. I had no issues using the official tar.gz for 1.50 from https://aka.ms/linux-arm64 on a Pinebook Pro (aarch64).
To anyone get this error:
:: (1/1) Parsing SRCINFO: visual-studio-code-bin
==> ERROR: PKGBUILD contains CRLF characters and cannot be sourced.
error downloading sources: visual-studio-code-bin
Use command git config --global core.autocrlf false and delete ~/.cache/yay/visual-studio-code-bin might help
Pretty common for people to hardcode for Ubuntu.
@alosarjos I'd say that's a bug with their tool. Instead of checking a hardcoded path they should look for the code binary in $PATH. I'd report it upstream.
I was checking the official binary install paths. Seems to be different than this package. The official Ubuntu .deb seems to install on /usr/share/code.
In the case of the Flutter framework, their doctor tool to check if VSCode is correctly installed has the /usr/share/code/bin/code path hardcoded to check if it's installed on the system, so it doesn't detect the installation from this package.
While this is a minor thing that won't stop Flutter from working with Flutter, I don't know if this could lead to another frameworks or tools problems that need to detect if VSCode is installed using the expected binary path from the official packages.
PD: Thanks a lot for maintaining this package.
Pinned Comments
dcelasun commented on 2017-11-15 06:20 (UTC) (edited on 2026-01-23 13:07 (UTC) by dcelasun)
FREQUENTLY ASKED QUESTIONS (read before flagging or commenting!)
This is the official binary distribution from Microsoft. The one in the community repo is an unofficial build made from source. Beyond the licence difference and branding, there are some proprietary features not available in the open-source version.
This package depends on both the official tarball and files from GitHub. Please check this page AND this page before flagging as out-of-date. If the new version isn't on both pages, this package cannot be updated! If you can see the new version on both pages, but the AUR package is still not updated, flag it and give it time. It's usually done within hours.
Sometimes AUR helpers do weird things. Download the tarball and install it manually with
makepkg -si. If that works, report the problem to your AUR helper's upstream, not here.xdg-openuses vscode, not my file manager! How do I fix this?Install
shared-mime-info-gnomegnome-sessionwhich now includes mimemapps.Just because $X is not required to open the app, doesn't mean there is nothing that depends on it. Always search the comment history on AUR to see if that dependency has been previously discussed before writing your own comment. Still nothing? Then use namcap to make sure it's really not needed. If namcap doesn't complain, please leave a comment here and I'll investigate.
The problem might be a packaging issue (wrong paths, dependencies, icons), so please write a comment here first. If you don't get a reply, or if someone says it's an upstream issue, you can report it on GitHub.
No, you won't get a reply. Please stop doing this. Leave a comment here instead and be patient.