Patchwork build: for the bootstrap phase of a deb/rpm build a pure python mercurial is enough

login
register
mail settings
Submitter via Mercurial-devel
Date Oct. 13, 2017, 8:56 p.m.
Message ID <e9cb85a4d570b3e36df8.1507928172@cuben>
Download mbox | patch
Permalink /patch/24856/
State Accepted
Headers show

Comments

via Mercurial-devel - Oct. 13, 2017, 8:56 p.m.
# HG changeset patch
# User muxator <a.mux@inwind.it>
# Date 1507927337 -7200
#      Fri Oct 13 22:42:17 2017 +0200
# Node ID e9cb85a4d570b3e36df8df953d1c4b99fc00d922
# Parent  7259f0ddfc0f18138420e7c9c7e4145a25016d7b
build: for the bootstrap phase of a deb/rpm build a pure python mercurial is enough

When bootstrapping a deb/rpm build, packagelib.sh starts performing a local
build for the sole purpose of parsing the output of "hg version".
Then it "hg archive"s the source code, and builds everything again.

For that initial step, we are perfectly good in using a pure python mercurial,
without compiling the c modules (base85, bdiff, zstdlib, ...).

On my personal system, this cuts down 22 seconds for a package build (the
bootstrapping build goes from ~30 to ~8 seconds).
Augie Fackler - Oct. 14, 2017, 5:10 a.m.
On Fri, Oct 13, 2017 at 10:56:12PM +0200, muxator via Mercurial-devel wrote:
> # HG changeset patch
> # User muxator <a.mux@inwind.it>
> # Date 1507927337 -7200
> #      Fri Oct 13 22:42:17 2017 +0200
> # Node ID e9cb85a4d570b3e36df8df953d1c4b99fc00d922
> # Parent  7259f0ddfc0f18138420e7c9c7e4145a25016d7b
> build: for the bootstrap phase of a deb/rpm build a pure python mercurial is enough

queued, thanks

Patch

diff --git a/contrib/packagelib.sh b/contrib/packagelib.sh
--- a/contrib/packagelib.sh
+++ b/contrib/packagelib.sh
@@ -9,7 +9,7 @@ 
 # node: the node|short hg was built from, or empty if built from a tag
 gethgversion() {
     make cleanbutpackages
-    make local || make local PURE=--pure
+    make local PURE=--pure
     HG="$PWD/hg"
 
     $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; }