Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256420

Re: Buster => Bullseye: packages kept back

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: Buster => Bullseye: packages kept back
Date 2023-03-27 16:10 +0200
Message-ID <GdVHP-fsOD-3@gated-at.bofh.it> (permalink)
References (1 earlier) <GdFWp-fiEO-5@gated-at.bofh.it> <GdH29-fjiB-1@gated-at.bofh.it> <GdTcZ-fr9O-3@gated-at.bofh.it> <GdTwm-frh1-1@gated-at.bofh.it> <GdULL-fsdy-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Mar 27, 2023 at 08:52:10AM -0400, Dan Ritter wrote:
> Greg Wooledge wrote: 
> > 3) apt uses a horrible yellow color that is nigh-unreadable on a white
> >    background.  (This is not configurable.)
> 
> It appears that it is, just badly documented.
> 
> In /etc/apt/apt.conf, you can specify the escape sequences for
> colors like this:
> 
> APT::Color::Yellow "ESC[33m";

unicorn:~$ man apt.conf | grep -i -e color -e colour
unicorn:~$ man apt-config | grep -i -e color -e colour
unicorn:~$ 

Yeah, that's "badly documented" i.e. "not documented at all".

Here are some other things one might find by poking around the web or
various commands:

apt-config(8)
        dump
            Just show the contents of the configuration space.

unicorn:~$ apt-config dump | grep -i -e color -e colour
Binary::apt::APT::Color "1";

So, there's a quasi-visible configuration element that lets you turn off
apt's use of colors completely.  Undocumented, obviously.

Your APT::Color::Yellow is not even visible in the dump of all the
configuration elements.

<https://salsa.debian.org/apt-team/apt/-/blob/main/doc/examples/configure-index>
contains:

    apt::moo::color "<BOOL>";

    apt::color::highlight "<STRING>";
    apt::color::neutral "<STRING>";

    APT::Color "<BOOL>";

I have no idea how out of date or inaccurate these may be.

It's also incredibly difficult to TEST any changes to apt's color
configuration, because the parts I care about are circumstantial.
The yellow color is used on the progress/status line while apt
is downloading stuff -- and if you've already run "apt update" earlier
today, chances are there won't be any new data to download when you run
it a second time.

If I use "apt search google-chrome-stable" I get the following text:

unicorn:~$ apt search google-chrome-stable
Sorting... Done
Full Text Search... Done
google-chrome-stable/stable,now 111.0.5563.110-1 amd64 [installed]
  The web browser from Google

where the package name (google-chrome-stable) appears green.  So...
can I test using that?  It appears I cannot.

If I put Binary::apt::APT::Color "0"; in my /etc/apt/apt.conf.d/99local
file, and re-run the apt search command, it's still green.

If I put APT::Color::Green "ESC[33m"; in there and re-run the apt search
command, it's also still green.  Is "ESC" supposed to be exactly that,
the capital letters E, S and C?  Or is it supposed to be a raw ASCII Esc
character?  If I change it to a raw Esc character and re-run the apt search
command ... the package name is still green.

More web searching... here's another page,
<https://unix.stackexchange.com/questions/392791/apt-configure-the-colors>.
One of the answers says:

    Despite defining several colours, apt currently (1.8.2) doesn't
    use most of them. Highlight and Neutral are used in a few places,
    but none of the colours are except Yellow. It appears in one line
    in acqprogress.cc as the output colour for status.

So, if I put APT::Color::Highlight "ESC[33m"; in my file and re-run the
command, I get:

unicorn:~$ apt search google-chrome-stable
Sorting... Done
Full Text Search... Done
ESC[33mgoogle-chrome-stable/stable,now 111.0.5563.110-1 amd64 [installed]
  The web browser from Google

Aha!  So it does use that particular configuration element, and it does
expect a raw Esc character.  But just to be absolutely sure, I'll try
a backslash+e first:

unicorn:~$ apt search google-chrome-stable
Sorting... Done
Full Text Search... Done
\e[33mgoogle-chrome-stable/stable,now 111.0.5563.110-1 amd64 [installed]
  The web browser from Google

Nope.  Raw it must be.  Unfortunately, I can't test APT::Color::Yellow
because it depends on ephemeral state.

It's also quite curious that "apt search" uses the Highlight color even
when Binary::apt::APT::Color is set to "0".  Bug?  Well, it can't be a
bug if it's not documented.  But it's really stupid.  And it makes me
wonder just what Binary::apt::APT::Color actually controls.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-26 11:20 +0200
  Re: Buster => Bullseye: packages kept back Jeffrey Walton <noloader@gmail.com> - 2023-03-26 11:30 +0200
  Re: Buster => Bullseye: packages kept back davidson <davidson@freevolt.org> - 2023-03-26 13:20 +0200
    Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-26 15:00 +0200
      Re: Buster => Bullseye: packages kept back davidson <davidson@freevolt.org> - 2023-03-27 11:10 +0200
        Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-27 11:30 +0200
          Re: Buster => Bullseye: packages kept back David Wright <deblis@lionunicorn.co.uk> - 2023-03-27 16:50 +0200
          Re: Buster => Bullseye: packages kept back davidson <davidson@freevolt.org> - 2023-03-28 11:00 +0200
            Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-28 12:30 +0200
        Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-27 16:50 +0200
  Re: Buster => Bullseye: packages kept back Cindy Sue Causey <butterflybytes@gmail.com> - 2023-03-26 17:40 +0200
    Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-26 19:30 +0200
  Re: Buster => Bullseye: packages kept back David Wright <deblis@lionunicorn.co.uk> - 2023-03-26 20:20 +0200
    Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-27 00:30 +0200
  Re: Buster => Bullseye: packages kept back Jeffrey Walton <noloader@gmail.com> - 2023-03-26 23:20 +0200
    Re: Buster => Bullseye: packages kept back Jesper Dybdal <jd-debian-user@dybdal.dk> - 2023-03-27 00:30 +0200
      Re: Buster => Bullseye: packages kept back Vincent Lefevre <vincent@vinc17.net> - 2023-03-27 13:30 +0200
        Re: Buster => Bullseye: packages kept back Greg Wooledge <greg@wooledge.org> - 2023-03-27 13:50 +0200
          Re: Buster => Bullseye: packages kept back Vincent Lefevre <vincent@vinc17.net> - 2023-03-27 14:20 +0200
            Re: Buster => Bullseye: packages kept back Greg Wooledge <greg@wooledge.org> - 2023-03-27 14:30 +0200
          Re: Buster => Bullseye: packages kept back Dan Ritter <dsr@randomstring.org> - 2023-03-27 15:10 +0200
            Re: Buster => Bullseye: packages kept back Nicolas George <george@nsup.org> - 2023-03-27 15:20 +0200
              Re: Buster => Bullseye: packages kept back gene heskett <gheskett@shentel.net> - 2023-03-27 16:10 +0200
                Re: Buster => Bullseye: packages kept back <tomas@tuxteam.de> - 2023-03-27 17:40 +0200
                Re: Buster => Bullseye: packages kept back gene heskett <gheskett@shentel.net> - 2023-03-27 20:10 +0200
                Re: Buster => Bullseye: packages kept back <tomas@tuxteam.de> - 2023-03-28 07:10 +0200
                Re: Buster => Bullseye: packages kept back gene heskett <gheskett@shentel.net> - 2023-03-28 17:10 +0200
                alternative views of PNG (was Re: Buster => Bullseye: packages kept  back) davidson <davidson@freevolt.org> - 2023-03-28 13:00 +0200
                Re: alternative views of PNG (was Re: Buster => Bullseye: packages  keptback) gene heskett <gheskett@shentel.net> - 2023-03-28 17:40 +0200
                Re: alternative views of PNG (was Re: Buster => Bullseye: packages  keptback) gene heskett <gheskett@shentel.net> - 2023-03-28 18:50 +0200
                Re: alternative views of PNG (was Re: Buster => Bullseye: packages  keptback) <tomas@tuxteam.de> - 2023-03-28 20:00 +0200
                Re: alternative views of PNG (was Re: Buster => Bullseye: packages  keptback) <tomas@tuxteam.de> - 2023-03-28 20:00 +0200
                Re: alternative views of PNG (was Re: Buster => Bullseye: packages  keptback) davidson <davidson@freevolt.org> - 2023-03-29 09:30 +0200
              Re: Buster => Bullseye: packages kept back Vincent Lefevre <vincent@vinc17.net> - 2023-04-03 13:50 +0200
            Re: Buster => Bullseye: packages kept back Greg Wooledge <greg@wooledge.org> - 2023-03-27 16:10 +0200
              Re: Buster => Bullseye: packages kept back davidson <davidson@freevolt.org> - 2023-03-28 08:30 +0200
                apt colored output (was Re: Buster => Bullseye: packages kept  back) davidson <davidson@freevolt.org> - 2023-04-03 08:00 +0200
      Re: Buster => Bullseye: packages kept back Anssi Saari <as@sci.fi> - 2023-03-28 11:30 +0200

csiph-web