| Summary: | app-editors/vim-* - ebuild.sh hangs after "Updating documentation tags in /usr/share/vim/vim72" | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Paul McDermott <pmcdermott98> |
| Component: | New packages | Assignee: | Vim Maintainers <vim> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | base-system, loki_val |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Portage environment file for vim-7.2 | ||
|
Description
Paul McDermott
2009-01-30 15:24:11 UTC
Switched on PORTAGE_DEBUG. This is where it is getting stuck:
++ result_idx=205380
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205381
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205382
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205383
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205384
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205385
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205386
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205387
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=205388
++ [[ -n 7.0.109 ]]
etc.
I am unable to update my system as so many ebuild depend on vim. Any help out there?
These messages appear to come from versionator.eclass emerge --debug shows this just prior to the infinite loop:
--- replaced dir /etc/vim
--- replaced dir /etc
+ ebuild_phase_with_hooks pkg_postrm
+ local x phase_name=pkg_postrm
+ for x in '{pre_,,post_}${phase_name}'
+ ebuild_phase pre_pkg_postrm
++ type -t pre_pkg_postrm
+ '[' '' == function ']'
+ for x in '{pre_,,post_}${phase_name}'
+ ebuild_phase pkg_postrm
++ type -t pkg_postrm
+ '[' function == function ']'
+ qa_call pkg_postrm
++ shopt
+ local 'shopts=cdable_vars off
cdspell off
checkhash off
checkwinsize off
cmdhist on
dotglob off
execfail off
expand_aliases on
extdebug on
extglob off
extquote on
failglob off
force_fignore on
gnu_errfmt off
histappend off
histreedit off
histverify off
hostcomplete on
huponexit off
interactive_comments on
lithist off
login_shell off
mailwarn off
no_empty_cmd_completion off
nocaseglob off
nocasematch off
nullglob off
progcomp on
promptvars on
restricted_shell off
shift_verbose off
sourcepath on
xpg_echo off' 'OLDIFS=
'
+ local retval
+ pkg_postrm
+ vim_pkg_postrm
+ update_vim_helptags
+ local vimfiles vim d s
+ vimfiles=//usr/share/vim/vimfiles
+ [[ vim-core != vim-core ]]
+ [[ -z '' ]]
+ for d in '"${ROOT}"/usr/share/vim/vim[0-9]*'
+ [[ -d //usr/share/vim/vim72/doc ]]
+ find //usr/share/vim/vim72/doc -name '*.txt' -type l
+ read s
++ readlink //usr/share/vim/vim72/doc/imaps.txt
+ [[ //usr/share/vim/vimfiles/doc/imaps.txt = //usr/share/vim/vimfiles/* ]]
+ rm -f //usr/share/vim/vim72/doc/imaps.txt
+ read s
++ readlink //usr/share/vim/vim72/doc/gentoo-syntax.txt
+ [[ //usr/share/vim/vimfiles/doc/gentoo-syntax.txt = //usr/share/vim/vimfiles/* ]]
+ rm -f //usr/share/vim/vim72/doc/gentoo-syntax.txt
+ read s
++ readlink //usr/share/vim/vim72/doc/latex-suite-quickstart.txt
+ [[ //usr/share/vim/vimfiles/doc/latex-suite-quickstart.txt = //usr/share/vim/vimfiles/* ]]
+ rm -f //usr/share/vim/vim72/doc/latex-suite-quickstart.txt
+ read s
++ readlink //usr/share/vim/vim72/doc/latex-suite.txt
+ [[ //usr/share/vim/vimfiles/doc/latex-suite.txt = //usr/share/vim/vimfiles/* ]]
+ rm -f //usr/share/vim/vim72/doc/latex-suite.txt
+ read s
++ readlink //usr/share/vim/vim72/doc/latexhelp.txt
+ [[ //usr/share/vim/vimfiles/doc/latexhelp.txt = //usr/share/vim/vimfiles/* ]]
+ rm -f //usr/share/vim/vim72/doc/latexhelp.txt
+ read s
+ [[ -f //usr/share/vim/vim72/doc/tags ]]
++ find //usr/share/vim/vim72
++ wc -l
++ tr -d ' '
+ [[ 1482 = 3 ]]
+ [[ -d //usr/share/vim/vimfiles/doc ]]
+ ln -s //usr/share/vim/vimfiles/doc/gentoo-syntax.txt //usr/share/vim/vimfiles/doc/imaps.txt //usr/share/vim/vimfiles/doc/latex-suite-quickstart.txt //usr/share/vim/vimfiles/doc/latex-suite.txt //usr/share/vim/vimfiles/doc/latexhelp.txt //usr/share/vim/vim72/doc
+ [[ -n '' ]]
+ update_vim_symlinks
+ local f syms
+ version_is_at_least 7.0.109
+ local want_s=7.0.109 have_s=7.0.17 r
+ version_compare 7.0.109 7.0.17
+ local ver_a=7.0.109 ver_b=7.0.17 parts_a parts_b cur_idx_a=0 cur_idx_b=0
+ parts_a=($(get_all_version_components "${ver_a}" ))
++ get_all_version_components 7.0.109
++ local ver_str=7.0.109 result result_idx=0
++ result=()
++ [[ '' == \7\.\0\.\1\0\9 ]]
++ export VERSIONATOR_CACHE_VER_STR=7.0.109
++ VERSIONATOR_CACHE_VER_STR=7.0.109
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=1
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=2
++ [[ -n 7.0.109 ]]
++ case "${ver_str:0:1}" in
++ result[$result_idx]=7
++ ver_str=7.0.109
++ result_idx=3
CCing base-system since this does look to me like a versionator.eclass issue. Though I can't imagine what causes it; the eclass is pretty straightforward.
Can you please try the following in your shell and report back your result:
test="7.0.106"
echo "${test##+([[:digit:]])}"
Somehow extglob is not being set and this causes versionator to get stuck in this part of the case statemnt:
# number: parse whilst we have a number
[[:digit:]])
result[$result_idx]="${ver_str%%[^[:digit:]]*}"
ver_str="${ver_str##+([[:digit:]])}"
result_idx=$(($result_idx + 1))
;;
Could you please post the "environment" file which should reside in /var/tmp/portage/app-editors/vim-$VERSION/temp/
[4699:~]$ test="7.0.106"
[4700:~]$ echo "${test##+([[:digit:]])}"
.0.106
[4701:~]$ bash --version
GNU bash, version 3.2.39(1)-release (i686-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
[4702:~]$
Any hints as to how to nuke vim-7.0.17 would be appreciated, as I am completely
stuck upgrading anything that has a vim dependency at the moment...
Created attachment 183768 [details]
Portage environment file for vim-7.2
Environment file for Peter
As pointed out by zlin on IRC, the problem seems to be that __versionator_shopt_toggle doesn't get called from get_all_version_components. At all. The debug output has no mention of that function even though the environment contains the call to it. This is the output from my box: [...] ++ get_all_version_components 7.0.109 ++ __versionator_shopt_toggle on ++ VERSIONATOR_RECURSION=2 ++ case "$1" in ++ [[ 2 -lt 1 ]] ++ VERSIONATOR_RECURSION=3 ++ return 0 ++ local ver_str=7.0.109 result result_idx=0 [...] The same bit from Paul's box: [...] ++ get_all_version_components 7.0.109 ++ local ver_str=7.0.109 result result_idx=0 [...] Anyone have any ideas to what could cause that bit to get ignored? Paul's environment even sources well for me: ( source attachment.cgi\?id\=183768; get_all_version_components 7.0.109 ) 7 . 0 . 109 bash --version GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu) (on an otherwise ~amd64 system) Paul, have you tried rebuilding bash? Starting rebuild of bash now... Problem still exists after emerge -av --deep bash As a normal user the test works, but as root it won't!
$ ver_str=7.0.109
$ echo "${ver_str##+([[:digit:]])}"
.0.109
$ test="7.0.106"
$ echo "${test##+([[:digit:]])}"
.0.106
# ver_str=7.0.109
# echo "${ver_str##+([[:digit:]])}"
7.0.109
# test="7.0.106"
# echo "${test##+([[:digit:]])}"
7.0.106
I fixed versionator.eclass (##-operator using [[::digit:]] doesn't work for root), but that did help.
I suspect the removal of the old version being run with the old environment? Sourced from /var/db/pkg/app-editors/vim-core-7.0.17/environment.bz2, where the old eclass is stored.
Is there any way to override any of it?
(In reply to comment #12) > As a normal user the test works, but as root it won't! That's probably just extglob not being set by default in root's environment. The relevant one-liner to test would be: ( shopt -s extglob; test="7.0.106"; echo "${test##+([[:digit:]])}" ) But as I said, that probably just works. I believe you found the problem below. > I fixed versionator.eclass (##-operator using [[::digit:]] doesn't work for > root), but that did help. Please emerge --sync to revert that change. We don't want any unexpected behavior from that eclass. This has been hard enough to debug as-is. > I suspect the removal of the old version being run with the old environment? > Sourced from /var/db/pkg/app-editors/vim-core-7.0.17/environment.bz2, where the > old eclass is stored. > Is there any way to override any of it? I believe you're correct. Simply deleting environment.bz2 from the db should theoretically make portage source the ebuild in the db using the updated eclass from the portage tree. Peter - Is the suggestion to do delete /var/db/pkg/app-editors/vim-7.0.17/environment.bz2 ? (In reply to comment #14) > Peter - Is the suggestion to do delete > /var/db/pkg/app-editors/vim-7.0.17/environment.bz2 ? For each package that fails in this manner, yes. Fantastic, that's fixed it for me. Thanks guys. Great to hear! did we determine that the issue was ? or are we simply working around it ? (In reply to comment #18) > did we determine that the issue was ? or are we simply working around it ? The issue was that he had a version of vim that was merged before this commit: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/versionator.eclass?r1=1.11&r2=1.12 While at the time of this merging, he had a version of portage that was new enough to save environment to environment.bz2. Portage was changed to override shopt -s extglob if set in global scope, so using the environment.bz2 failed because versionator.eclass was trying to use extglobbing when it was not set. IOW, this happened because portage made a change that was incompatible with code in the tree. The code in the tree was changed beforehand, but because portage was saving environment in the package db, it will still encounter this code but handle it unsatisfactorily. So this change should really have been a EAPI-bump, perhaps even of the kind that Glep 55 is supposed to solve, because the change was happening in global scope in versionator.eclass. So, we know what the problem is, but it can't be fixed retroactively. SO we are working around it. versionator.eclass was always broken. portage changed behavior to detect and fix that. no, it didnt need an EAPI bump (not that EAPI existed then anyways). i was making sure it wasnt actually a bug in bash that we were ignoring. > I believe you're correct. Simply deleting environment.bz2 from the db should
theoretically make portage source the ebuild in the db using the updated eclass
from the portage tree.
I can verify this fixed my problem with vim-core, vim and gvim.
|