From patchwork Mon Jan 29 14:00:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 25668 Received: (qmail 12279 invoked by alias); 29 Jan 2018 14:00:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12188 invoked by uid 89); 29 Jan 2018 14:00:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, TIME_LIMIT_EXCEEDED, URIBL_RED autolearn=unavailable version=3.3.2 spammy=risk X-HELO: relay1.mentorg.com Date: Mon, 29 Jan 2018 14:00:05 +0000 From: Joseph Myers To: Samuel Thibault CC: Subject: Re: [hurd, commited 3/7] hurd: make build-many-glibcs.py use mainline mig In-Reply-To: <20180127225102.11373-4-samuel.thibault@ens-lyon.org> Message-ID: References: <20180127225102.11373-1-samuel.thibault@ens-lyon.org> <20180127225102.11373-4-samuel.thibault@ens-lyon.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Followup committed: Make build-many-glibcs.py clean git source directories. With the git checkouts of Hurd components in build-many-glibcs.py involving running autoreconf, there's a risk that generated files could be left behind by an old autoreconf run (if an old version of the sources generates those files in the source directory but a new version does not). This patch avoids that by using git clean -dxfq when updating git checkouts. In this patch, that's conditional on --replace-sources, to avoid removing any local not-checked-in files someone may have in their checkout unless the option has been specifically passed that says it's OK to blow old checkouts away, complete with any local changes to them. 2018-01-29 Joseph Myers * scripts/build-many-glibcs.py (Context.git_checkout): Use git clean -dxfq for git updates when replacing sources. diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 0c2ea85..baa6704 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -816,6 +816,9 @@ class Context(object): if update: subprocess.run(['git', 'remote', 'prune', 'origin'], cwd=self.component_srcdir(component), check=True) + if self.replace_sources: + subprocess.run(['git', 'clean', '-dxfq'], + cwd=self.component_srcdir(component), check=True) subprocess.run(['git', 'pull', '-q'], cwd=self.component_srcdir(component), check=True) else: