From patchwork Mon Jan 13 16:33:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1222220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108634-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=pmIrju2G; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47xK0n5fNhz9sP6 for ; Tue, 14 Jan 2020 03:34:01 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=Baj9CwL91bQWrmSPiyTnMCuHetlzQ Cnt5YZmV65S5Fid+Xv7q7r7CmQL68vE2QO725Yo0z2F7Gy0w7OOQHz8LAl9ZWgee J+CT8XpUHsEkMn3IT2rv13FLFhcHuBgNtKMHhejJiD2OvhlAHx5P6hl26ezshwlX e18THbPhvjTVXM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=Ted1f35JEbJYfPdddivTzbx0Ci0=; b=pmI rju2GDNJg8AeX/kgQuMfoKcz1e94LYavIxOvTLTblKhPbu7cXh+PHv6plkvR++cY HSNoFdL/bqpvs9MpaDKdHu8RqnNmBsWnNUKhn8BkKEyV7W8ImWMkawpL+8vRoW/Y i+Ob9Y8cy9c+URS2r01HAKvp8btOeRJJnCWNMYjc= Received: (qmail 125362 invoked by alias); 13 Jan 2020 16:33:55 -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 125353 invoked by uid 89); 13 Jan 2020 16:33:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: esa2.mentor.iphmx.com IronPort-SDR: b+BW5h22JTUAEJn1yeRnV8V/YEs9z5LYW4BQGcXz2ixVF7I2nbDVCVhwXMBOMteHCWQf7ZqHpL cEKW1OPuu8mHEzYqlvBFTPqnO+YLA8PyYR9v07YCg93HlrF7mlLCyGtubmWL52okbDHppe8H8H VRkfdE41sLkDpVSe+VdQYUoHbLQhIVdRrU/l7i9FltQyjgbGSL/dJGab6QVzBveF/H1OygooS4 kU3faGGMBYSbCh0wCTNBGMJiNjWhvarVVwnWgdYymxFBiU6Sou0ZAwom+rbgebrw/pNL5qt1Xq PHE= IronPort-SDR: vDG68k7SD1ps3Fp8OfXa8jyrDU+vmVAq/8GyXnviVOn44xyLPz/DnsooA4SmAB4QXONQyNQAD3 tEgE/QyYVZle2PaztOjwuZpcNphh/GJfTgUkebiLfprfDViR104/JZjqws4nttdnwmMzaw0Soy MDpaiFrx8r50nDM8lCFLX3CapPwutvTVDJ641LOHlsKOTxFNYiW8XIOjO0WK7uzlLAHgowabjV Ds027CABftLg1K6b4PV6lzTlPR1/5hC7WxknsgfER3RwEtASZ9zkYltHKmBi5yfZmZFaiM11wU wa4= Date: Mon, 13 Jan 2020 16:33:47 +0000 From: Joseph Myers To: Subject: Update build-many-glibcs.py for GCC move to git [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 This patch updates build-many-glibcs.py for the move of GCC to git, teaching it to do the initial checkout from git, to replace an SVN checkout with a git one if --replace-sources is used, and to get the commit identifier from a git checkout after updating it. Committed. diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 1bd7f24d7d..90b76caa93 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -803,12 +803,10 @@ class Context(object): return self.git_checkout(component, git_url, git_branch, update) elif component == 'gcc': if version == 'mainline': - branch = 'trunk' + branch = 'master' else: - trans = str.maketrans({'.': '_'}) - branch = 'branches/gcc-%s-branch' % version.translate(trans) - svn_url = 'svn://gcc.gnu.org/svn/gcc/%s' % branch - return self.gcc_checkout(svn_url, update) + branch = 'releases/gcc-%s' % version + return self.gcc_checkout(branch, update) elif component == 'glibc': git_url = 'git://sourceware.org/git/glibc.git' if version == 'mainline': @@ -884,14 +882,23 @@ class Context(object): to_touch = os.path.join(dirpath, f) subprocess.run(['touch', to_touch], check=True) - def gcc_checkout(self, svn_url, update): - """Check out GCC from SVN. Return the revision number.""" + def gcc_checkout(self, branch, update): + """Check out GCC from git. Return the commit identifier.""" + if os.access(os.path.join(self.component_srcdir('gcc'), '.svn'), + os.F_OK): + if not self.replace_sources: + print('error: GCC has moved from SVN to git, use ' + '--replace-sources to check out again') + exit(1) + shutil.rmtree(self.component_srcdir('gcc')) + update = False if not update: - subprocess.run(['svn', 'co', '-q', svn_url, - self.component_srcdir('gcc')], check=True) + self.git_checkout('gcc', 'git://gcc.gnu.org/git/gcc.git', + branch, update) subprocess.run(['contrib/gcc_update', '--silent'], cwd=self.component_srcdir('gcc'), check=True) - r = subprocess.run(['svnversion', self.component_srcdir('gcc')], + r = subprocess.run(['git', 'rev-parse', 'HEAD'], + cwd=self.component_srcdir('gcc'), stdout=subprocess.PIPE, check=True, universal_newlines=True).stdout return r.rstrip()