[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT, deeply] Guix



didier gaumet [2021-11-07 03:16:12] wrote:
> Le mardi 26 octobre 2021 à 09:25 -0400, Stefan Monnier a écrit :
> [...]
>> Think of it this way: currently, you can more or less figure out
>> which
>> packages you decided to install on your machine by going through the
>> list
>> of installed packages and filtering out all those that are marked as
>> "automatically" installed.
>> 
>> But you can only manipulate this list indirectly, via `apt install`
>> and
>> `apt remove`.
>
> to have the list of all automatically installed packages:
> # apt-mark showauto
>
> to have the list of all manually installed packages:
> # apt-mark showmanual
>
> to verify if the package PACKAGE have been automatically installed
> # apt-mark showauto $PACKAGE
>
> to verify if the package PACKAGE have been manually installed
> # apt-mark showmanual $PACKAGE

I'm not sure exactly what you mean to say with the above.
Of course, we can extract some kind of description of the current state
with APT commands, but it's quite different from having it inside a text
file that you edit.

The differences include:

- The list is "in your face".  When I look at `apt-mark showmanual`, for
  about half of the packages I vaguely remember explicitly installing
  them at some point but don't need them any more, others I'm pretty sure
  I never (consciously) installed manually.

- The list file naturally lends itself to extensions:
  - It could contain comments, so you could easily remove a package but
    keeping a note about it so it's easy to re-add.
  - It could contain conditional elements, so the same file could be
    used on different machines that need slightly different
    packages installed.
  - It could contain additional information per package, such as whether
    to install the recommended dependencies, some config information so you
    don't get queried during install, some file renamings, a list of
    "overrides" (to ignore a specific dependency and/or allow installing
    officially mutually-exclusive packages), ...

It fundamentally changes the way you think about it, I think.

>> In contrast, with NixOS/Guix that list is available in a plain text
>> editable file. 
> in Debian there is /var/lib/apt/extended_states

Not a fun read, tho.  AFAICT it's just a verbose way to keep the set of
not-manually-installed packages, so it includes all the info I want to
be implicit ;-)

Also, regarding "editable", I suspect that if you edit this file by hand
and introduce an error in there you're probably not going to get much
support ;-)

> Perhaps (not sure) comparing on each machine the results of 
> # apt-cache unmet
> could give you valuable info

Thanks, I didn't know about this one.


        Stefan


Reply to: