config/functions: cache device folder packages first

this is needed for devices that require specific packages for
example u-boot, we can keep changes within the device folder
rather than adding multiple definitions to the project package
This commit is contained in:
Adam Green 2018-01-04 19:07:56 +00:00
parent 0b2193e4dd
commit 22498e05ec
No known key found for this signature in database
GPG Key ID: 52B701B6EF2F2E58

View File

@ -523,6 +523,13 @@ init_package_cache() {
_CACHE_PACKAGE_LOCAL=""
_CACHE_PACKAGE_GLOBAL=""
# cache project/device folder for a package
if [ -n $DEVICE ]; then
for DIR in $(find $ROOT/projects/$PROJECT/devices/$DEVICE/packages -type d 2>/dev/null); do
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_LOCAL+="${DIR}${_ANCHOR}\n"
done
fi
# cache project folder for a package
for DIR in $(find $ROOT/projects/$PROJECT/packages -type d 2>/dev/null); do
[ -r "$DIR/package.mk" ] && _CACHE_PACKAGE_LOCAL+="${DIR}${_ANCHOR}\n"