lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version f


From: Greg Chicares
Subject: Re: [lmi] [PATCH] Add script allowing to install any wxWidgets version from Git
Date: Tue, 10 Apr 2018 00:43:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-04-09 23:08, Vadim Zeitlin wrote:
> On Mon, 9 Apr 2018 22:50:54 +0000 Greg Chicares <address@hidden> wrote:
[...]
> GC> git clone --mirror https://github.com/wxWidgets/wxWidgets.git
> GC> git clone --mirror https://github.com/wxWidgets/Catch.git
> GC> git clone --mirror https://github.com/wxWidgets/libexpat.git
> GC> git clone --mirror https://github.com/wxWidgets/libpng.git
> GC> git clone --mirror https://github.com/wxWidgets/zlib.git
> 
>  I don't think you need to use --mirror here, just --bare would be fine, as
> you don't intend to track all the branches in wxWidgets repository, and, as
> seen below, it actually results in some problems.

Thanks for all your help.

I thought '--mirror' might be more robust than '--bare', but perhaps
the opposite is true:

https://news.ycombinator.com/item?id=5431928
  | New refs are pulled down to the downstream
  | repository; all updates, including forced updates,
  | are mirrored to the downstream repository.
  | As a result, making a mirror clone essentially
  | bypasses the safety checks in the repository

and '--mirror' is clearly more than I need.

Having local copies is really handy: 'install_wx.sh' (with the
uninteresting modifications below to test setting up all the
repositories without actually building anything) runs in only
two and a half seconds:

/tmp[0]$rm -rf third_party                 
/tmp[0]$time /opt/lmi/src/lmi/install_wx.sh >/dev/null 2>&1
/opt/lmi/src/lmi/install_wx.sh > /dev/null 2>&1  1.56s user 0.61s system 89% 
cpu 2.429 total

although 'git fsck --strict' on this repository gives forty-six
pages of "dangling commits", presumably because it was cloned
from a '--mirror' repository. After replacing '--mirror' with
'--bare', this test still takes two and a half seconds, but
fsck is clean, with zero "dangling commits".

---------8<--------8<--------8<--------8<--------8<--------8<--------8<-------
diff --git a/install_wx.sh b/install_wx.sh
index 90f42da4..28abb4a6 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -25,7 +25,7 @@ set -vxe
 
 # Configurable settings 
########################################################
 
-wx_git_url=${wx_git_url:-"https://github.com/wxWidgets/wxWidgets.git"}
+wx_git_url="/cache_for_lmi/vcs/wxWidgets.git"
 
 wx_commit_sha=${wx_commit_sha:-"e38866d3a603f600f87016458260f73593627348"}
 
@@ -39,7 +39,7 @@ mingw_dir=/MinGW_
 prefix=/opt/lmi/local
 exec_prefix=${prefix}
 
-wx_dir=/opt/lmi/third_party/vcs/wxWidgets
+wx_dir=/tmp/third_party/vcs/wxWidgets
 
 # Script commands 
##############################################################
 
@@ -84,6 +84,8 @@ do
     git submodule update --init "$subpath"
 done
 
+exit 0
+
 [ "$wx_skip_clean" = 1 ] || git clean -dfx
 
 # This incidentally removes wxPdfDoc, but it's a good idea to rebuild that
--------->8-------->8-------->8-------->8-------->8-------->8-------->8-------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]