On 24/04/14 10:32, Daniel Lintott wrote: > On 24/04/14 09:44, Daniel Lintott wrote: >> On 24/04/14 09:04, Andreas Tille wrote: >>> Hi, >>> >>> if you look at the HTML code of >>> >>> http://www.mkgmap.org.uk/download/ >>> >>> you see strings like: >>> >>> \"mkgmap-r3226-src.tar.gz\": 1555754, \"mkgmap-r3226-src.zip\": 2194070, >>> >>> and thus uscan stopped working. I guess it will be hard to convince >>> upstream that their new shiny page is a bad idea for Debian and that >>> they change back. >>> >>> Any idea how we could make uscan capable to detect and download the latest >>> source anyway? >>> >>> Kind regards >>> >>> Andreas. >>> >> >> Using something like this would seem to work, added to the opts >> >> downloadurlmangle=s/\.zip/-src.tar.gz/ >> >> >> Regards, >> > > Having just tried this again.. it only half works... > > Output from uscan --verbose > > -- Scanning for watchfiles in . > -- Found watchfile in ./debian > -- In debian/watch, processing watchfile line: > > opts="dversionmangle=s/0.0.0.svn//,downloadurlmangle=s/\.zip/-src.tar.gz/" > http://www.mkgmap.org.uk/download/ mkgmap-r([\d]+)\.zip > -- Found the following matching hrefs: > /download/mkgmap-r3226.zip (3226) > Newest version on remote site is 3226, local version is 0.0.0+svn2981 > (mangled local version number 2981) > => Newer version available from > http://www.mkgmap.org.uk/download/mkgmap-r3226-src.tar.gz > -- Downloading updated package mkgmap-r3226.zip > -- Scan finished > > So it seems as if uscan is ignoring the downloadurlmangle when it comes > to actually downloading the file! > > Regards, >
After digging into even more... hate to leave a problem unsolved... I think I cracked it! In addition to the the downloadurlmangle, a filenamemangle is needed to save the downloaded file with the correct name. filenamemangle=s/\/download\/mkgmap-r([\d]+)\.zip/mkgmap-r$1-src.tar.gz/ Which removes the download directory and names the file correctly as a tar.gz Hope that helps... Regards, -- Daniel Lintott GPG Key: 4096R/5D73EC6E
signature.asc
Description: OpenPGP digital signature