[MPlayer-dev-eng] TOOLS/binary_codecs.sh update
Diego Biurrun
diego at biurrun.de
Wed Nov 3 12:25:23 CET 2010
On Thu, Oct 28, 2010 at 10:21:22AM +0200, Reinhard Tartler wrote:
> Thanks for the thorough review!
Uh, I wouldn't consider it that thorough :)
> On Do, Okt 28, 2010 at 09:50:28 (CEST), Diego Biurrun wrote:
>
> > On Wed, Oct 13, 2010 at 05:53:58PM +0200, Reinhard Tartler wrote:
> >>
> >> The original author of TOOLS/binary_codecs.sh proposed three changes,
> >> two of which I found clear and easy to understand and committed it. The
> >> last one made me think. I'm talking about this change:
> >>
> >> My thoughts:
> >>
> >> - I haven't tested it myself yet, but if it works (I suppose it does),
> >> I'm inclined to include it
> >> - is that mywget approach somewhat sane?
> >
> > I haven't given it enough thought to form an opinion yet.
> >
> >> - should we host the files at
> >> http://people.debian.org/~mennucc1/mplayer/ somewhere on mplayerhq.hu
> >> instead?
> >
> > Yes.
>
> Can you either add me to group www-data, or otherwise arrange me write
> access so that I can install these files? Or shall I rather put it in my
> public_html in my home?
Why not add them to the top directory of the homepage repository?
BTW, the list of mirrors is outdated.
> --- binary_codecs.sh (revision 32561)
> +++ binary_codecs.sh (working copy)
> @@ -12,6 +12,10 @@
> CODECDIR=/usr/lib/codecs
> PREFDIR=/var/lib/mplayer/prefs
> MYSITE='http://people.debian.org/~mennucc1/mplayer'
> +LANG=C
> +LC_ALL=C
> +LC_MESSAGES=C
> +export LANG LC_ALL LC_MESSAGES
These should be at the very top of the file.
I think LC_MESSAGES is redundant and you can directly export the vars.
> @@ -20,13 +24,44 @@
>
> +mywget ()
> +{
> + # note the the URL must be the first option
> + tempf=$(tempfile)
> + #check that we are not redirected
> + if wget --spider -S -o $tempf "$1" ; then
> + if egrep -qx ' *HTTP.* 302 Found' $tempf ; then
> + echo Error, there is an unexpected redirection, for the
> + echo URL "$1"
> + echo that is redirected to
> + grep Location $tempf | head -n 1
> + echo See more info in the log in $tempf
> + echo
> + return 1
> + else
> + rm $tempf
> + fi
> + else
> + echo Errors while checking URL "$1"
> + echo See the log in $tempf
> + return 1
> + fi
> + url="$1"
> + shift
> + if wget "$@" "$url" ; then
> + return 0
> + else
> + return 1
> + fi
> +}
I'm still not sure if this is worth the complexity.
Did you guys experience problems with 302 return codes?
Diego
More information about the MPlayer-dev-eng
mailing list