diff options
author | just_fun <just.the.real.fun@gmail.com> | 2017-08-04 19:25:37 +0300 |
---|---|---|
committer | Fredrik Rinnestam <fredrik@crux.nu> | 2017-09-20 17:49:07 +0200 |
commit | 35b56a38e08e15ecf88925ba03f5ffda2ddbec6f (patch) | |
tree | 5bda0284e62003f8317f722dac96ae136d37f484 | |
parent | 99ded8b59cd75b8799d64581f58b73b8705b311b (diff) | |
download | pkgutils-35b56a38e08e15ecf88925ba03f5ffda2ddbec6f.tar.gz pkgutils-35b56a38e08e15ecf88925ba03f5ffda2ddbec6f.tar.xz |
pkgmk: fix the up-to-date option (avoid unnecesarry rebuilds)
build_needed() function returns true/yes if a source is missing,
even when the target/package exists and is up-to-date. This
behaviour triggers unnecesarry rebuilds.
Because only the remote sources can be missing and
we don't want to rebuild a port just because we've deleted
some of its remote sources, this patch changes that condition
from:
( the source is missing OR is newer than the target/package )
to
( the source exists AND is newer than the target/package )
-rwxr-xr-x | pkgmk.in | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -656,7 +656,7 @@ build_needed() { RESULT="no" for FILE in $PKGMK_PKGFILE ${source[@]}; do FILE=`get_filename $FILE` - if [ ! -e $FILE ] || [ ! $TARGET -nt $FILE ]; then + if [ -e $FILE ] && [ ! $TARGET -nt $FILE ]; then RESULT="yes" break fi |