Date: Thu, 1 Mar 2018 12:58:53 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463301 - head/Mk Message-ID: <201803011258.w21CwrtS050015@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Thu Mar 1 12:58:53 2018 New Revision: 463301 URL: https://svnweb.freebsd.org/changeset/ports/463301 Log: Fix a sub-submodule extraction problem with GH_SUBDIR. The problem is that GH_SUBDIR are handled in a somewhat random manner. (The truth is that in the end of things, they end up being sorted by the group name being used in the GH_TUPLE.) So if you have a submodule in bar/foo, and a sub-submodule in bar/foo/baz, it may happen that foo/bar/baz is handled before foo/bar and then things are messed up. This makes it so the GH_SUBDIR target handling is sorted first by the number of / in the path. (So, bar/foo is always handled before bar/foo/baz.) PR: 226221 Reported by: ygy Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D14532 Modified: head/Mk/bsd.sites.mk (contents, props changed) Modified: head/Mk/bsd.sites.mk ============================================================================== --- head/Mk/bsd.sites.mk Thu Mar 1 12:29:31 2018 (r463300) +++ head/Mk/bsd.sites.mk Thu Mar 1 12:58:53 2018 (r463301) @@ -486,7 +486,10 @@ DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_grou MASTER_SITES:= ${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}/tar.gz/${GH_TAGNAME_${_group}}?dummy=/:${_group}@} WRKSRC_${_group}:= ${WRKDIR}/${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_EXTRACT} . if !empty(GH_SUBDIR_${_group}) -_SITES_extract:= ${_SITES_extract} 690:post-extract-gh-${_group} +# In order to sort the subdir extraction so that foo/bar is moved in before +# foo/bar/baz, we count the number of / in the path and use it to order the +# targets. This handles up to 9 levels. The max as of r463123 is 4. +_SITES_extract:= ${_SITES_extract} 69${GH_SUBDIR_${_group}:C=[^/]+= =g:range:[-1]}:post-extract-gh-${_group} post-extract-gh-${_group}: @${RMDIR} ${WRKSRC}/${GH_SUBDIR_${_group}} 2>/dev/null || : @${MKDIR} ${WRKSRC}/${GH_SUBDIR_${_group}:H} 2>/dev/null || :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803011258.w21CwrtS050015>