[pacman-dev] [PATCH] Put not explicitly installed packages in grey during update/install/removall

Jason St. John jstjohn at purdue.edu
Tue Feb 4 19:34:44 EST 2014

On Mon, Feb 3, 2014 at 12:45 AM, Allan McRae <allan at archlinux.org> wrote:
> On 03/02/14 15:34, Jason St. John wrote:
>> On Sun, Feb 2, 2014 at 8:45 AM, Guillaume Bouchard
>> <guillaume.bouchard at liris.cnrs.fr> wrote:
>>>> That colour cases the dependencies to stand out more on a terminal with
>>>> a white background.  I'd say bold would be better...
>>> ;) I agree on that part. I guess the best idea must be to create a
>>> color class for depend and for explicit so that changing it latter may
>>> be easier.
>>>> However, the colour coding really is unclear.  How do people come into
>>>> the knowledge of what it means?  For example, during an update I might
>>>> think that a new package being pulled in as a dependency so it is
>>>> highlighted.   Or is it entirely obvious and I am thinking too hard?
>> I agree that this would not be obvious to users.
>>> You are right. Perhaps a caption, like:
>>> ---------------------------------------------------------------------------
>>> $ sudo pacman -Su
>>> :: Starting full system upgrade...
>>> resolving dependencies...
>>> looking for inter-conflicts...
>>> Packages (21): **(Explict packages appears in bold)**
>>> Name                              Old Version     New Version      Net
>>> Change  Download Size
>>> ...
>>> Total Download Size:    154.72 MiB
>>> Total Installed Size:   491.30 MiB
>>> Net Upgrade Size:       -1.28 MiB
>>> :: Proceed with installation? [Y/n]
>>> -----------------------------------------------------------------------------------------
>>> ?
>>> (I had never though a *so simple* hack would generate so much discussion ;)
>>> --
>>> Guillaume
>> I don't like the idea of a caption that says something like
>> "explicitly installed packages appear in bold".
>> An extra column would be better than a caption, but I don't know how
>> everyone feels about that...
>> I see three ways of doing this with a column:
>> 1.) have a column title of "Explicitly Installed?" with a "yes" or
>> "no" label for each package, optionally coloring the "yes" or "no"
>> text for easy reading
>> 2.) like the first way, but put an asterisk if the package is
>> explicitly installed and leave it blank if the package is a dependency
>> 3.) have a column title of "Installed..." with labels of "explicitly"
>> or "as a dependency"
>> Of those three, I think I prefer the second method.
> I'm not sure there is enough room for another column - especially not
> with a title that long.
> Allan

Currently, the width of the verbose package list is 66 columns
(checked with an update of "extra/firefox" and "community/lz4"). Each
column uses two space characters between titles. If we, instead, make
the title be "Dependency?" and we reverse the use of asterisks, the
new width would be 79 columns (66 + 2 + 11). If we're targeting a max
width of 80 columns, this would be just under the limit. For packages
with long names and/or are in a repository with a long name (e.g.
community), it would hit the max width pretty easily.

If this increase in width is too close to the maximum desired width,
we will have to scrap the idea of using an additional column, and
we'll have to think of another way to display this information.


More information about the pacman-dev mailing list