[PATCH] busybox: tr: enable options required by POSIX
Jordan Geoghegan
jordan at geoghegan.ca
Mon Jul 13 15:09:48 EDT 2020
On 2020-07-13 08:36, Petr Štetiar wrote:
> Magnus Kroken <mkroken at gmail.com> [2020-07-13 15:49:30]:
>
> Hi,
>
>> Support for character classes (e.g. [:upper:] and [:lower:]) and
>> equivalence classes (e.g. [=a=]) in the tr utility are required by POSIX.
>> This change increases package size by approx. 500 bytes.
> where does OpenWrt claims, that it's fully POSIX compliant? Some deviations
> are expected from the standards in exchange for lower flash usage. Maybe it
> could be considered as `default y if !SMALL_FLASH` for devices with more flash
> space, but then we would probably get inconsistent behaviour across various
> targets and scripts wouldn't use this classes anyway.
>
> So I don't see anything in favor for this patch inclusion.
>
> -- ynezz
Hi Petr,
Not sure if you've had a chance to read through the earlier discussion
about this, so I will reiterate my point a bit below
On OpenWRT 'tr' is configured to silently ignore character classes and
treat all characters literally, which is the most dangerous kind of
deviation from norm, as it is does something non-standard without
informing the user. That alone seems to strongly put this in favour of
being included. Even if it is decided to deviate from the standard and
ignore character classes, there should at the very least be an
error/warning printed.
The question being asked is, is saving 500 bytes worth a tremendous
deviation from the norm, and rendering a standard tool essentially
useless (with a built-in foot gun to boot!)
Regards,
Jordan
More information about the openwrt-devel
mailing list