From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= Subject: Re: hg-fetch with subrepos Date: Sun, 2 Dec 2018 11:53:55 +0100 Message-ID: <20181202115355.51c943b5@alma-ubu> References: <72DC8AB8-2987-4EEB-BB69-4FCEF0B1D496@asu.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/pnsJ6ytbSj7VX8BcyeK6Rl0"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTPO3-0001jP-RZ for guix-devel@gnu.org; Sun, 02 Dec 2018 05:54:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTPO0-0003mW-Mj for guix-devel@gnu.org; Sun, 02 Dec 2018 05:54:07 -0500 Received: from m4s11.vlinux.de ([83.151.27.109]:50628 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTPO0-0003mG-Fq for guix-devel@gnu.org; Sun, 02 Dec 2018 05:54:04 -0500 In-Reply-To: <72DC8AB8-2987-4EEB-BB69-4FCEF0B1D496@asu.edu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: John Soo Cc: guix-devel@gnu.org --Sig_/pnsJ6ytbSj7VX8BcyeK6Rl0 Content-Type: multipart/mixed; boundary="MP_/3A9fK2mHrCFQkDwvW6zN=ks" --MP_/3A9fK2mHrCFQkDwvW6zN=ks Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sat, 1 Dec 2018 11:10:54 -0800 John Soo wrote: > Hi guix! >=20 > Thanks and please bear with my first ever mailing list post. I was > trying to package coin3d > (https://bitbucket.org/Coin3D/coin/wiki/Home) as it is now under a > bsd3 license. The hash of the repo always changes. I think this is > due to the .hg files not being recursively deleted for the > subrepositories (https://www.mercurial-scm.org/wiki/Subrepository). > Does anyone have any insights? >=20 Hi John, I'm also packaging coin3d :-) And I stumbled upon that problem too. Ludovic explained me on IRC: The problem is the metadata directory ".hg": It contains metadata that is not fixed. For normal hg-repositories, it will be stripped away, but not recursively for those with sub-repos. I have a patch that works. I just wasn't sure if it goes to master or to staging, as it could affect the java-packages as well. I'm attaching what I have here, will prepare an official patch tonight or tomorrow. Bj=C3=B6rn PS: With coin3d, I want to add freecad. If that is your intention too, we should share resources. --MP_/3A9fK2mHrCFQkDwvW6zN=ks Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-hg-fetch-Remove-.hg-directories-of-sub-repositories.patch =46rom 57167ebf39e3f10c4025cb03893456c7269f98f2 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bj=3DC3=3DB6rn=3D20H=3DC3=3DB6fling?=3D Date: Fri, 23 Nov 2018 18:38:27 +0100 Subject: [PATCH] hg-fetch: Remove .hg directories of sub-repositories. * guix/build/hg.scm (hg-fetch): Remove all .hg directories recursively. --- guix/build/hg.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/build/hg.scm b/guix/build/hg.scm index ea51eb670..9f493f1d6 100644 --- a/guix/build/hg.scm +++ b/guix/build/hg.scm @@ -45,8 +45,10 @@ Mercurial changeset identifier. Return #t on success, #= f otherwise." ;; The contents of '.hg' vary as a function of the current ;; status of the Mercurial repo. Since we want a fixed ;; output, this directory needs to be taken out. - (with-directory-excursion directory - (delete-file-recursively ".hg")) + ;; Since the '.hg' file is also in sub-modules, we have to + ;; search for it in all sub-directories. + (for-each delete-file-recursively + (find-files directory "^\\.hg$" #:directories? #t)) =20 #t) =20 --=20 2.19.1 --MP_/3A9fK2mHrCFQkDwvW6zN=ks-- --Sig_/pnsJ6ytbSj7VX8BcyeK6Rl0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlwDucQACgkQvyhstlk+X/0JOQCgka6BmQSDyLQ0aNLHN/nGsvDx g1AAn1kqTdRiRCddVsVY5P0Af7XfYPac =u+9l -----END PGP SIGNATURE----- --Sig_/pnsJ6ytbSj7VX8BcyeK6Rl0--