From 35b56a38e08e15ecf88925ba03f5ffda2ddbec6f Mon Sep 17 00:00:00 2001 From: just_fun Date: Fri, 4 Aug 2017 19:25:37 +0300 Subject: 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 ) --- pkgmk.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgmk.in b/pkgmk.in index e5fb4f84..251a5770 100755 --- a/pkgmk.in +++ b/pkgmk.in @@ -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 -- cgit v1.2.3