On 07/19/2018 10:13 AM, David Wright wrote:
On Thu 19 Jul 2018 at 06:38:08 (-0500), Richard Owlett wrote:
On 07/18/2018 09:06 AM, Michael Stone wrote:
On Wed, Jul 18, 2018 at 08:44:13AM -0500, Richard Owlett wrote:
First I'm looking comparison of required, important, standard,
optional, and extra as package labels [particularly interested
in corner cases]. I've been looking at
[https://www.debian.org/doc/debian-policy/]. I'm not grasping
something. Not sure what ;/

Well, it's hard to answer questions when you don't ask a question.
For the most part the priorities don't matter much, and are
largely a historical curiosity. Extra is gone, standard and
important don't mean much. So most packages are optional, and a
few that should be really hard to remove are required. Being
required has the possible advantage that other packages don't need
to explicitly list dependencies on the required package (but in
practice you usually end up with a versioned libc6 dependency
anyway). It does save a bit on the overhead of every single
package having dependencies on /bin/sh and coreutils that the
dependency resolver would then have to consider.


I was, I thought, asking for explicit distinctions between adjacent
priorities. Your reply was that the distinctions were no longer
germane. That, effectively there are now only two, required and
optional.

That changes the landscape surrounding a personal project. Which
some might describe as an extremely minimalist Debian. I would
rather describe it as a "proper subset" of Debian for a particular
use. That is why, in another thread, I ask about "Debian from
Scratch".

That leads to asking two related questions:
  1. How can I get a list of packages tagged as required?
  2. What section of the installer installs packages tagged as required?
     I assume the answer will, in part, be a referral to some developer
     oriented documentation. [My motivation is personal education rather
     that creating the next "killer app].

I will then investigate which of my optional packages already have
an explicit dependence on a "required" app. That will allow me to
enumerate which "required" packages *may* actually be unnecessary.

While there are commands like   aptitude search   and   aptitude why
available for such purposes, these are really designed for routine
maintenance. For your purposes, I think you need to develop a more
intimate relationship with the files in /var/lib/apt/lists/,
particularly

ftp.us.debian.org_debian_dists_stretch_main_binary-amd64_Packages

I suspect a typo. Clicked on it and got "Address Not Found".
Will search later.

(which may be named differently on your system). There's a similar
file /var/lib/dpkg/status which contains a subset of this information
for any packages with status on your system (usually "installed").

I did a quick browse of /var/lib/apt/ and /var/lib/dpkg/ directories.
I suspect there are answers there to questions I haven't thought of ;/


You can make many investigations (en masse) using OR'd grep
expressions on these files, but for more in-depth investigations,
it's worth parsing it into, say, a python dictionary of fields
containing lists of items in each field.

I had been thinking of something similar in Tcl/Tk (which I'm learning) rather than python (which I've not had cause to investigate).


So, for example, I have a program which, for each package, gives
a list of packages that Depends (± Recommends ± Suggests) on it.
By filtering input to that program by the Priority of packages,
and by Recommends/Suggests/¬Depends, it's trivial to answer your
question about which packages are not required on your system,
either through "Priority: required" or a Depends. Working on the raw
data yourself might make it easier to study your corner cases that
using the potted tools that most people suggest. >
Cheers,
David.

Thank you.




Reply via email to