Your message dated Wed, 8 Jul 2026 14:27:49 +0200
with message-id <[email protected]>
and subject line Re: Bug#1140236: devscripts: uscan creates wrong version if
regex contains parentheses for grouping
has caused the Debian Bug report #1140236,
regarding devscripts: uscan creates wrong version if regex contains parentheses
for grouping
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1140236: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1140236
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: devscripts
Version: 2.26.7~bpo13+1
Severity: normal
if a debian/watch file contains parentheses for grouping in the
regex, uscan misinterpretes these parentheses for additional matches
for the upstream version number which results in wrong $newversion
value.
An example can be found in the cfengine3 package where the following
pattern should select only the minor versions which are devisible by
three:
(\d+\.([0369]|[147][0369]*([147][0369]*[258][0369]*)*([147][0369]*[147]|[258])|[258][0369]*([258][0369]*[147][0369]*)*([258][0369]*[258]|[147]))+\.\d+)
uscan outputs the following version:
$newversion = 3.27.1.27....7
instead of
$newversion = 3.27.1
-- Package-specific info:
--- /etc/devscripts.conf ---
Empty.
--- ~/.devscripts ---
export [email protected]
export DEBFULLNAME='Christoph Martin'
export DEBSIGN_KEYID="4C8F 6B0D 121E B15F 076F EB17 04EE 131A E6D6 21BE"
export DEBCOMMIT_SIGN_TAGS=yes
-- System Information:
Debian Release: 13.5
APT prefers stable-updates
APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990,
'stable'), (60, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.90+deb13.1-amd64 (SMP w/24 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE
not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages devscripts depends on:
ii dpkg-dev 1.22.22
ii file 1:5.46-5
ii gpg 2.4.7-21+deb13u1+b3
ii gpg-agent 2.4.7-21+deb13u1+b3
ii gpgv 2.4.7-21+deb13u1+b3
ii libconfig-inifiles-perl 3.000003-3
ii libdpkg-perl 1.22.22
ii libfile-dirlist-perl 0.05-3
ii libfile-homedir-perl 1.006-2
ii libfile-touch-perl 0.12-2
ii libio-string-perl 1.08-4
ii libmoo-perl 2.005005-1
ii libwww-perl 6.78-1
ii libyaml-libyaml-perl 0.903.0+ds-1
ii patchutils 0.4.2-1
ii perl 5.40.1-6
ii python3 3.13.5-1
ii sensible-utils 0.0.25
ii wdiff 1.2.2-9
Versions of packages devscripts recommends:
ii apt 3.0.3
ii curl 8.14.1-2+deb13u3
ii dctrl-tools 2.24-3+b1
ii debian-keyring 2025.07.26
ii debian-tag2upload-keyring 1.1
ii dput-ng [dput] 1.43
ii dupload 2.13.2
ii equivs 2.3.2
ii git-debpush 15.10~bpo13+1
ii libdistro-info-perl 1.13
ii libencode-locale-perl 1.05-3
ii libgitlab-api-v4-perl 0.27-1
ii libjson-perl 4.10000-1
ii liblwp-protocol-https-perl 6.14-1
ii libmetacpan-client-perl 2.033000-1
ii libsoap-lite-perl 1.27-3
ii libstring-shellquote-perl 1.04-3
ii liburi-perl 5.30-1
ii licensecheck 3.3.9-1
ii lintian 2.122.0
ii lzip 1.25-3
ii man-db 2.13.1-1
ii patch 2.8-2
ii pristine-tar 1.50+nmu2
ii python3-apt 3.0.0
ii python3-debian 1.0.1
ii python3-magic 2:0.4.27-3
ii python3-requests 2.32.3+dfsg-5+deb13u1
ii python3-unidiff 0.7.5-2
ii python3-xdg 0.28-2
ii strace 6.13+ds-1
ii unzip 6.0-29
ii wget 1.25.0-2
ii xz-utils 5.8.1-1
Versions of packages devscripts suggests:
pn adequate <none>
pn at <none>
pn autopkgtest <none>
pn bls-standalone <none>
ii build-essential 12.12
pn check-all-the-things <none>
ii debhelper 13.24.2
pn diffoscope <none>
pn disorderfs <none>
ii docker.io 26.1.5+dfsg1-9+b13
pn dose-extra <none>
pn duck <none>
ii elpa-devscripts 40.7
pn faketime <none>
ii gnuplot-x11 [gnuplot] 6.0.2+dfsg1-1
pn how-can-i-help <none>
ii libauthen-sasl-perl 2.1700-1
pn libdbd-pg-perl <none>
pn libterm-size-perl <none>
ii libtimedate-perl 2.3300-2
ii mailutils [mailx] 1:3.19-1
pn mmdebstrap <none>
pn mutt <none>
ii openssh-client [ssh-client] 1:10.0p1-7+deb13u4
pn piuparts <none>
ii postgresql-client 17+278
ii postgresql-client-15 [postgresql-client] 15.13-0+deb12u1
ii postgresql-client-17 [postgresql-client] 17.10-0+deb13u1
pn pristine-lfs <none>
ii python3-debianbts 4.1.1
ii python3-pycurl 7.45.6-1
ii quilt 0.68-1
pn ratt <none>
pn reprotest <none>
ii sendmail-bin [mail-transport-agent] 8.18.1-6+b1
pn svn-buildpackage <none>
pn w3m <none>
-- no debconf information
--- End Message ---
--- Begin Message ---
On Thu, Jun 18, 2026 at 05:04:52PM +0200, Christoph Martin wrote:
> Hi Agustin,
>
> a very good hint. I didn't know about the ?: qualifier. But that did the
> trick in the cfengine3 case.
Thanks for confirming that this works. Closing bug report.
I have also noticed that behavior with multiple capturing groups is
documented in the depths of debian-watch(5),
--- 8< ---
Here the matching string of (.+) in matching-pattern is considered as the
candidate upstream version. If there are multiple matching strings of
capturing patterns in matching-pattern, they are all concatenated with
(period) to form the candidate upstream version. Make sure to use the
non-capturing regex such as (?:[\d\.]+?) instead for the variable text
matching part unrelated to the version.
--- >8 ---
--
Agustin
--- End Message ---