Public bug reported:

[ Impact ]

On Ubuntu 26.04 LTS, `pr` from rust-coreutils 0.10.0-1ubuntu2~26.04.1 loses data
in multi-column mode. With N columns it prints floor(lines/N) lines per column
and discards the remainder, with no error and exit status 0. Any script that 
uses
`pr -2`, `pr -3` etc. to lay out a list (menus, reports, printed listings) 
silently
loses its last entries.

In addition, `-t` (omit header/trailer) still pads output to the full page
length (~56 blank lines). POSIX says -t must "quit writing after the last line
of each file without spacing to the end of the page"; GNU pr does not pad.

[ Test Case ]

  $ printf 'a\na\nb\n' | pr -t -2
  a                                     a
  (followed by ~55 blank lines; line "b" is missing)

  $ seq 5 | pr -t -3 | grep -v '^$'
  1                             2                       3
  (lines 4 and 5 are missing)

Expected (GNU coreutils 9.7, gnupr):

  $ seq 5 | gnupr -t -3
  1                     3                       5
  2                     4

[ Where it is fixed ]

Fixed upstream in uutils 0.11.0 (released 2026-08-31):
  https://github.com/uutils/coreutils/pull/14088
  "pr: stop dropping lines the columns do not divide evenly"
Verified: the upstream 0.11.0, 0.12.0 and 0.13.0 release binaries produce all
input lines and do not pad under -t. Only 0.10.0 (as shipped in 26.04) is 
affected.

Please backport PR #14088 (and the -t padding fix in the same release) to
rust-coreutils in resolute-updates.

[ Where problems could occur ]

The change is confined to pr's column layout. Regressions would show up as
different column assignment of lines in `pr -COLUMN` output.

[ Other Info ]

ii  rust-coreutils  0.10.0-1ubuntu2~26.04.1  amd64
Ubuntu 26.04.1 LTS
Reproducible in C and UTF-8 locales.

** Affects: rust-coreutils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2190876

Title:
  pr -COLUMN silently drops input lines when line count is not a
  multiple of the column count

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2190876/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to