On 10/04/25 21:45, João Pedro Malhado wrote:
Hello Amos,

On Thu, Apr 10, 2025 at 01:05:06AM +1200, Amos Jeffries wrote:

On Tue, Apr 08, 2025 at 09:11:54PM +0200, João Pedro Malhado wrote:
The patch instals packages with priority important after those with priority
required, and before everything else. This seems a bit arbitrary, but I suppose
there is no way to tell dpkg (or apt?) a good order to install packages.

AFAICT, instead of adding a separate lookup for the important packages, just
changing the regex used to find required ones should be okay:

Change this line:

   dpkg-deb --field $i Priority | grep ^required > /dev/null \

To this:

   dpkg-deb --field $i Priority | grep "^(required|important)" > /dev/null \


One may do that, but in that case you would be installing required and important
packages together, not required packages before important packages. I don't know
if it makes a difference. Did it work for you?

I have not run crosshurd with any patching. Last time I tried it created a broken hurd64 chroot that would not even run.


My suggestion was based on the observation that;
a) the loop being added for important packages is consecutive with the one for required packages, and b) the only action those loops perform is to "--unpack" the identified packages (and presumably their dependencies).

Thus it seems to me that they can be merged without changing the result of what the patch is doing.


How does the debian installer decide/control the order of package installation
during base-system install?

debian-installer package behaviour is unknown to me.

From other experience I do know that dpkg simply installs the packages passed to it on command line, in the order given. If there is an error it aborts.

apt (and similar admin/user tools) is the part where all the fancy ordering logic takes place for routine installation and upgrade of Debian. Such tools determine what CLI to pass to dpkg.


HTH
Amos

Reply via email to