I'm running an ancient Ubuntu and after the automatic update, git-gui
stopped working and complains instead:
Error in startup script: expected version number but got "1.7.0-"
while executing
"package vsatisfies $_git_version 1.7.0-"
(file "/usr/local/libexec/git-core/git-gui" line 1)
My "fix" was to revert /usr/lib/git-core/git-gui
as follows
1286c1286
< if {[package vsatisfies $_git_version 1.7.0]} {
---
> if {[package vsatisfies $_git_version 1.7.0-]} {
1542c1542
< if {[package vsatisfies $::_git_version 1.6.3]} {
---
> if {[package vsatisfies $::_git_version 1.6.3-]} {
The sad thing is that after the next update it happened again. This problem seems to be rare, the only relevant link from this year I found was this a deleted question on SO. I'm using git 2.0.0
, tclsh 8.4
.
There was a change to the package version number satisfaction logic in Tcl 8.5 which allowed it to support more complex version expressions. It appears that git-gui
is using this extended syntax (unnecessarily as it happens) and as such, you're going to be fighting this fight with it every time you update it until you upgrade your system to have Tcl 8.5.
This is recommended anyway; Tcl 8.4 is out of support, there will be no future releases of it, and the changes to the package version logic will not be backported.
There is a bug in the git-gui
code; it should say in itself somewhere (probably at the top of its main script) exactly this:
package require Tcl 8.5
since it uses functionality from Tcl 8.5. That wouldn't fix things for you, but would tell you the correct thing you need to do about it.