Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78793 - [util-linux] 'cal' does not use locale's first_weekday

Attached to Project: Arch Linux
Opened by toffan (toffan) - Thursday, 15 June 2023, 15:49 GMT
Last edited by Christian Hesse (eworm) - Monday, 19 June 2023, 12:05 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Even if the locale says that the first day of the week is Monday, 'cal' seems to ignore this information.

Package: util-linux 2.39-9
Config: Install en_DK.UTF-8 and en_US.UTF-8 locales

Steps to reproduce:
```
$ LC_TIME="en_DK.UTF-8" cal
June 2023
Su Mo Tu We Th Fr Sa
...
$ cal --version
cal from util-linux 2.39-dirty
```

Note that older version of 'cal' (restored from a backup) does not have the issue.
```
$ ./cal --version
cal from util-linux 2.38.1
$ LC_TIME="en_US.UTF-8" ./cal
June 2023
Su Mo Tu We Th Fr Sa
...
$ LC_TIME="en_DK.UTF-8" ./cal
June 2023
Mo Tu We Th Fr Sa Su
...
```

Suggestions/Ideas:
Upstream[1] does not seem to have modified code recently. Taking a look on the binary, it seems this part[2] of the sources is not present in the executable, suggesting that `HAVE_DECL__NL_TIME_WEEK_1STDAY` is not defined at compilation.

[1]: https://github.com/util-linux/util-linux/blob/master/misc-utils/cal.c
[2]: https://github.com/util-linux/util-linux/blob/master/misc-utils/cal.c#L362-L371
This task depends upon

Closed by  Christian Hesse (eworm)
Monday, 19 June 2023, 12:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  in git
Comment by Toolybird (Toolybird) - Thursday, 15 June 2023, 22:03 GMT
More likely fallout from switch to meson build. See also  FS#78769 
Comment by Toolybird (Toolybird) - Friday, 16 June 2023, 07:18 GMT Comment by Christian Hesse (eworm) - Friday, 16 June 2023, 09:54 GMT Comment by Christian Hesse (eworm) - Monday, 19 June 2023, 12:04 GMT
Pushed to git... Will be in util-linux 2.39-10 or util-linux 2.39.1-1.

Loading...