diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -577,21 +577,20 @@ _TIMENOW= ${_STRTIMENOW:gmtime} BRANCH_EXT= .if ${_BRANCH:MCURRENT*} || ${_BRANCH:MSTABLE*} || ${_BRANCH:MPRERELEASE*} -_PKG_REVISION= ${MAJOR_REVISION} -BRANCH_EXT= snap -EXTRA_REVISION= .${BRANCH_EXT}${_TIMENOW} +_PKG_REVISION:= ${MAJOR_REVISION} +BRANCH_EXT= ${MAJOR_REVISION}.snap +EXTRA_REVISION= .snap${_TIMENOW} .elif ${_BRANCH:MALPHA*} -BRANCH_EXT= a${_BRANCH:C/ALPHA([0-9]+).*/\1/} -EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} +BRANCH_EXT= alpha +EXTRA_REVISION= .${_BRANCH:C/ALPHA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MBETA*} -BRANCH_EXT= b${_BRANCH:C/BETA([0-9]+).*/\1/} -EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} +BRANCH_EXT= beta +EXTRA_REVISION= .${_BRANCH:C/BETA([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:MRC*} -BRANCH_EXT= rc${_BRANCH:C/RC([0-9]+).*/\1/} -EXTRA_REVISION= .${BRANCH_EXT}.${_TIMENOW} +BRANCH_EXT= rc +EXTRA_REVISION= .rc${_BRANCH:C/RC([0-9]+).*/\1/}.${_TIMENOW} .elif ${_BRANCH:M*-p*} -BRANCH_EXT= p${_BRANCH:C/.*-p([0-9]+$)/\1/} -EXTRA_REVISION= ${BRANCH_EXT} +EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .endif PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif @@ -2040,7 +2039,16 @@ .if exists(${PKG_ABI_FILE}) && exists(${REPODIR}/${PKG_ABI}) PKG_VERSION_FROM!=/usr/bin/readlink ${REPODIR}/${PKG_ABI}/latest PKG_VERSION_FROM_DIR= ${REPODIR}/${PKG_ABI}/${PKG_VERSION_FROM} -BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/^[^[:alpha:]]+p?([[:alpha:]]*)[0-9]+$/\1/} +BRANCH_EXT_FROM= +.if ${PKG_VERSION_FROM:M*.snap*} +BRANCH_EXT_FROM= ${PKG_VERSION_FROM:C/.snap.*$//}.snap +.elif ${PKG_VERSION_FROM:M*.b*} +BRANCH_EXT_FROM= beta +.elif ${PKG_VERSION_FROM:M*.rc*} +BRANCH_EXT_FROM= rc +.elif ${PKG_VERSION_FROM:M*.a*} +BRANCH_EXT_FROM= alpha +.endif .else PKG_VERSION_FROM= PKG_VERSION_FROM_DIR= @@ -2081,7 +2089,7 @@ continue; \ fi ; \ newsum=$$(pkg query -F ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} '%X') ; \ - if [ "${BRANCH_EXT_FROM}" == "${BRANCH_EXT:C/[0-9]+$//}" -a "$${oldsum}" == "$${newsum}" ]; then \ + if [ "${BRANCH_EXT_FROM}" = "${BRANCH_EXT}" -a "$${oldsum}" = "$${newsum}" ]; then \ echo "==> Keeping old ${PKG_NAME_PREFIX}-$${pkgname}-${PKG_VERSION_FROM}.${PKG_EXT}" ; \ rm ${REPODIR}/${PKG_ABI}/${PKG_VERSION}/$${newpkgname} ; \ cp $${pkg} ${REPODIR}/${PKG_ABI}/${PKG_VERSION} ; \