Skip to content

Commit

Permalink
Fix dangling src/ directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Morganamilo committed Sep 27, 2018
1 parent bf0ab32 commit 98e6cae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 98e6cae

Please sign in to comment.