public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig
Date: Mon, 29 Jan 2018 16:33:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1801291359520.31692@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20180127225102.11373-4-samuel.thibault@ens-lyon.org>

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  <joseph@codesourcery.com>

	* 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:

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2018-01-29 14:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 15:25 [hurd,commited 0/7] fix warnings Samuel Thibault
2018-01-28 15:25 ` [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling Samuel Thibault
2018-01-28 15:25 ` [hurd,commited 6/7] hurd: Fix enabling vm_copy Samuel Thibault
2018-01-28 15:29 ` [hurd,commited 4/7] hurd: fix warning Samuel Thibault
2018-01-28 16:07 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
2018-01-29 16:33   ` Joseph Myers [this message]
2018-01-28 16:32 ` [hurd,commited 5/7] hurd: fix warning Samuel Thibault
2018-01-28 16:36 ` [hurd,commited 1/7] " Samuel Thibault
2018-01-28 16:53 ` [hurd,commited 7/7] " Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1801291359520.31692@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=samuel.thibault@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).