From d40e6da679f0e90672685184d8a9ac549c47d009 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Fri, 12 Jul 2019 23:38:24 +0200 Subject: [PATCH] update_binary-addons: fix PKG_REV bump for unofficial addons Signed-off-by: Matthias Reichl --- tools/mkpkg/update_binary-addons | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/mkpkg/update_binary-addons b/tools/mkpkg/update_binary-addons index 59f50fee569..31086704ef3 100755 --- a/tools/mkpkg/update_binary-addons +++ b/tools/mkpkg/update_binary-addons @@ -158,6 +158,7 @@ for ADDON in $(ls -1 "${ROOT}/packages/mediacenter/kodi-binary-addons"); do check_package_excluded "${ADDON}" "${EXCLUDED_PACKAGES}" && continue + ADDON_PATH="${ROOT}/packages/mediacenter/kodi-binary-addons/${ADDON}/" # Obtain git url - ignore if not a suitable repo GIT_DIR="${ADDON}.git" GIT_REPO="$(geturl "${ADDON}")" || continue @@ -167,9 +168,11 @@ for ADDON in $(ls -1 "${ROOT}/packages/mediacenter/kodi-binary-addons"); do # update package.mk for stale github.com packages RESOLVED_HASH=$(resolve_hash_in_branch ${ADDON}.git HEAD) || continue echo "Resolving hash for ${ADDON}: HEAD => ${RESOLVED_HASH}" - if update_pkg "${ROOT}/packages/mediacenter/kodi-binary-addons/$ADDON" ${ADDON} ${RESOLVED_HASH}; then + if update_pkg "${ADDON_PATH}" "${ADDON}" "${RESOLVED_HASH}"; then # always bump PKG_REV when updating untagged addons - bump_pkg_rev "${ROOT}/packages/mediacenter/kodi-binary-addons/$ADDON" ${ADDON} + bump_pkg_rev "${ADDON_PATH}" "${ADDON}" + else + [ "${BUMP_PKG_REV}" = "yes" ] && bump_pkg_rev "${ADDON_PATH}" "${ADDON}" fi if [ "${KEEP_GIT_DIRS}" != "yes" ]; then