Skip to content

Commit 725f62a

Browse files
authored
Install pygobject from Debian repos (#18546)
* Install pygobject from Debian repos sonic-host-services needs pygobject installed, which is fine for amd64 and arm64, but for armhf, there's no precompiled wheel and requires compilation. To get around that, just install the version from Debian. * Reduce scope of python3-gi installation to armhf only Signed-off-by: Saikrishna Arcot <[email protected]>
1 parent d2d93e5 commit 725f62a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

files/build_templates/sonic_debian_extension.j2

+9
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark manu
242242
# Install systemd-python for SONiC host services
243243
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install systemd-python
244244

245+
if [[ $CONFIGURED_ARCH == armhf ]]; then
246+
# Install pygobject from apt repos, since it has armhf prebuilt. The version in Debian is
247+
# a bit older than what is in pip.
248+
#
249+
# When doing the next Debian upgrade (to Trixie), consider installing this package for all
250+
# architectures instead of just armhf.
251+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-gi
252+
fi
253+
245254
# Install SONiC host services package
246255
SONIC_HOST_SERVICES_PY3_WHEEL_NAME=$(basename {{sonic_host_services_py3_wheel_path}})
247256
sudo cp {{sonic_host_services_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_HOST_SERVICES_PY3_WHEEL_NAME

0 commit comments

Comments
 (0)