On 2020/01/19 14:37, Laurence Tratt wrote:
> On a freshly installed OpenBSD -current machine with git-x11-2.25.0, "git
> gui" gives me the following error when I try and run it:
> 
>   version conflict for package "Tcl":
>   have 8.5.19, need 8.6
> 
> whereas on an older machine, even after upgrading git-x11-2.24.0 to 2.25.0,
> "git gui" works correctly.
> 
> The slightly bizarre thing to me is that on both machines, only tcl/tk-8.5
> have been installed (i.e. neither machine has tcl/tk-8.6), so I don't have
> any obvious ideas for how to fix it. Klemens suggested that a similar issue
> with other ports might have occurred -- does anyone have any suggestions?

I don't see how it would work at all beforehand, the git-gui script has
an explicit check to make sure that it's using Tcl/Tk 8.6:

if {[catch {package require Tcl 8.6} err]
 || [catch {package require Tk  8.6} err]
} {
        catch {wm withdraw .}
        tk_messageBox \
                -icon error \
                -type ok \
                -title "git-gui: fatal error" \
                -message $err
        exit 1
}

..but the wish interpreter path is set (eventually) based on whatever
version ports is telling it to use, so wish8.5. The only way I can see
that it would work is if you run "wish8.6 /usr/local/libexec/git/git-gui".

Anyway here is the fix, also moves a file to the correct PLIST and
uses the correct wish interpreter path in git-gui--askpass (it's subst'ed
in git-gui.sh -> git-gui in git-gui/Makefile, but not in git-gui--askpass)

OK?

? .todo
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/git/Makefile,v
retrieving revision 1.210
diff -u -p -r1.210 Makefile
--- Makefile    14 Jan 2020 21:33:49 -0000      1.210
+++ Makefile    19 Jan 2020 18:11:33 -0000
@@ -10,6 +10,7 @@ PKGNAME-main =        ${DISTNAME}
 PKGNAME-svn =  git-svn-${V}
 PKGNAME-x11 =  git-x11-${V}
 CATEGORIES =   devel
+REVISION =     0
 
 HOMEPAGE =     https://git-scm.com/
 
@@ -28,6 +29,8 @@ MASTER_SITES =                https://www.kernel.org/p
 MODULES =              lang/python \
                        x11/tk
 
+MODTK_VERSION =                8.6
+
 MODPY_VERSION =                ${MODPY_DEFAULT_VERSION_3}
 MODPY_BUILDDEP =       No
 MODPY_RUNDEP =         No
@@ -123,6 +126,7 @@ post-install:
                gitwebdir=${TRUEPREFIX}/share/gitweb install
        perl -pi -e "s|${WRKINST}||g" ${PREFIX}/share/gitweb/gitweb.cgi
        ${INSTALL_DATA} ${WRKBUILD}/gitweb/README ${PREFIX}/share/gitweb
+       ${MODTCL_WISH_ADJ} ${PREFIX}/libexec/git/git-gui--askpass
 
 do-test:
        ${MAKE_ENV} GIT_TEST_OPTS="--immediate" ${MAKE_PROGRAM} -C ${WRKSRC}/t \
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/devel/git/pkg/PLIST-main,v
retrieving revision 1.92
diff -u -p -r1.92 PLIST-main
--- pkg/PLIST-main      14 Jan 2020 21:33:50 -0000      1.92
+++ pkg/PLIST-main      19 Jan 2020 18:11:33 -0000
@@ -409,7 +409,6 @@ share/git-core/templates/hooks/setgitper
 share/git-core/templates/hooks/update.sample
 share/git-core/templates/info/
 share/git-core/templates/info/exclude
-share/git-gui/lib/chord.tcl
 share/gitk/lib/msgs/zh_cn.msg
 share/gitweb/
 share/gitweb/README
Index: pkg/PLIST-x11
===================================================================
RCS file: /cvs/ports/devel/git/pkg/PLIST-x11,v
retrieving revision 1.15
diff -u -p -r1.15 PLIST-x11
--- pkg/PLIST-x11       25 Feb 2017 20:35:31 -0000      1.15
+++ pkg/PLIST-x11       19 Jan 2020 18:11:33 -0000
@@ -1,5 +1,5 @@
 @comment $OpenBSD: PLIST-x11,v 1.15 2017/02/25 20:35:31 benoit Exp $
-@conflict git-<1.6.5.3p0
+@conflict git-<2.25.0p0
 bin/gitk
 libexec/git/git-citool
 libexec/git/git-gui
@@ -21,6 +21,7 @@ share/git-gui/lib/checkout_op.tcl
 share/git-gui/lib/choose_font.tcl
 share/git-gui/lib/choose_repository.tcl
 share/git-gui/lib/choose_rev.tcl
+share/git-gui/lib/chord.tcl
 share/git-gui/lib/class.tcl
 share/git-gui/lib/commit.tcl
 share/git-gui/lib/console.tcl

Reply via email to