Updated the PKGBUILD to export in the two scopes. Still haven't found a way to make package vendoring easier to use in PKGBUILDs.
Search Criteria
Package Details: yay 12.4.2-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/yay.git (read-only, click to copy) |
---|---|
Package Base: | yay |
Description: | Yet another yogurt. Pacman wrapper and AUR helper written in go. |
Upstream URL: | https://github.com/Jguer/yay |
Keywords: | arm AUR go helper pacman wrapper x86 |
Licenses: | GPL-3.0-or-later |
Submitter: | jguer |
Maintainer: | jguer |
Last Packager: | jguer |
Votes: | 2280 |
Popularity: | 24.93 |
First Submitted: | 2016-10-05 17:20 (UTC) |
Last Updated: | 2024-09-19 14:27 (UTC) |
Dependencies (5)
- git (git-gitAUR, git-glAUR)
- pacman (pacman-gitAUR)
- go (go-gitAUR, gcc-go-gitAUR, gcc-go-snapshotAUR, gcc-go) (make)
- doasAUR (opendoas) (optional) – privilege elevation
- sudo (fake-sudoAUR, polkit-fakesudoAUR, sudo-gitAUR, doas-sudo-shimAUR, doas-sudo-shim-minimalAUR, sudo-hgAUR, fudo-gitAUR, sudo-selinuxAUR) (optional) – privilege elevation
Required by (43)
- aconfmgr-git (optional)
- arch-update (optional)
- arch-update-git (optional)
- axu
- axu-bin
- blender-launcher-git
- checkupdatify
- cleanupdate-git (optional)
- cmd-not-found (optional)
- dpw (optional)
- etwas
- fuzzy-pkg-finder (optional)
- fzpac (optional)
- fzpac-git (optional)
- idos-package-updater-script
- klaus-bin
- meta-package-manager (optional)
- meta-package-manager-git (optional)
- octopi (optional)
- pac-util (optional)
- pac-util-git (optional)
- packup (optional)
- pacup-arch-git (optional)
- pak-bin
- pak-git
- parui (optional)
- parui-git (optional)
- paxs
- pcmn-git
- pipac (optional)
- pkg-listn (optional)
- pkg-listn-git (optional)
- pkgctrl-bin
- pkm
- plasma6-applets-arch-update-notifier (optional)
- pmm-git (optional)
- ppac-git (optional)
- repkg (optional)
- spm-arch
- ualsv
- uau (optional)
- update-notifier (optional)
- yayfzf
Sources (1)
jguer commented on 2017-12-06 01:00 (UTC)
egrupled commented on 2017-12-05 11:12 (UTC) (edited on 2017-12-05 11:14 (UTC) by egrupled)
I think I found it. At first I tried build it with pacaur and it failed. I tried then manually with makepkg and it worked.
It seems that pacaur discards env variables between prepare and build sections. It means it's better to set them twice like this:
prepare() {
export GOPATH="${srcdir}/.go"
export GOBIN="$GOPATH/bin"
mkdir -p "$GOPATH"
rm -rf "$GOPATH/src"
ln -sf "$srcdir/$pkgname-$pkgver/vendor" "$GOPATH/src"
}
build() {
export GOPATH="${srcdir}/.go"
export GOBIN="$GOPATH/bin"
cd "$srcdir/$pkgname-$pkgver"
go build -v -o ${pkgname} -ldflags "-s -w -X main.version=${pkgver}"
}
jguer commented on 2017-12-05 03:20 (UTC)
Weird, just tried a clean build and it worked. It appears your $GOPATH is not being changed to the temporary one. I'm trying to reproduce it.
egrupled commented on 2017-12-04 09:53 (UTC) (edited on 2017-12-05 10:55 (UTC) by egrupled)
Doesn't build after https://aur.archlinux.org/cgit/aur.git/commit/?h=yay&id=c36666539b51
and https://aur.archlinux.org/cgit/aur.git/commit/?h=yay&id=1cec81f1f8e5
completions.go:9:2: cannot find package "github.com/jguer/go-alpm" in any of:
/usr/lib/go/src/github.com/jguer/go-alpm (from $GOROOT)
/home/user/go/src/github.com/jguer/go-alpm (from $GOPATH)
dependencies.go:7:2: cannot find package "github.com/mikkeloscar/aur" in any of:
/usr/lib/go/src/github.com/mikkeloscar/aur (from $GOROOT)
/home/user/go/src/github.com/mikkeloscar/aur (from $GOPATH)
install.go:9:2: cannot find package "github.com/mikkeloscar/gopkgbuild" in any of:
/usr/lib/go/src/github.com/mikkeloscar/gopkgbuild (from $GOROOT)
/home/user/go/src/github.com/mikkeloscar/gopkgbuild (from $GOPATH)
==> ERROR: A failure occurred in build().
Pinned Comments
jguer commented on 2024-03-16 08:06 (UTC)
This will happen if you upgrade pacman and yay separately If you have this error you need to manually recompile yay
jguer commented on 2019-04-16 14:08 (UTC)
I cannot delete the spam comments appearing regularly in this page, which has also led me to disable notifications from here. I remind that the best way to receive support or report a problem is through the Upstream URL.