Package: coreutils
Version: 8.30-1

When using "apt-get" to install, remove and/or purge packages and piping output to "tee", a minor output alignment issue appears.

Depending on terminal dimensions, the wrong aligned lines are different. Due to mail line break, the examples below do not show it exactly.

In case of 237 terminal columns,
        "Selecting previously unselected package net-tools."
is shifted to the visual end of the line above.

In case of 160 terminal columns,
        "Need to get 0 B/248 kB of archives."
is shifted similarly and
        "After this operation, 1,002 kB of additional disk space will be used."
is shifted again to the end of the already shifted line above, so there is a large overall gap.

_____________________________________
root@VM-Buster:~# tput cols
237
root@VM-Buster:~# apt-get install net-tools | tee
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 248 kB of archives.
After this operation, 1,002 kB of additional disk space will be used.
Get:1 https://cdn-aws.deb.debian.org/debian buster/main amd64 net-tools amd64 1.60+git20180626.aebd88e-1 [248 kB]
Fetched 248 kB in 2min 46s (1,495 B/s)
Selecting previously unselected package net-tools.
(Reading database ... 16727 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1_amd64.deb ...
Unpacking net-tools (1.60+git20180626.aebd88e-1) ...
Setting up net-tools (1.60+git20180626.aebd88e-1) ...
_____________________________________
root@VM-Buster:~# tput cols
160
root@VM-Buster:~# apt-get install net-tools | tee
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/248 kB of archives.

After this operation, 1,002 kB of additional disk space will be used.
      Selecting previously unselected package net-tools.
(Reading database ... 16727 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1_amd64.deb ...
Unpacking net-tools (1.60+git20180626.aebd88e-1) ...
Setting up net-tools (1.60+git20180626.aebd88e-1) ...
_____________________________________

The issue appears independently of used "coreutils", Debian and device used, at least according to our tests done. And of course it appears independently of the actual handled APT package, as long as something is actually installed or removed.

So it seems to be a general issue in how "tee" handles it's input or catches terminal dimensions. Properly this could be fixed as well "apt"-side, but for now I think it is better investigated "tee"-side.

Related GitHub issue: https://github.com/Fourdee/DietPi/issues/1788

Best regards,

MichaIng

Reply via email to