You are not logged in.

#1 2011-09-02 11:15:37

frabjous
Member
Registered: 2010-07-13
Posts: 367

"wget --version" now gives exit status 3?

Yesterday, tlmgr (The TeX live package manager) for TeXlive 2011 (...yes, yes, I know I should be using the Arch packages for TL 2010, but what I can say, I like to keep things current?...) stopped working for me.

After some investigation and help from the TeXlive mailing list, the problem has been traced to an issue with the new version (1.3.3) of wget on Arch (which I installed though pacman yesterday). The new wget spits out an exit status of 3 on a call of:

wget --version

or

wget -V

This causes tlmgr to complain that "could not find a usable wget", since it apparently calls this to check if wget is installed.

I've managed to work around this by creating a $HOME/bin/wget script, which looks like this:

#!/bin/bash
if [[ "$1" == "-V" ]] || [[ "$1" == "--version" ]] ; then
   /usr/bin/wget $@
   exit 0
else
   /usr/bin/wget $@
   exit $?
fi

Since this comes before /usr/bin/wget in my $PATH, it gets called instead of /usr/bin/wget, and reports a 0 exit status if the first argument is "-V" or "--version".

tlmgr seems to work with this, but I'm nervous that it'll break something else.

So my questions are:

  1. Does this change to wget come from upstream, is it deliberate, and will it stay? (If so, then tlmgr will need changes.)

  2. Can anyone think of any horrible problems my workaround will likely cause (with e.g., something else that depends on wget)?

  3. Can anyone think of a better workaround?

Offline

#2 2011-09-02 11:47:05

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: "wget --version" now gives exit status 3?

1. I don't know, but I believe this is a wget bug. The wget man page includes a "EXIT STATUS" section which states 3 to be "File I/O error". In any event, you're better off asking on the wget ML.
2. You should quote "$@", otherwise, white spaces will break it.
3. No workaround is the best workaround wink


This silver ladybug at line 28...

Offline

#3 2011-09-02 12:03:59

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: "wget --version" now gives exit status 3?

lolilolicon wrote:

2. You should quote "$@", otherwise, white spaces will break it.

Wouldn't that make all the options be processed as a single argument, even when they ought to be processed as multiple arguments? I can't think of an occasion I'd use a space in the arguments to wget unless I mean that space to separate arguments.

EDIT: Actually, on testing, it seems to separate the arguments. OK, I'll make the change. Thanks.

EDIT 2: FOLLOWUP -- It's been confirmed on the tex-live list that this is a bug in wget 1.13.3; a patch is available here.

Last edited by frabjous (2011-09-02 15:39:23)

Offline

#4 2011-09-02 17:26:42

jakobm
Member
Registered: 2008-03-24
Posts: 132

Re: "wget --version" now gives exit status 3?

Offline

Board footer

Powered by FluxBB