Hi, dear maintainers. I think I'm facing the same issue when updating a watch file of a package I maintain. I'll paste both versions of the file and the output of uscan. The update is to make use of github api instead of scraping the tags page - which is pretty unreliable since they like to change everything from time to time :-(
Cheers,
Charles
Old d/watch:
version=4
opts="filenamemangle=s%(?:.*?)?V?(@ANY_VERSION@)(@ARCHIVE_EXT@)%kristall-$2$3%,
\
dversionmangle=s/@DEB_EXT@//, \
repacksuffix=+dfsg" \
https://github.com/MasterQ32/kristall/tags \
(?:.*?/)?V?@ANY_VERSION@@ARCHIVE_EXT@
New d/watch:
version=4
opts="searchmode=plain, \
filenamemangle=s%(?:.*?)?V(@ANY_VERSION@)%kristall-$2.tar.gz%, \
dversionmangle=s/@DEB_EXT@//, \
repacksuffix=+dfsg, \
uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|a|b)\d*)$/$1~$2/"
\
https://api.github.com/repos/MasterQ32/kristall/releases?per_page=100 \
https://api.github.com/repos/[^/]+/[^/]+/tarball/[Vv]?@ANY_VERSION@
Old d/watch scan:
charles a9eab71 … debian kristall kristall uscan --verbose
--report
uscan info: uscan (version 2.22.2) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="kristall" version="0.3+git20210303.763bd81+dfsg-2" (as
seen in debian/changelog)
uscan info: package="kristall" version="0.3+git20210303.763bd81+dfsg" (no
epoch/revision)
uscan info: ./debian/changelog sets package="kristall"
version="0.3+git20210303.763bd81+dfsg"
uscan info: Process watch file at: debian/watch
package = kristall
version = 0.3+git20210303.763bd81+dfsg
pkg_dir = .
uscan info: opts:
filenamemangle=s%(?:.*?)?V?((?:[-_]?(\d[\-+\.:\~\da-zA-Z]*)))((?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz)))%kristall-$2$3%,
dversionmangle=s/(?:[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$)//,
repacksuffix=+dfsg
uscan info: line: https://github.com/MasterQ32/kristall/tags
(?:.*?/)?V?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))
uscan info: Parsing
filenamemangle=s%(?:.*?)?V?((?:[-_]?(\d[\-+\.:\~\da-zA-Z]*)))((?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz)))%kristall-$2$3%
uscan info: Parsing
dversionmangle=s/(?:[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$)//
uscan info: Parsing repacksuffix=+dfsg
uscan info: line: https://github.com/MasterQ32/kristall/tags
(?:.*?/)?V?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))
uscan info: Last orig.tar.* tarball version (from debian/changelog):
0.3+git20210303.763bd81+dfsg
uscan info: Last orig.tar.* tarball version (dversionmangled):
0.3+git20210303.763bd81
uscan info: Requesting URL:
https://github.com/MasterQ32/kristall/tags
uscan info: Matching pattern:
(?:(?:https://github.com)?\/MasterQ32\/kristall\/)?(?:.*?/)?V?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))
uscan info: Found the following matching hrefs on the web page (newest first):
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz (0.4)
index=0.4-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz (0.4)
index=0.4-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.zip (0.4)
index=0.4-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.zip (0.4)
index=0.4-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.3.tar.gz (0.3)
index=0.3-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.3.tar.gz (0.3)
index=0.3-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.3.zip (0.3)
index=0.3-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.3.zip (0.3)
index=0.3-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.2.tar.gz (0.2)
index=0.2-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.2.tar.gz (0.2)
index=0.2-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.2.zip (0.2)
index=0.2-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.2.zip (0.2)
index=0.2-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.1.tar.gz (0.1)
index=0.1-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.1.tar.gz (0.1)
index=0.1-1
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.1.zip (0.1)
index=0.1-0
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.1.zip (0.1)
index=0.1-0
uscan info: Looking at $base = https://github.com/MasterQ32/kristall/tags with
$filepattern =
(?:.*?/)?V?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))
found
$newfile =
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz
$newversion = 0.4
$lastversion = 0.3+git20210303.763bd81
uscan info: Matching target for downloadurlmangle:
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz
uscan info: Upstream URL(+tag) to download is identified as
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz
uscan info: Matching target for filenamemangle:
https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz
uscan info: Filename (filenamemangled) for downloaded file: kristall-0.4.tar.gz
uscan: Newest version of kristall on remote site is 0.4, local version is
0.3+git20210303.763bd81
(mangled local version is 0.3+git20210303.763bd81)
uscan: => Newer package available from:
=> https://github.com/MasterQ32/kristall/archive/refs/tags/V0.4.tar.gz
uscan info: Scan finished
charles a9eab71 … debian kristall kristall echo $?
0
New d/watch scan:
charles debian/latest … debian kristall kristall uscan --verbose
--report
uscan info: uscan (version 2.22.2) See uscan(1) for help
uscan info: Scan watch files in .
uscan info: Check debian/watch and debian/changelog in .
uscan info: package="kristall" version="0.4+dfsg-1" (as seen in
debian/changelog)
uscan info: package="kristall" version="0.4+dfsg" (no epoch/revision)
uscan info: ./debian/changelog sets package="kristall" version="0.4+dfsg"
uscan info: Process watch file at: debian/watch
package = kristall
version = 0.4+dfsg
pkg_dir = .
uscan info: opts: searchmode=plain,
filenamemangle=s%(?:.*?)?V((?:[-_]?(\d[\-+\.:\~\da-zA-Z]*)))%kristall-$2.tar.gz%,
dversionmangle=s/(?:[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$)//,
repacksuffix=+dfsg,
uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|a|b)\d*)$/$1~$2/
uscan info: line:
https://api.github.com/repos/MasterQ32/kristall/releases?per_page=100
https://api.github.com/repos/[^/]+/[^/]+/tarball/[Vv]?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))
uscan info: Parsing searchmode=plain
uscan info: Parsing
filenamemangle=s%(?:.*?)?V((?:[-_]?(\d[\-+\.:\~\da-zA-Z]*)))%kristall-$2.tar.gz%
uscan info: Parsing
dversionmangle=s/(?:[\+~](debian|dfsg|ds|deb)(\.)?(\d+)?$)//
uscan info: Parsing repacksuffix=+dfsg
uscan info: Parsing
uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|a|b)\d*)$/$1~$2/
uscan info: line:
https://api.github.com/repos/MasterQ32/kristall/releases?per_page=100
https://api.github.com/repos/[^/]+/[^/]+/tarball/[Vv]?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))
uscan info: Last orig.tar.* tarball version (from debian/changelog): 0.4+dfsg
uscan info: Last orig.tar.* tarball version (dversionmangled): 0.4
uscan info: Requesting URL:
https://api.github.com/repos/MasterQ32/kristall/releases?per_page=100
uscan info: Found the following matching hrefs on the web page (newest first):
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4 (0.4)
index=0.4-0
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.3 (0.3)
index=0.3-0
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.2 (0.2)
index=0.2-0
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.1 (0.1)
index=0.1-0
uscan info: Looking at $base =
https://api.github.com/repos/MasterQ32/kristall/releases?per_page=100 with
$filepattern =
https://api.github.com/repos/[^/]+/[^/]+/tarball/[Vv]?(?:[-_]?(\d[\-+\.:\~\da-zA-Z]*))
found
$newfile = https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4
$newversion = 0.4
$lastversion = 0.4
uscan info: Matching target for downloadurlmangle:
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4
uscan info: Upstream URL(+tag) to download is identified as
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4
uscan info: Matching target for filenamemangle:
https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4
uscan info: Filename (filenamemangled) for downloaded file: kristall-0.4.tar.gz
uscan info: Newest version of kristall on remote site is 0.4, local version is
0.4
(mangled local version is 0.4)
uscan info: => Package is up to date from:
=> https://api.github.com/repos/MasterQ32/kristall/tarball/V0.4
uscan info: Scan finished
charles debian/latest … debian kristall kristall 1 echo $?
1
signature.asc
Description: PGP signature

