Fix dangling src/ directory

Yay first calls 'makepkg --nobuild -fC' to update the pkver. Later on we
call 'makepkg -cf --noectract --noprepare --holdver' to actually build
the package.

Inbetween these two calls we keep the already extracted
sources to save time on the reextract and duplicated call to prepare
(pkgbuilds should not require user input but things such as linux-ck do
and calling prepare twice will actually cause them to promt twice)

We also have two checks. First we see if the package is already
installed and up to date (--needed) and secondly we check if the
package is already built.

If any of these conditions are met we skip building the package. This
leaves a dangling src/ directory as 'makepkg -c' was never ran.

Now if these conditions are met tell makepkg to cleanup and exit.
This commit is contained in:
morganamilo 2018-09-27 14:21:49 +01:00
parent bf0ab3216a
commit 98e6caefef
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

View file

@ -954,12 +954,14 @@ func buildInstallPkgbuilds(dp *depPool, do *depOrder, srcinfos map[string]*gosrc
}
if installed {
show(passToMakepkg(dir, "-c", "--nobuild", "--noextract", "--ignorearch"))
fmt.Println(cyan(pkg+"-"+version) + bold(" is up to date -- skipping"))
continue
}
}
if built {
show(passToMakepkg(dir, "-c", "--nobuild", "--noextract", "--ignorearch"))
fmt.Println(bold(yellow(arrow)),
cyan(pkg+"-"+version)+bold(" already made -- skipping build"))
} else {