diff mbox

localedata: bs_BA: fix yesexpr/noexpr [BZ #20974]

Message ID 20161215233558.9658-1-vapier@gentoo.org
State New
Headers show

Commit Message

Mike Frysinger Dec. 15, 2016, 11:35 p.m. UTC
Both regexes end with a "*." which means the previous match can be
omitted, and then the . allows them to match any input at all.

This means tools like coreutils' `rm -i` will always delete things
when prompted because the yesexpr regex matches all inputs (even
the negative ones).

2016-12-15  Mike Frysinger  <vapier@gentoo.org>

	[BZ #20974]
	* localedata/bs_BA (LC_MESSAGES): Delete "*." from the end of
	yesexpr and noexpr.
---
 localedata/locales/bs_BA | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mike Frysinger Dec. 16, 2016, 6:09 p.m. UTC | #1
On 15 Dec 2016 18:35, Mike Frysinger wrote:
> Both regexes end with a "*." which means the previous match can be
> omitted, and then the . allows them to match any input at all.
> 
> This means tools like coreutils' `rm -i` will always delete things
> when prompted because the yesexpr regex matches all inputs (even
> the negative ones).

meant to include this, but here's the diff made readable:
-yesexpr "^[+1dDyY]*."
-noexpr  "^[-0nN]*."
+yesexpr "^[+1dDyY]"
+noexpr  "^[-0nN]"
-mike
Rafal Luzynski Dec. 16, 2016, 9:24 p.m. UTC | #2
Mike,

16.12.2016 19:09 Mike Frysinger <vapier@gentoo.org> wrote:
>
>
> On 15 Dec 2016 18:35, Mike Frysinger wrote:
> > Both regexes end with a "*." which means the previous match can be
> > omitted, and then the . allows them to match any input at all.
> >
> > This means tools like coreutils' `rm -i` will always delete things
> > when prompted because the yesexpr regex matches all inputs (even
> > the negative ones).
>
> meant to include this, but here's the diff made readable:
> -yesexpr "^[+1dDyY]*."
> -noexpr "^[-0nN]*."
> +yesexpr "^[+1dDyY]"
> +noexpr "^[-0nN]"
> -mike

I guess the original author's intention was to put ".*" at the end
instead of "*." so first I was thinking about changing it into ".*".
But now I see you have removed all trailing ".*" from all locales.
If it works this way then I dare to say LGTM.

You may want to hear opinion from other people.

Regards,

Rafal
Rafal Luzynski Dec. 29, 2016, 12:52 p.m. UTC | #3
Mike, do you need more comments to push it?  More comments, anybody?
Thanks in advance,

Rafal


16.12.2016 19:09 Mike Frysinger <vapier@gentoo.org> wrote:
>
>
> On 15 Dec 2016 18:35, Mike Frysinger wrote:
> > Both regexes end with a "*." which means the previous match can be
> > omitted, and then the . allows them to match any input at all.
> >
> > This means tools like coreutils' `rm -i` will always delete things
> > when prompted because the yesexpr regex matches all inputs (even
> > the negative ones).
>
> meant to include this, but here's the diff made readable:
> -yesexpr "^[+1dDyY]*."
> -noexpr "^[-0nN]*."
> +yesexpr "^[+1dDyY]"
> +noexpr "^[-0nN]"
> -mike
Mike Frysinger Dec. 31, 2016, 7:19 p.m. UTC | #4
On 29 Dec 2016 13:52, Rafal Luzynski wrote:
> Mike, do you need more comments to push it?  More comments, anybody?

i've pushed it now for 2.2[345].  thanks for the nudge!
-mike
diff mbox

Patch

diff --git a/localedata/locales/bs_BA b/localedata/locales/bs_BA
index a47f87eb373d..68c2f9471a09 100644
--- a/localedata/locales/bs_BA
+++ b/localedata/locales/bs_BA
@@ -148,8 +148,8 @@  copy "en_DK"
 END LC_CTYPE
 
 LC_MESSAGES
-yesexpr "<U005E><U005B><U002B><U0031><U0064><U0044><U0079><U0059><U005D><U002A><U002E>"
-noexpr  "<U005E><U005B><U002D><U0030><U006E><U004E><U005D><U002A><U002E>"
+yesexpr "<U005E><U005B><U002B><U0031><U0064><U0044><U0079><U0059><U005D>"
+noexpr  "<U005E><U005B><U002D><U0030><U006E><U004E><U005D>"
 yesstr  "<U0064><U0061>"
 nostr   "<U006E><U0065>"
 END LC_MESSAGES