#1127830 document ways to use watch file substitutions twice

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Marc Haber
Date:
2026-02-13 16:57:02 UTC
Severity:
normal
#1127830#5
Date:
2026-02-13 16:55:37 UTC
From:
To:
Hi,

I would like to use

Source: https://api.github.com/repos/@PACKAGE@/@PACKAGE@/releases↲
Matching-Pattern: https://github.com/@PACKAGE@/@PACKAGE@/releases/download/@SEMANTIC_VERSION@/@PACKAGE@-@SEMANTIC_VERSION@@ARCHIVE_EXT@↲
Search-Mode: plain↲

substitute @PACKAGE@ with aide if you want to see it in action-

That doesn't work, the version number is doubled then. I haven't found a
way to mangle the version number back or to make one of the
@SEMANTIC_VERSION@ instance non-capturing. The term "capturing" is used
in the debian-watch manpage, but not explained at all.

I eventually ended up with using this:
Matching-Pattern: https://github.com/@PACKAGE@/@PACKAGE@/releases/download/v[0-9\.]+/@PACKAGE@-@SEMANTIC_VERSION@@ARCHIVE_EXT@↲
but I don't like that much.

Greetings
Marc
--- /etc/devscripts.conf ---
Empty.
--- ~/.devscripts --- DEBUILD_LINTIAN=no DEB_BUILD_OPTIONS="parallel=10" DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i -I -us -uc -j10" DEBUILT_LINTIAN_OPTS="-i -I --show-overrides" DEBSIGN_KEYID=mh+debian-packages@zugschlus.de DEBCHANGE_MULTIMAINT=no BTS_SENDMAIL_COMMAND="/usr/sbin/exim4 -f mh+debian-packages@zugschlus.de" BTS_INTERACTIVE=force