[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#638706: qa.debian.org: Does not like \1 backreferences in watch file (breaks download links)



Package: qa.debian.org
Severity: normal

Hi folks,

I noticed that the "download" links on the developer's packages
overview, which allow downloading new upstream version if uscan detects
new versions, are not working right now. At least on this page:

	http://qa.debian.org/developer.php?login=matthijs%40stdin.nl&comaint=yes

The links point to, for example,

	http://qa.debian.org/1/openttd-1-source.tar.gz

which returns an Apache 404 from qa.debian.org.

I'm not sure if the url is wrong, or if this url should redirect but it
doesn't. Not sure where the "1" in the url comes from either, since the
link is supposed to download the source for openttd 1.1.2.

I also noticed that the download links are working for other packages,
so it must be something related to the rewriting happening in my watch
file. For the OpenTTD package mentioned above, the watch file contains:

	options=downloadurlmangle=s/(.*)\/index.html$/\1\/openttd-\1-source.tar.gz/ \
	http://master.binaries.openttd.org/releases/ \
	(\d+(?:\.\d+)*)/index.html

Looking at this file, it seems the "1"'s in the download url come from
the \1 backreferences in the downloadurlmangle option.

Thinking about this a bit further, I suspect that this is caused by
using \1 as a backreference instead of $1 (which is perfectly valid in
Perl and is understood by uscan, but apparently not by the qa.debian.org
scripts).

I'm not sure if this is a bug in my watchfile, or that qa.debian.org
should support this, though. This might be a trival change in the
qa.debian.org scripts, but I'll probably change my backreferences to use
$ instead of \ anyway (seems Perl recommends using $1 instead of \1 as
well).

Also, perhaps my analysis is wrong somewhere, haven't actually confirmed
that the backreferences are the cause (though it seems likely).

Gr.

Matthijs

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



Reply to: