Skip to content

erases all uncommitted git changes on compilation failure #2891

Description

@dablenparty

Affected Version

yay v13.0.1 - libalpm v16.0.1

Describe the bug

yay erased every single uncommitted change in my git repo, not just the changes in the PKGBUILD, when it failed to compile. If it had done this after a successful install, I'd at least understand.

This also means I cannot clean build local PKGBUILDs at all because that requires generating a .SRCINFO file, but since that's an uncommitted file, it gets immediately erased before yay tries to read it and then it complains "no .SRCINFO found!".

I reported this years ago when this first happened; I moved to paru after but that's been dead for nearly 6 months now so I tried yay again... I won't be using yay anymore.

Reproduction Steps

  1. have a custom PKGBUILD in a git repo
  2. make changes anywhere in the repo without committing them
  3. try to compile & fail
  4. observe uncommitted changes are now gone

Expected behavior

Does not erase changes after a failed compilation.

I am NOT running this again and erasing my changes just to capture the output.

Config:

{
	"aururl": "https://aur.archlinux.org",
	"aurrpcurl": "https://aur.archlinux.org/rpc?",
	"buildDir": "/home/hunterd/.cache/yay",
	"editor": "",
	"editorflags": "",
	"makepkgbin": "makepkg",
	"makepkgconf": "",
	"pacmanbin": "pacman",
	"pacmanconf": "/etc/pacman.conf",
	"redownload": "no",
	"answerclean": "",
	"answerdiff": "",
	"answeredit": "",
	"answerupgrade": "",
	"gitbin": "git",
	"gpgbin": "gpg",
	"gpgflags": "",
	"mflags": "",
	"sortby": "",
	"searchby": "name-desc",
	"gitflags": "",
	"removemake": "ask",
	"sudobin": "sudo",
	"sudoflags": "",
	"version": "13.0.1",
	"requestsplitn": 150,
	"completionrefreshtime": 7,
	"maxconcurrentdownloads": 1,
	"bottomup": true,
	"sudoloop": false,
	"devel": true,
	"cleanAfter": false,
	"keepSrc": false,
	"provides": true,
	"pgpfetch": true,
	"cleanmenu": true,
	"diffmenu": true,
	"editmenu": false,
	"combinedupgrade": true,
	"useask": false,
	"batchinstall": false,
	"singlelineresults": false,
	"separatesources": true,
	"debug": false,
	"rpc": true,
	"doubleconfirm": true,
	"rebuild": "no"
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions