Skip to content

Commit

Permalink
Install pygobject from Debian repos (#18546)
Browse files Browse the repository at this point in the history
* 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 <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 authored Apr 4, 2024
1 parent d2d93e5 commit 725f62a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-mark manu
# Install systemd-python for SONiC host services
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install systemd-python

if [[ $CONFIGURED_ARCH == armhf ]]; then
# Install pygobject from apt repos, since it has armhf prebuilt. The version in Debian is
# a bit older than what is in pip.
#
# When doing the next Debian upgrade (to Trixie), consider installing this package for all
# architectures instead of just armhf.
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install python3-gi
fi

# Install SONiC host services package
SONIC_HOST_SERVICES_PY3_WHEEL_NAME=$(basename {{sonic_host_services_py3_wheel_path}})
sudo cp {{sonic_host_services_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_HOST_SERVICES_PY3_WHEEL_NAME
Expand Down

0 comments on commit 725f62a

Please sign in to comment.