sonic-buildimage/files
Lorne Long 5a4efe211c [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-28 18:48:36 +00:00
..
Aboot [202205][Arista] Fix cmdline generation during warm-reboot from 201811/201911 (#12371) 2022-10-27 10:14:26 -07:00
apt [Build]: Fix armhf mirrors not existing issue (#10312) 2022-03-22 15:24:15 +08:00
build/versions [ci/build]: Upgrade SONiC package versions (#12830) 2022-11-25 21:59:36 +08:00
build_scripts [hostcfgd]: Add Ability To Configure Feature During Run-time (#6700) 2021-03-13 05:56:27 -08:00
build_templates [Build] Use apt-get to predictably support dependency ordered configuration of lazy packages (#12164) 2022-11-28 18:48:36 +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-28 18:48:36 +00:00
initramfs-tools [202205][Arista] Add initial support for 720DT-48S (#10656) (#11860) 2022-08-30 12:39:26 +08:00
scripts [chassis-packet] fix the issue of internal ip arp not getting resolved. (#12127) 2022-11-28 18:48:36 +00:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) 2022-04-25 10:38:52 -07:00