Bug#1067874: Allow trailing whitespace in apt patterns
Package: apt
Version: 2.7.14
Severity: wishlist
I think this is a bug:
root@hera:/# apt list '?source-package(^mg$) '
Listing... Error!
E: input:21-22: error: Expected end of file
?source-package(^mg$)
^
I think apt should ignore trailing whitespace, just as it ignores leading whitespace.
Here is a more complete transcript:
bash5$ mmdebstrap bookworm /dev/null --quiet --customize-hook='chroot $1'
root@hera:/# dpkg-query -W apt
apt 2.6.1
root@hera:/# apt --version
apt 2.6.1 (amd64)
root@hera:/# apt list '?source-package(^mg$)'
Listing... Done
mg/stable 20221112-1 amd64
root@hera:/# apt list ' ?source-package(^mg$)'
Listing... Done
mg/stable 20221112-1 amd64
root@hera:/# apt list ' ?source-package(^mg$) '
Listing... Error!
E: input:22-23: error: Expected end of file
?source-package(^mg$)
^
And again in sid:
bash5$ mmdebstrap sid /dev/null --quiet --customize-hook='chroot $1'
root@hera:/# dpkg-query -W apt
apt 2.7.14
root@hera:/# apt --version
apt 2.7.14 (amd64)
root@hera:/# apt list '?source-package(^mg$)'
Listing... Done
mg/unstable 20230501-1 amd64
root@hera:/# apt list ' ?source-package(^mg$)'
Listing... Done
mg/unstable 20230501-1 amd64
root@hera:/# apt list ' ?source-package(^mg$) '
Listing... Error!
E: input:22-23: error: Expected end of file
?source-package(^mg$)
^
Reply to: