Your message dated Mon, 4 Aug 2025 15:55:37 +0200
with message-id 
<o4koaefrxbrrfbsetrt6rljhxhr63ugv7aqca3jqzz7jhsetnj@uc4iyn7xgx5s>
and subject line Re: Bug#1110390: plocate: Attempts to do a match on character 
classes even when --regex nor --regexp are supplied, but fails
has caused the Debian Bug report #1110390,
regarding plocate: Attempts to do a match on character classes even when 
--regex nor --regexp are supplied, but fails
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.)


-- 
1110390: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110390
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: plocate
Version: 1.1.18-1
Severity: normal

> touch test\ locate.txt
> touch test\ locate[.txt
> sudo systemctl start plocate-updatedb.service
> # verify locate database up-to-date:
> locate 'test locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> #Uh oh:
> locate 'test locate['
Pattern 'test locate[' ended prematurely

Ok, so it's interpreting [...] as a character class despite me not saying 
"--regex" nor "--rexexp"?

Nope:

> locate 'tes[st] locate'
> locate --regex 'tes[st] locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate --regexp 'tes[st] locate'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate 'test locate['
Pattern 'test locate[' ended prematurely
> locate 'test locate[[]'
> locate 'test locate[\[]'
> locate 'test locate.'
/home/myself/test locate.txt
> locate --regex 'test locate.'
/home/myself/test locate.txt
/home/myself/test locate[.txt
> locate --regexp 'test locate.'
/home/myself/test locate.txt
/home/myself/test locate[.txt

Looks like it sees something that looks like a character class even
when not told it's looking for regexps, starts treating it as a
character class, which fails, because the user hasn't supplied a
character class, but even when the user supplies a valid character
class that should match, doesn't.

I can't report this issue upstream because the git repo is on ipv6
only.



-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (5, 'testing'), (2, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.11.5+bpo-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.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 plocate depends on:
ii  adduser     3.134
ii  libc6       2.36-9+deb12u10
ii  libgcc-s1   12.2.0-14+deb12u1
ii  libstdc++6  12.2.0-14+deb12u1
ii  liburing2   2.3-3
ii  libzstd1    1.5.4+dfsg2-5

plocate recommends no packages.

Versions of packages plocate suggests:
ii  nocache         1.1-1+b1
ii  powermgmt-base  1.37
ii  systemd-sysv    252.38-1~deb12u1

-- Configuration Files:
/etc/updatedb.conf changed:
PRUNE_BIND_MOUNTS="no" # for /hdd bind mounts back into their desired locations
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph 
/home/.ecryptfs /var/lib/schroot /hdd"
PRUNEFS="NFS afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs 
curlftpfs debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs 
fuse.encfs fuse.glusterfs fuse.gocryptfs fuse.gvfsd-fuse fuse.mfs fuse.rclone 
fuse.rozofs fuse.sshfs fusectl fusesmb hugetlbfs iso9660 lustre lustre_lite mfs 
mqueue ncpfs nfs nfs4 ocfs ocfs2 proc pstore rpc_pipefs securityfs shfs smbfs 
sysfs tmpfs tracefs udev udf usbfs"


-- no debconf information

--- End Message ---
--- Begin Message ---
On Mon, Aug 04, 2025 at 11:49:01PM +1000, Tim Connors wrote:
> I missed that detail when looking at the manpage, but specifically "end
> and begin with *".  Non intuitive; I had never noticed that behaviour with
> mlocate before.

Well, it turns out that if I have ever the slightest change from mlocate,
I get annoyed emails about people's scripts and the like :-) (There's
a single one, namely the change from OR queries to AND queries, and
I get regular complaints about that.)

> I was also looking for some kind of --literal flag to save from having to
> script explicit escapes.  There's -N for output but I'd like something
> like grep's -F for input.

That sounds reasonable; I will make a mental note if I find the time/energy
to add new features to plocate in the future.

In any case, it seems like this is basically an upstream feature request
(observed behavior matches documented behavior), so I'm closing it in the
context of Debian.

/* Steinar */
-- 
Homepage: https://www.sesse.net/

--- End Message ---

Reply via email to