From patchwork Mon Apr 13 08:15:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 460712 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 917C51402F5 for ; Mon, 13 Apr 2015 18:15:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=sainGBWK; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=kDKla4sZq4cMUecf1 PAnmuDNfy535QgNrgXPX0PD1zEwfNGbECq8wlaKwq+X+Y5e8RCWa85yWKmzm4eUz l9rcLUyonDu5Woybf6oZKqa3wj7m7+hasAjcNy7cfgkTn4w++pyqkq1tZK8md62e sAi+c50z5oqseHIAy3pdjSNuJ8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=Gh0yWGithqox3hqDGIvcfaO 92hI=; b=sainGBWKD56U5hZZfGp5AgZpfJrCUEHbUX5YsTc4hOiVwpNEq5W/I3i lgLCX1odubHhj2dgGttAXecbkv0vDhftfp+JbIoH8FujX1rPPbWUxniV6gvFXJg4 E+Ru8YOk3470TUH1ZCctRE3Hutjt7feBaC99Bj8K1F6+hd9eoHc0= Received: (qmail 14451 invoked by alias); 13 Apr 2015 08:15:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14439 invoked by uid 89); 13 Apr 2015 08:15:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 13 Apr 2015 08:15:39 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 244058E754; Mon, 13 Apr 2015 08:15:38 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3D8Fal3021244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Apr 2015 04:15:37 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t3D8FZdk007239; Mon, 13 Apr 2015 10:15:35 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t3D8FWZI007238; Mon, 13 Apr 2015 10:15:32 +0200 Date: Mon, 13 Apr 2015 10:15:32 +0200 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Change gcc_release for 5+ Message-ID: <20150413081532.GH1735@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150412205354.GC1735@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes On Mon, Apr 13, 2015 at 09:44:12AM +0200, Richard Biener wrote: > > @@ -130,8 +130,20 @@ EOF > > > > # Update gcc/DEV-PHASE. > > > > - [ `cat ${SOURCE_DIRECTORY}/gcc/BASE-VER` = ${RELEASE} ] || \ > > - error "Release number ${RELEASE} does not match BASE-VER" > > + if [ `cat ${SOURCE_DIRECTORY}/gcc/BASE-VER` = ${RELEASE} ]; then Guess it should be !=, you're right. > > + if [ `cat ${SOURCE_DIRECTORY}/gcc/BASE-VER` \ > > + = ${RELEASE_MAJOR}.`expr ${RELEASE_MINOR} - 1`.1 \ > > + -a x${RELEASE_REVISION} = x0 ]; then > > + (changedir ${SOURCE_DIRECTORY}/gcc && \ > > + echo ${RELEASE} > BASE-VER && \ > > + ${SVN} -q ci -m 'Bump release' BASE-VER) || \ > > + error "Could not update BASE-VER" > > + else > > + error "Release number ${RELEASE} does not match BASE-VER" > > "... does not immediately follow BASE-VER" Ok. I've committed the patch in the meantime (because the second hunk was really needed immediately). So here is incremental patch that hopefully fixes what you found and also changes it to commit everything at once. Does it look ok? I guess I'll add a echo of then svn ci arguments and exit 1 right before the svn ci to test it without committing anything. 2015-04-13 Jakub Jelinek * gcc_release: Fix up thinko in the last commit, improve error message. Commit all ChangeLog, DEV-PHASE and BASE-VER changes together, rather than doing dozens of separate commits. Jakub --- gcc/maintainer-scripts/gcc_release.jj 2015-04-12 22:45:36.000000000 +0200 +++ gcc/maintainer-scripts/gcc_release 2015-04-13 10:06:43.847201786 +0200 @@ -109,45 +109,49 @@ build_sources() { ${SVN} -q co "${SVNROOT}/${SVNBRANCH}" "`basename ${SOURCE_DIRECTORY}`" ||\ error "Could not check out release sources" - for x in `find ${SOURCE_DIRECTORY} -name ChangeLog`; do + svnciargs="" + for x in `changedir ${SOURCE_DIRECTORY} && \ + find . -name ChangeLog`; do # Update this ChangeLog file only if it does not yet contain the # entry we are going to add. (This is a safety net for repeated # runs of this script for the same release.) - if ! grep "GCC ${RELEASE} released." ${x} > /dev/null ; then - cat - ${x} > ${x}.new < /dev/null ; then + cat - ${SOURCE_DIRECTORY}/${x} > ${SOURCE_DIRECTORY}/${x}.new < BASE-VER && \ - ${SVN} -q ci -m 'Bump release' BASE-VER) || \ + echo ${RELEASE} > BASE-VER) || \ error "Could not update BASE-VER" + svnciargs="${svnciargs} gcc/BASE-VER" else - error "Release number ${RELEASE} does not match BASE-VER" + error "Release number ${RELEASE} does not immediately follow BASE-VER" fi fi (changedir ${SOURCE_DIRECTORY}/gcc && \ - : > DEV-PHASE && \ - ${SVN} -q ci -m 'Mark as release' DEV-PHASE) || \ + : > DEV-PHASE) || \ error "Could not update DEV-PHASE" + svnciargs="${svnciargs} gcc/DEV-PHASE" + + (changedir ${SOURCE_DIRECTORY} && \ + ${SVN} -q ci -m 'Update ChangeLog and version files for release' ${svnciargs}) || \ + error "Could not commit ChangeLog and version file updates" # Make sure we tag the sources for a final release. TAG="tags/gcc_`echo ${RELEASE} | tr . _`_release"