From 98e6caefef3ef53db45495b17d5591140a8041d0 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Thu, 27 Sep 2018 14:21:49 +0100 Subject: [PATCH] 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. --- install.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.go b/install.go index 06d54b82..9b95e53a 100644 --- a/install.go +++ b/install.go @@ -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 {