From owner-svn-ports-head@freebsd.org Thu Mar 1 12:58:54 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 205FCF275A8; Thu, 1 Mar 2018 12:58:54 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF0A83197; Thu, 1 Mar 2018 12:58:53 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84DBFE0C; Thu, 1 Mar 2018 12:58:53 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w21Cwria050016; Thu, 1 Mar 2018 12:58:53 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w21CwrtS050015; Thu, 1 Mar 2018 12:58:53 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201803011258.w21CwrtS050015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 1 Mar 2018 12:58:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r463301 - head/Mk X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk X-SVN-Commit-Revision: 463301 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 12:58:54 -0000 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 || :