sonic-buildimage/files
Lorne Long 3402094fd0 [Build] Use apt-get to predictably support dependency ordered configuration of lazy packages (#12164)
Why I did it
The current lazy installer relies on a filename sort for both unpack and configuration steps. When systemd services are configured [started] by multiple packages the order is by filename not by the declared package dependencies. This can cause the start order of services to differ between first-boot and subsequent boots. Declared systemd service dependencies further exacerbate the issue (e.g. blocking the first-boot script).

The current installer leaves packages un-configured if the package dependency order does not match the filename order.

This also fixes a trivial bug in [Build]: Support to use symbol links for lazy installation targets to reduce the image size #10923 where externally downloaded dependencies are duplicated across lazy package device directories.

How I did it
Changed the staging and first-boot scripts to use apt-get:

dpkg -i /host/image-$SONIC_VERSION/platform/$platform/*.deb

becomes

apt-get -y install /host/image-$SONIC_VERSION/platform/$platform/*.deb

when dependencies are detected during image staging.

How to verify it
Apt-get critical rules

Add a Depends= to the control information of a package. Grep the syslog for rc.local between images and observe the configuration order of packages change.
2022-11-23 10:41:28 +00:00
..
Aboot [Build]: Support to use symbol links for lazy installation targets to reduce the image size (#10923) 2022-07-05 20:57:49 +00:00
apt Add mirrors for reproducible build (#6813) 2021-02-19 11:51:34 -08:00
build/versions [ci/build]: Upgrade SONiC package versions (#12756) 2022-11-20 19:00:06 +08:00
build_scripts [hostcfgd]: Add Ability To Configure Feature During Run-time (#6700) 2021-03-15 19:09:31 -07:00
build_templates [Build] Use apt-get to predictably support dependency ordered configuration of lazy packages (#12164) 2022-11-23 10:41:28 +00:00
dhcp ZTP infrastructure changes to support DHCP discovery provisioning data (#3298) 2019-12-10 08:16:56 -08:00
docker Enabling ipv6 support on docker container network. This is needed (#5418) 2020-09-22 08:32:17 -07:00
image_config [Build] Use apt-get to predictably support dependency ordered configuration of lazy packages (#12164) 2022-11-23 10:41:28 +00:00
initramfs-tools [Arista] Fix arista-net initramfs hook (#10626) 2022-04-20 10:03:37 -07:00
scripts [arp_update]: Fix hardcoded vlan (#12566) 2022-11-11 18:01:15 +00:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) (#11140) 2022-06-16 11:47:04 -07:00