yay icon indicating copy to clipboard operation
yay copied to clipboard

[yay v12] yay -Bi does not take into account local changes

Open HLFH opened this issue 2 years ago • 0 comments

Let's take the example from here with postfix: https://github.com/Jguer/yay/issues/1899. postfix as an ABS package does not provide a .SRCINFO file. I need to create it manually makepkg --printsrcinfo > .SRCINFO. That is why, I think parsing PKGBUILD rather than .SRCINFO is easier, it could remove one step for the end user, even if it cumbersome for the yay developers and project leader. For that reasons, the yay -Bi seems only optimized for AUR-like packages. Then, when I do yay -Bi extra-x86_64, I get:

 -> échec lors de la lecture postfix : Unable to read file: extra-x86_64/.SRCINFO: open extra-x86_64/.SRCINFO: no such file or directory
goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	runtime/debug/stack.go:16 +0x19
main.main.func2()
	github.com/Jguer/yay/v11/main.go:139 +0x53
panic({0x563fb9193da0, 0xc0002881a0})
	runtime/panic.go:884 +0x212
github.com/Jguer/yay/v11/pkg/srcinfo.NewService({0x563fb9209038?, 0xc0000f6900}, 0xc0001f43c0, {0x563fb9207080?, 0xc0001f6400}, {0x563fb92061d8?, 0xc0001d77a0}, 0xc000276150)
	github.com/Jguer/yay/v11/pkg/srcinfo/service.go:37 +0x165
main.(*OperationService).Run(0xc0001d7f50, {0x563fb9205230?, 0xc0000260b8}, 0xc0000b9ca0?, {0xc000014b80, 0x1, 0x1})
	github.com/Jguer/yay/v11/sync.go:125 +0x64d
main.installLocalPKGBUILD({0x563fb9205230?, 0xc0000260b8}, 0xc0001f43c0, 0xc0001d79e0, {0x563fb9209038?, 0xc0000f6900})
	github.com/Jguer/yay/v11/local_install.go:66 +0x568
main.handleBuild({0x563fb9205230, 0xc0000260b8}, 0x563fb9093cda?, {0x563fb9209038, 0xc0000f6900}, 0xc0001d79e0)
	github.com/Jguer/yay/v11/cmd.go:344 +0x109
main.handleCmd({0x563fb9205230, 0xc0000260b8}, 0xc0001f43c0, 0xc0001d79e0, {0x563fb9209038?, 0xc0000f6900?})
	github.com/Jguer/yay/v11/cmd.go:184 +0x475
main.main()
	github.com/Jguer/yay/v11/main.go:145 +0x8c5

I added the file .SRCINFO, I could have even done other local changes but they are reversed by yay as these local changes were not committed. I don't think the git add, git commit steps should be necessary for local installs. pikaur does not have this bug.

HLFH avatar Jan 24 '23 08:01 HLFH