Skip to contentSkip to conversation

variables.rst: expand explanation of RSUGGESTS

PATCH Superseded Robert P. J. Day 3 participants 7 messages Feb 24

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 variables.rst: expand explanation of RSUGGESTS

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

(quoted diff) +0 -0

b/documentation/ref-manual/variables.rst
index 208b5e43d..92476d509 100644

documentation/ref-manual/variables.rst +3 -1
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and contents.
    :term:`RSUGGESTS`
       A list of additional packages that you can suggest for installation
       by the package manager at the time a package is installed. Not all
-      package managers support this functionality.
+      package managers support this functionality. This feature takes effect
+      only when the package manager is being used to install packages on
+      the target system from a package feed.
 
       As with all package-controlling variables, you must always use this
       variable in conjunction with a package name override. Here is an
#1 lore raw

Hi,

Quoted 15 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 8366

Quoted 7 lines
documentation/ref-manual/variables.rst +3 -1
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and contents.
    :term:`RSUGGESTS`
       A list of additional packages that you can suggest for installation
       by the package manager at the time a package is installed. Not all
-      package managers support this functionality.
+      package managers support this functionality. This feature takes effect
+      only when the package manager is being used to install packages on
+      the target system from a package feed.

Could you add a link to the section explaining how to enable this?

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

Thanks for the patch,
Antonin

#2 lore raw
Quoted 28 lines · Antonin Godard via lists.yoctoproject.org

Hi,

Quoted 15 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 8366

Quoted 7 lines
documentation/ref-manual/variables.rst +3 -1
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and contents.
    :term:`RSUGGESTS`
       A list of additional packages that you can suggest for installation
       by the package manager at the time a package is installed. Not all
-      package managers support this functionality.
+      package managers support this functionality. This feature takes effect
+      only when the package manager is being used to install packages on
+      the target system from a package feed.

Could you add a link to the section explaining how to enable this?

Quoted 5 lines

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

oh, man, did this just open up a can of worms. if you check that
section:

https://docs.yoctoproject.org/dev-manual/packages.html#using-runtime-package-management

it has no reference to RSUGGESTS, so sending readers there might be less than useful. so should some explanation of RSUGGESTS be added there to provide context?

and when i scroll to the top of that chapter:

https://docs.yoctoproject.org/dev-manual/packages.html#

the first section, "Excluding Package from an Image", mentions PACKAGE_EXCLUDE, but does not mention using IMAGE_INSTALL:remove, which is definitely used in places i've run across. should that also be mentioned as a way to exclude packages?

and if so, then that operation should also be mentioned in the
explanation for IMAGE_INSTALL:

https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_INSTALL

thoughts?

rday

#3 lore raw

Hi Robert,

Quoted 45 lines · Robert P. J. Day via lists.yoctoproject.org
Quoted 28 lines · Antonin Godard via lists.yoctoproject.org

Hi,

Quoted 15 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 8366

Quoted 7 lines
documentation/ref-manual/variables.rst +3 -1
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and contents.
     :term:`RSUGGESTS`
        A list of additional packages that you can suggest for installation
        by the package manager at the time a package is installed. Not all
-      package managers support this functionality.
+      package managers support this functionality. This feature takes effect
+      only when the package manager is being used to install packages on
+      the target system from a package feed.

Could you add a link to the section explaining how to enable this?

Quoted 5 lines

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

oh, man, did this just open up a can of worms. if you check that
section:

https://docs.yoctoproject.org/dev-manual/packages.html#using-runtime-package-management

it has no reference to RSUGGESTS, so sending readers there might be less than useful. so should some explanation of RSUGGESTS be added there to provide context?

Quoted 6 lines

and when i scroll to the top of that chapter:

https://docs.yoctoproject.org/dev-manual/packages.html#

the first section, "Excluding Package from an Image", mentions PACKAGE_EXCLUDE, but does not mention using IMAGE_INSTALL:remove,

IMAGE_INSTALL:remove is *almost* always wrong.

This only has an impact if the package is explicitly listed in IMAGE_INSTALL variable. If that is the case, then instead of using :remove, simply do not add it to IMAGE_INSTALL in the first place. If it's not in IMAGE_INSTALL, using :remove will be a no-op.

If the package is brought in as a dependency, you need to remove whatever package you explicitly list in IMAGE_INSTALL that is bringing this package as a dependency, which may not be possible without rebuilding the recipe with different PACKAGECONFIG for example.

If it's brought in as a light dependency (read RRECOMMENDS), then BAD_RECOMMENDATIONS or NO_RECOMMENDATIONS should do the trick.

PACKAGE_EXCLUDE will prevent building and then you can easily figure out which packages that are to be installed in your image depend on the package you want to exclude from your image. This is a good starting point to start debugging.

Quoted 3 lines

which is definitely used in places i've run across. should that also be mentioned as a way to exclude packages?

Hard no from me. See above why I think it is a bad idea to tell people to do that. Maybe we should actually explain why this is a bad idea as I see this being repeated here and there.

Cheers,
Quentin

#4 lore raw
Quoted 80 lines · Quentin Schulz

Hi Robert,

Quoted 51 lines · Robert P. J. Day via lists.yoctoproject.org
Quoted 33 lines · Antonin Godard via lists.yoctoproject.org

Hi,

Quoted 23 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and

contents.
:term:RSUGGESTS
A list of additional packages that you can suggest for
installation
by the package manager at the time a package is installed. Not
all

documentation/ref-manual/variables.rst +1 -1
-      package managers support this functionality.
+      package managers support this functionality. This feature takes
Quoted 4 lines

effect
+ only when the package manager is being used to install packages
on
+ the target system from a package feed.

Could you add a link to the section explaining how to enable this?

Quoted 6 lines

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of
the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

oh, man, did this just open up a can of worms. if you check that
section:

https://docs.yoctoproject.org/dev-manual/packages.html#using-runtime-package-management

it has no reference to RSUGGESTS, so sending readers there might be less than useful. so should some explanation of RSUGGESTS be added there to provide context?

Quoted 6 lines

and when i scroll to the top of that chapter:

https://docs.yoctoproject.org/dev-manual/packages.html#

the first section, "Excluding Package from an Image", mentions PACKAGE_EXCLUDE, but does not mention using IMAGE_INSTALL:remove,

IMAGE_INSTALL:remove is *almost* always wrong.

This only has an impact if the package is explicitly listed in IMAGE_INSTALL variable. If that is the case, then instead of using :remove, simply do not add it to IMAGE_INSTALL in the first place. If it's not in IMAGE_INSTALL, using :remove will be a no-op.

If the package is brought in as a dependency, you need to remove whatever package you explicitly list in IMAGE_INSTALL that is bringing this package as a dependency, which may not be possible without rebuilding the recipe with different PACKAGECONFIG for example.

If it's brought in as a light dependency (read RRECOMMENDS), then BAD_RECOMMENDATIONS or NO_RECOMMENDATIONS should do the trick.

PACKAGE_EXCLUDE will prevent building and then you can easily figure out which packages that are to be installed in your image depend on the package you want to exclude from your image. This is a good starting point to start debugging.

Quoted 7 lines
Quoted 3 lines

which is definitely used in places i've run across. should that also be mentioned as a way to exclude packages?

Hard no from me. See above why I think it is a bad idea to tell people to do that. Maybe we should actually explain why this is a bad idea as I see this being repeated here and there.

so would it be sufficient to simply add a note here:

https://docs.yoctoproject.org/dev-manual/packages.html#excluding-packages-from-an-image

stating that, while "IMAGE_INSTALL:remove" is occasionally seen as a way to omit a package from installation, this is almost always a bad idea and that "PACKAGE_EXCLUDE" is the proper way?

that at least would warn developers off.

rdayt

#5 lore raw

Hi Robert,

Quoted 92 lines · Robert P. J. Day
Quoted 80 lines · Quentin Schulz

Hi Robert,

Quoted 51 lines · Robert P. J. Day via lists.yoctoproject.org
Quoted 33 lines · Antonin Godard via lists.yoctoproject.org

Hi,

Quoted 23 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and

contents.
:term:RSUGGESTS
A list of additional packages that you can suggest for
installation
by the package manager at the time a package is installed. Not
all

documentation/ref-manual/variables.rst +1 -1
-      package managers support this functionality.
+      package managers support this functionality. This feature takes
Quoted 4 lines

effect
+ only when the package manager is being used to install packages
on
+ the target system from a package feed.

Could you add a link to the section explaining how to enable this?

Quoted 6 lines

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of
the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

oh, man, did this just open up a can of worms. if you check that
section:

https://docs.yoctoproject.org/dev-manual/packages.html#using-runtime-package-management

it has no reference to RSUGGESTS, so sending readers there might be less than useful. so should some explanation of RSUGGESTS be added there to provide context?

Quoted 6 lines

and when i scroll to the top of that chapter:

https://docs.yoctoproject.org/dev-manual/packages.html#

the first section, "Excluding Package from an Image", mentions PACKAGE_EXCLUDE, but does not mention using IMAGE_INSTALL:remove,

IMAGE_INSTALL:remove is *almost* always wrong.

This only has an impact if the package is explicitly listed in IMAGE_INSTALL variable. If that is the case, then instead of using :remove, simply do not add it to IMAGE_INSTALL in the first place. If it's not in IMAGE_INSTALL, using :remove will be a no-op.

If the package is brought in as a dependency, you need to remove whatever package you explicitly list in IMAGE_INSTALL that is bringing this package as a dependency, which may not be possible without rebuilding the recipe with different PACKAGECONFIG for example.

If it's brought in as a light dependency (read RRECOMMENDS), then BAD_RECOMMENDATIONS or NO_RECOMMENDATIONS should do the trick.

PACKAGE_EXCLUDE will prevent building and then you can easily figure out which packages that are to be installed in your image depend on the package you want to exclude from your image. This is a good starting point to start debugging.

Quoted 7 lines
Quoted 3 lines

which is definitely used in places i've run across. should that also be mentioned as a way to exclude packages?

Hard no from me. See above why I think it is a bad idea to tell people to do that. Maybe we should actually explain why this is a bad idea as I see this being repeated here and there.

so would it be sufficient to simply add a note here:

Quoted 8 lines

https://docs.yoctoproject.org/dev-manual/packages.html#excluding-packages-from-an-image

stating that, while "IMAGE_INSTALL:remove" is occasionally seen as a way to omit a package from installation, this is almost always a bad idea and that "PACKAGE_EXCLUDE" is the proper way?

that at least would warn developers off.

A bit more info than that (see my initial mail), but I think it makes sense indeed.

Quentin

#6 lore raw
In reply to Robert P. J. Day

Hi,

Quoted 36 lines · Robert P. J. Day
Quoted 28 lines · Antonin Godard via lists.yoctoproject.org

Hi,

Quoted 15 lines · Robert P. J. Day

Add that the RSUGGESTS variable would be processed only by a supporting package manager when installing packages from a package feed.

---

documentation/ref-manual/variables.rst +0 -0
index 208b5e43d..92476d509 100644

documentation/ref-manual/variables.rst system and gives an overview of their function and contents. · line 8366

Quoted 7 lines
documentation/ref-manual/variables.rst +3 -1
@@ -8361,7 +8361,9 @@ system and gives an overview of their function and contents.
    :term:`RSUGGESTS`
       A list of additional packages that you can suggest for installation
       by the package manager at the time a package is installed. Not all
-      package managers support this functionality.
+      package managers support this functionality. This feature takes effect
+      only when the package manager is being used to install packages on
+      the target system from a package feed.

Could you add a link to the section explaining how to enable this?

Quoted 5 lines

"""
See the :ref:dev-manual/packages:Using Runtime Package Management section of the Yocto Project Development Tasks Manual for more information on the package management feature.
"""

Quoted 8 lines

oh, man, did this just open up a can of worms. if you check that
section:

https://docs.yoctoproject.org/dev-manual/packages.html#using-runtime-package-management

it has no reference to RSUGGESTS, so sending readers there might be less than useful. so should some explanation of RSUGGESTS be added there to provide context?

Let's create a link in the variable definition as a first step, then you can follow-up with a patch that improves this section, including the mention of RSUGGESTS.

Quoted 8 lines

and when i scroll to the top of that chapter:

https://docs.yoctoproject.org/dev-manual/packages.html#

the first section, "Excluding Package from an Image", mentions PACKAGE_EXCLUDE, but does not mention using IMAGE_INSTALL:remove, which is definitely used in places i've run across. should that also be mentioned as a way to exclude packages?

IIRC, IMAGE_INSTALL acts on the list of packages fed to the package manager, while PACKAGE_EXCLUDE will act on package manager specific options to exclude a certain package from the image, *even if this package is not explicitly listed in IMAGE_INSTALL*. I believe this is the crucial point.

However, this section should probably start by saying something like:

"""
If the IMAGE_INSTALL variable does not contain a package that you want to exclude from your image, you can use one of the variables below to exclude it from the image: ...
"""

Quoted 4 lines

and if so, then that operation should also be mentioned in the
explanation for IMAGE_INSTALL:

https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_INSTALL

As explained, those act on slightly different places, so not sure I would mix them up, but if you think it can fit, please propose a patch, I'd be happy to review it.

Thanks,
Antonin