Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#14640 - [vim] fetch_runtime.sh script fails to fetch updated files

Attached to Project: Arch Linux
Opened by Sascha Blank (Catseye) - Saturday, 09 May 2009, 10:14 GMT
Last edited by Dan Griffiths (Ghost1227) - Sunday, 18 April 2010, 07:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Dan Griffiths (Ghost1227)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I'm building vim 7.2.166-1 from "testing" and have noticed that the "fetch_runtime.sh" script that is invoked during the build process actually (and silently) fails to download any updated files even though there are dozens of them available on ftp.vim.org!

The problem can be found in the "fetch_runtime.sh" script itself. There are four places where it expects the following to behave differently:

$ if [ $( /bin/true ) ]; then echo "True"; else echo "False"; fi
$ if [ $( /bin/false ) ]; then echo "True"; else echo "False"; fi

But that assumption is incorrect: both commands will emit "False" no matter what the actual exit code of the $( ... ) command substitution is. "pdksh", "dash", "Bash 3" and "Bash 4" behave consistently in this regard so it looks like the script itself is to blame.

The attached diff corrects this wrong assumption and makes the script do correctly what it is supposed to do: replacing the provided runtime files with their more recent versions if they are available. You will see that it makes a difference because there will dozens of "... fetching file ... done!" lines during the "begin fetching updated runtime files..." step.
This task depends upon

Closed by  Dan Griffiths (Ghost1227)
Sunday, 18 April 2010, 07:38 GMT
Reason for closing:  Fixed
Comment by Jan de Groot (JGC) - Saturday, 09 May 2009, 10:33 GMT
If it's about return code, these statements should be rewritten as following:

if /bin/true; then echo "True"; else echo "False"; fi

using $() inside [] is to test for output, not for return status.

Could you attach the patch in unified diff? It's more readable that way.
Comment by Sascha Blank (Catseye) - Saturday, 09 May 2009, 12:02 GMT
I have reworked my patch according to your suggestion on how to check better for the exit status of an external command; the patch comes in unified format this time.

The patched script could benefit from refactoring some of the the "if ! condition ... then ... else" blocks but I think that should done at a later stage (if it all) because at this point it would complicate the review process unnecessarily.
Comment by Xavier (shining) - Wednesday, 30 September 2009, 12:05 GMT
I find this all very ugly.
vim provides a much saner way to get the current runtime files using rsync.
See my vim package : http://aur.archlinux.org/packages.php?ID=30507
Comment by Paul Mattal (paul) - Tuesday, 05 January 2010, 05:02 GMT
@Xavier: I agree that your solution is cleaner.

Are they equivalent in result?

Tobias, what do you think?
Comment by Xavier (shining) - Tuesday, 05 January 2010, 12:54 GMT
I have looked closely at all the differences in the runtime files together with Markus Heidelberg (who follows vim development, and maintains a git repo of vim).
He said he would take some actions to fix a few things to reduce these differences. But there was nothing worrying anyway :)
It was mostly weird useless files, not important ones.
Comment by Tobias Kieslich (tobias) - Tuesday, 05 January 2010, 14:29 GMT
I'm still in Europe, visiting family I haven't seen in 2.5 years.
Comment by Paul Mattal (paul) - Saturday, 06 February 2010, 23:15 GMT
Are you back yet, Tobias? Hope you're having fun!
Comment by Tobias Kieslich (tobias) - Sunday, 07 February 2010, 08:39 GMT
Yeah, Paul I'm back, yet I can't really do much on the computer atm, since I have a very painful nerve compression in both of my arms. It kind of affects my job and I stay away from keyboard in my spare time. I will take this to the developer list so we can deal with all that. All that is on top of the fact that I don't have much ArchLinux time in general. It sucks for the users because they wait for the changes and for me because I feel guilty.
Comment by Xavier (shining) - Monday, 08 February 2010, 15:29 GMT
@tobias: sad to hear that, I hope you will get better. And your health is far more important than Arch !

About the vim problem, there are some news : there is now an official hg repository containing the latest code and latest runtime files :
http://groups.google.com/group/vim_dev/browse_thread/thread/9f3ffd5d58859095/b513e33108b72003

This makes my vim-cvs and vim-git packages on AUR obsolete, and there is already a new vim-hg package :
http://aur.archlinux.org/packages.php?ID=33422
Comment by Dan Griffiths (Ghost1227) - Sunday, 18 April 2010, 07:38 GMT
Fixed in [testing]

Loading...