Skip to content

Introduce new output format for apt(8)

Julian Andres Klode requested to merge jak/apt:terse-ui into main

This merge proposal introduces the new concise, logical output format for the apt(8) command, as can be seen in a comparison to apt-get(8) in the attached screenshot:

image

With the install command's "The following additional packages will be installed" list being shown in the old UI but no in the new UI, the difference for it are much smaller than for upgrade:

image

It incorporates the columnar feature in merge request !217 (closed) and a change to the OpProgress to hide lines that are done.

The key talking points here are:

  1. Instead of long sentences, we use short concise messages, e.g. "The following NEW packages will be installed" becomes "Installing".

  2. Dependencies are only listed once. We removed the "The following additional packages will be installed" section in favor of splitting up the "Installing" section into "Installing" and "Installing dependencies" (like dnf)

  3. The order of the output is different:

    1. Packages to be installed manually
    2. Packages to be installed automatically
    3. Weak dependencies of new packages not installed
    4. Packages to be upgraded
    5. Packages to be downgraded
    6. Packages that have been kept back / are on hold
    7. Removals
    8. Essential removals

    i.e. we logically show you the action that is being done, followed by lists related to the action.

  4. As requested by popey, we have colorful UI, with green for packages being installed and red for packages being removed.

Caveats:

  • The list of recommends and suggests has not been updated yet, it should move to after the packages being installed (as they are what triggers them)

This also introduces output format versioning, configured by the APT::Output-Format option. The default value is 0, except for the apt(8) binary where it is 30 - which enables the new style.

Edited by Julian Andres Klode

Merge request reports

Loading