--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: ben: Please make generated simple query match the set of exact package names
- From: Balint Reczey <balint.reczey@canonical.com>
- Date: Tue, 1 Aug 2017 01:44:03 +0200
- Message-id: <CAG+KjmPs0JgOur7_iNt1+sRYiEE19_BrrojK_r0f4B3hdyWJPg@mail.gmail.com>
Source: ben
Version: 0.7.7
Severity: normal
Tags: patch
Dear Maintainers,
The queries generated for the auto-* transitions may match more
packages than expected due to \b matching "-".
For example this query matches packages depending on libevent-2.0-5:
ben query ".depends ~ /\b(libevent)\b/"
Please consider accepting the attached patch that fixes the generated queries.
Cheers,
Balint
--
Balint Reczey
Debian & Ubuntu Developer
From 447a9693c890742807efac0019c517dda1ea12db Mon Sep 17 00:00:00 2001
From: Balint Reczey <balint.reczey@canonical.com>
Date: Tue, 1 Aug 2017 01:13:51 +0200
Subject: [PATCH] Make generated simple query match set of exact package names
\b matched "-", too.
---
lib/query.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/query.ml b/lib/query.ml
index 58ca3dd..1cf09b6 100644
--- a/lib/query.ml
+++ b/lib/query.ml
@@ -31,7 +31,7 @@ let rec simplify query = match query with
| packages ->
let packages = List.map Re_pcre.quote packages in
let r_string = String.concat "|" packages in
- let rex = Re_pcre.regexp (Printf.sprintf "\b(%s)\b" r_string) in
+ let rex = Re_pcre.regexp (Printf.sprintf "[ ](%s)[, $]" r_string) in
EMatch (field, ERegexp (package, rex))
end
| EMatch (_, (EDep _ | ERegexp _)) -> query
--
2.11.0
--- End Message ---
--- Begin Message ---
Source: ben
Source-Version: 0.8.3
We believe that the bug you reported is fixed in the latest version of
ben, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 870319@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Stéphane Glondu <glondu@debian.org> (supplier of updated ben package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Tue, 30 Jul 2019 17:04:37 +0200
Source: ben
Architecture: source
Version: 0.8.3
Distribution: unstable
Urgency: medium
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Changed-By: Stéphane Glondu <glondu@debian.org>
Closes: 841720 870319 907959
Changes:
ben (0.8.3) unstable; urgency=medium
.
* Fix exact package name match (Closes: #870319, #841720)
* Keep all fields when parsing for "query -s" (Closes: #907959)
* Bump debhelper compat level to 12
* Bump Standards-Version to 4.4.0
Checksums-Sha1:
dd2656fa67c505f7b8c0ad059be49058f533441b 1875 ben_0.8.3.dsc
02bd82d3ec3ea2cefdff96aa5aeca93c588de8d7 63228 ben_0.8.3.tar.xz
Checksums-Sha256:
e2e81f91154937bb72a59d4ce7418990477419c830a922984b1630454f4e79dd 1875 ben_0.8.3.dsc
c6edf5d79aa4915b04f599e7d00d3604c81e8c99833c80714ce76edbb743f70b 63228 ben_0.8.3.tar.xz
Files:
d0b446926c21107b8ad5c1ae2d773f5c 1875 devel optional ben_0.8.3.dsc
34f4974c6ab502a14d1177dc406221f1 63228 devel optional ben_0.8.3.tar.xz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEbeJOl+yohsxW5iUOIbju8bGJMIEFAl1AYDIACgkQIbju8bGJ
MIGooAgAn1k5WTfkf56+zz33ztTCbfdzST3FH6Hir3QmsB4aaKOfAIEX/SFV7jnA
xAwEpoUyMn5f3Da8BWQedjlsrUFkIlUpFPs2fStD/ylyKQqo1KRiH/zs8Wp3FIw6
81RV4xRQnMzpvxaYoNxBOZv9o88d6a0ti8OThsaZEaTv9v6wb3+7uepzyoaBfTzt
TOpNy8cQgYPwXdBm88UVTt+TF4BD3YIJrRqeKBJqUh9TapyItkV35MYoqRZSP9+D
0rZyIA9q80hzqBcd4oLFCG+Ljhll/ACxHi/s7FrJdQW++VvBur+qL8tr4RPZV/tT
3KN0T1yIF+jV5rVL8Umt7uA9JMdktA==
=TQ/Q
-----END PGP SIGNATURE-----
--- End Message ---