-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
fix(installer): Fixes the same pkgbase being built multiple times #2534
Conversation
Just noticed this still has test failures locally, will fix those. It appears I broke something related to installing built packages, marking this as a draft until that is fixed. Broken tests as of d2837e1:
|
When building a PKGBUILD pkgbase with multiple pkgnames, installAURPackages() invokes buildPkg() multiple times for the same pkgbase. This causes prepare() to be run multiple times for the same pkgbase, since detection of already built packages happens after prepare(). Additionally, detection of already built packages can fail if the split debug packages are enabled and the package does not contain any binaries, causing no -debug package to be created by makepkg even though it is listed by makepkg --packagelist. This commit fixes this by keeping track of the pkgdests built by buildPkg() and avoiding rebuilds of the same pkgbase in the same yay invocation. Fixes Jguer#2340. Signed-off-by: Ferdinand Bachmann <[email protected]>
d2837e1
to
5064027
Compare
Fixed accidently shadowing the Broken tests as of d9e17f9:
|
Previously, the buildPkg invocation for a pkgbase only considered whether the current pkgname is part of installer.origTargets. This made the decision whether to rebuild the package order-dependent. This commit fixes this by keeping track of which pkgbases are part of installer.origTargets and rebuilding the pkgbase if any of its pkgnames is part of origTargets.
The previous two commits changed how split packages (packages with the same pkgbase) are built, ensuring that those packages aren't built multiple times. This commit updates the lists of commands that the tests expect to be run so that `makepkg` isn't run multiple times per pkgbase.
5064027
to
242cc18
Compare
Fixed another issue in a26822f: Previously, whether a pkgbase was built was considered part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @Ferdi265 , let me play with it a bit locally to see if I can find a weird package that we currently support, otherwise all good to merge
👍 let's get some feedback from yay-git |
When building a PKGBUILD pkgbase with multiple pkgnames,
installAURPackages()
invokesbuildPkg()
multiple times for the same pkgbase. This causesprepare()
to be run multiple times for the same pkgbase, since detection of already built packages happens afterprepare()
.Additionally, detection of already built packages can fail if the split debug packages are enabled and the package does not contain any binaries, causing no
-debug
package to be created by makepkg even though it is listed bymakepkg --packagelist
.This PR fixes this by keeping track of the pkgdests built by
buildPkg()
and avoiding rebuilds of the same pkgbase in the same yay invocation.Fixes #2340.