Re: [docs] [yocto-docs PATCH 1/5] Gather dependencies in poky.yaml.in

Antonin Godard
2024-11-29T14:06:25Z

Hi Quentin,

On Mon Nov 25, 2024 at 6:55 PM CET, Quentin Schulz wrote:
[...]
>> diff --git a/documentation/ref-manual/system-requirements.rst b/documentation/ref-manual/system-requirements.rst
>> index b33518c7f1e0c76caa70a719e023b9c405b744e2..ca75f849d0ad10344900c7525f7163726ffe5400 100644
>> --- a/documentation/ref-manual/system-requirements.rst
>> +++ b/documentation/ref-manual/system-requirements.rst
>> @@ -150,7 +150,7 @@ Ubuntu and Debian
>> Here are the packages needed to build an image on a headless system
>> with a supported Ubuntu or Debian Linux distribution::
>>
>> - $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
>> + $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_ESSENTIAL;
>>
>> You also need to ensure you have the locale ``en_US.UTF-8`` enabled::
>>
>> @@ -172,8 +172,7 @@ If this is not the case, you can reconfigure the ``locales`` package to add it::
>>
>> Here are the packages needed to build Project documentation manuals::
>>
>> - $ sudo apt install git make inkscape texlive-latex-extra
>> - $ sudo apt install sphinx python3-saneyaml python3-sphinx-rtd-theme
>> + $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC;
>
> Aren't we missing the PIP3_HOST_PACKAGES_DOC here?
>
> Also FYI, using pip on the system level is a very bad practice (as a
> matter of fact, it's not even allowed on Debian Bookworm anymore). We
> should probably rather document how to do this in virtual environments
> for example? One thing after the other though, we can start by just
> migrating the docs variable for now :)

Yeah, I am aware it's terrible practice and we shouldn't do that. I'd also
recommend using virtualenvs. I'll take a note of this, and try to send a patch
soon! :)

>>
>> Fedora Packages
>> ---------------
>> @@ -185,8 +184,8 @@ with a supported Fedora Linux distribution::
>>
>> Here are the packages needed to build Project documentation manuals::
>>
>> - $ sudo dnf install git make python3-pip which inkscape texlive-fncychap
>> - &PIP3_HOST_PACKAGES_DOC;
>> + $ sudo dnf install &FEDORA_HOST_PACKAGES_DOC;
>> + $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
>>
>> openSUSE Packages
>> -----------------
>> @@ -195,11 +194,12 @@ Here are the packages needed to build an image on a headless system
>> with a supported openSUSE distribution::
>>
>> $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
>> + $ sudo pip3 install &OPENSUSE_PIP3_HOST_PACKAGES_ESSENTIAL;
>>
>> Here are the packages needed to build Project documentation manuals::
>>
>> - $ sudo zypper install git make python3-pip which inkscape texlive-fncychap
>> - &PIP3_HOST_PACKAGES_DOC;
>> + $ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC;
>> + $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
>>
>>
>> AlmaLinux Packages
>> @@ -208,7 +208,7 @@ AlmaLinux Packages
>> Here are the packages needed to build an image on a headless system
>> with a supported AlmaLinux distribution::
>>
>> - $ sudo dnf install &ALMALINUX_HOST_PACKAGES_ESSENTIAL;
>> +&ALMALINUX_HOST_PACKAGES_ESSENTIAL_CMDS;
>
> It's a bit odd to have a different way to add the packages to install
> depending on the distro, couldn't we have all distros have no
> indentation, or all have some indentation?

That's the only exception, because Alma Linux has several installation steps.
I'd rather keep only the dependency lists in poky.yaml.in, so I'll add the
commands back here, and use ALMALINUX_HOST_PACKAGES_ESSENTIAL in the rst doc
instead (just like what's done for the other distros).

Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering