diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2024-04-12 12:00:45 +0200 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2024-04-12 15:57:05 +0200 |
| commit | 8ddfeb2fb65dd45267d8f7abfc540d2b8cb73a5c (patch) | |
| tree | b0b400bf73b79b230ee4b69ec52c7a4c5bdd2f6a /apt-private | |
| parent | 88b0673b0dcc4c9c917b0cb9c16cc2ca0a92a987 (diff) | |
OpProgress: Erase lines when done
It's interesting to the user to see the progress when it happens,
but arguably once it's done it is just visual clutter, so let's
not write newlines, and when we are done, instead of appending
"Done", let's just empty the line.
This requires some effort to keep apt-cdrom happy which just writes
lines to stdout itself. Bad apt-cdrom. Maybe there is a better fix
for it, but this gets us going.
Diffstat (limited to 'apt-private')
| -rw-r--r-- | apt-private/private-cmndline.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index cbab22031..505f1f2b8 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -481,6 +481,10 @@ static bool ShowCommonHelp(APT_CMD const Binary, CommandLine &CmdL, std::vector< static void BinarySpecificConfiguration(char const * const Binary) /*{{{*/ { std::string const binary = flNotDir(Binary); + if (binary == "apt-cdrom" || binary == "apt-config") + { + _config->CndSet("Binary::apt-cdrom::APT::Internal::OpProgress::EraseLines", false); + } if (binary == "apt" || binary == "apt-config") { if (getenv("NO_COLOR") == nullptr) |
