Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-G/--getpkgbuild is downloading outdated PKGBUILDs from ABS #1135

Closed
AndydeCleyre opened this issue Dec 18, 2019 · 7 comments
Closed

-G/--getpkgbuild is downloading outdated PKGBUILDs from ABS #1135

AndydeCleyre opened this issue Dec 18, 2019 · 7 comments

Comments

@AndydeCleyre
Copy link

Affected Version

yay v9.4.2.r17.gb08e505 - libalpm v12.0.1

Issue

-G/--getpkgbuild is downloading outdated PKGBUILDs for ABS packages.

Steps to reproduce

yay -S --noconfirm asp &>/dev/null

yay -G buildah
mv buildah buildah-yay
asp checkout buildah
diff -u buildah/repos/community-x86_64/PKGBUILD buildah-yay/PKGBUILD

Output

:: Querying AUR...
:: Downloaded PKGBUILD from ABS (1/1): buildah

warning: no common commits                                                                                                                                     
remote: Enumerating objects: 202, done.                                                                                                                        
remote: Counting objects: 100% (202/202), done.                                                                                                                
remote: Compressing objects: 100% (141/141), done.                                                                                                             
remote: Total 202 (delta 38), reused 163 (delta 18)                                                                                                            
Receiving objects: 100% (202/202), 33.33 KiB | 5.55 MiB/s, done.                                                                                               
Resolving deltas: 100% (38/38), done.                                                                                                                          
From https://git.archlinux.org/svntogit/community                                                                                                              
 * branch            packages/buildah -> FETCH_HEAD                                                                                                            
 * [new branch]      packages/buildah -> community/packages/buildah                                                                                            
Cloning into 'buildah'...                                                                                                                                      
done.
--- buildah/repos/community-x86_64/PKGBUILD	2019-12-18 15:50:10.223003600 -0500
+++ buildah-yay/PKGBUILD	2019-12-18 15:45:55.153599389 -0500
@@ -1,8 +1,7 @@
 # Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
-# Maintainer: Morten Linderud <foxboron@archlinux.org>
 
 pkgname=buildah
-pkgver=1.12.0
+pkgver=1.11.4
 pkgrel=1
 pkgdesc="A tool which facilitates building OCI images"
 arch=(x86_64)
@@ -11,7 +10,7 @@
 depends=(ostree runc skopeo slirp4netns)
 makedepends=(go-pie git bash-bats btrfs-progs device-mapper gpgme libassuan
              bzip2 go-md2man runc skopeo)
-_commit=6cc46567d1c7011bc99ac99ecc6239f2d3df0aa9 # tags/v1.12.0
+_commit=21b4778b359ef7d6efe877c2f90f3df67ad93609  # tags/v1.11.4
 source=(git://github.com/containers/buildah.git#commit=$_commit)
 md5sums=('SKIP')
 
@@ -20,15 +19,19 @@
   git describe --tags | sed 's/^[vV]//;s/-/+/g'
 }
 
+prepare() {
+  mkdir -p src/github.com/containers
+  cp -r $pkgname src/github.com/containers
+}
+
 build() {
-  cd $pkgname 
-  export GOFLAGS="-trimpath"
-  export CGO_LDFLAGS="$LDFLAGS"
-  make PREFIX=/usr BUILDTAGS="containers_image_ostree_stub ostree seccomp"
+  export GOPATH="${srcdir}"
+  cd src/github.com/containers/buildah
+  make PREFIX=/usr BUILDTAGS="containers_image_ostree_stub ostree seccomp" EXTRALDFLAGS="-ldflags '-extldflags ${LDFLAGS}'"
 }
 
 package() {
-  cd $pkgname
+  cd src/github.com/containers/buildah
   make DESTDIR="$pkgdir" PREFIX=usr install
   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

Config

~/.config/yay/config.json:

{
    "answerclean": "None",
    "answerdiff": "All",
    "buildDir": "/home/andy/Code/yaytmp/",
    "combinedupgrade": true,
    "makepkgbin": "/usr/bin/makepkg",
    "pacmanbin": "/usr/bin/pacman",
    "removemake": "yes",
    "tarbin": "/usr/bin/bsdtar"
}

yay -Pg:

{
	"aururl": "https://aur.archlinux.org",
	"buildDir": "/home/andy/Code/yaytmp/",
	"absdir": "/home/andy/.cache/yay/abs",
	"editor": "",
	"editorflags": "",
	"makepkgbin": "/usr/bin/makepkg",
	"makepkgconf": "",
	"pacmanbin": "/usr/bin/pacman",
	"pacmanconf": "/etc/pacman.conf",
	"redownload": "no",
	"rebuild": "no",
	"batchinstall": false,
	"answerclean": "None",
	"answerdiff": "All",
	"answeredit": "",
	"answerupgrade": "",
	"gitbin": "git",
	"gpgbin": "gpg",
	"gpgflags": "",
	"mflags": "",
	"sortby": "votes",
	"searchby": "name-desc",
	"gitflags": "",
	"removemake": "yes",
	"sudobin": "sudo",
	"sudoflags": "",
	"requestsplitn": 150,
	"sortmode": 0,
	"completionrefreshtime": 7,
	"sudoloop": false,
	"timeupdate": false,
	"devel": false,
	"cleanAfter": false,
	"provides": true,
	"pgpfetch": true,
	"upgrademenu": true,
	"cleanmenu": true,
	"diffmenu": true,
	"editmenu": false,
	"combinedupgrade": true,
	"useask": false
}
@parkerlreed
Copy link
Contributor

Maybe just some lag on new release? I just did yay -G buildah and the PKGBUILD it pulled from abs was 1.12.0 as it should be.

@AndydeCleyre
Copy link
Author

I'm still getting buildah 1.11.4 from yay -G buildah. And dolphin 19.08.3 (current is 19.12.0). Other packages I've tested with so far seem to be fine. Maybe a caching issue?

@Jguer
Copy link
Owner

Jguer commented Dec 23, 2019

I just yay -G buildah and yay -G dolphin. I got 1.12.0 and 19.12.0 respectively. I'll still investigate if this is cache related

@Jguer Jguer added Status: In Progress Being implemented/fixed Type: Bug labels Dec 23, 2019
@Jguer
Copy link
Owner

Jguer commented Dec 23, 2019

It is a cache related bug, I'm fixing it now

@Jguer Jguer added Status: Pull Request pending and removed Status: In Progress Being implemented/fixed labels Dec 23, 2019
@Jguer
Copy link
Owner

Jguer commented Dec 23, 2019

@AndydeCleyre can you test #1136 and confirm it solves the issue?

@AndydeCleyre
Copy link
Author

@Jguer Yes, excellent, that branch fixes the issue, thank you!

@Jguer
Copy link
Owner

Jguer commented Dec 26, 2019

ok, I'm merging it into yay-git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants