Skip to contentSkip to conversation

meta: stop using "virtual/" in RPROVIDES and RDEPENDS

PATCH In review Michael Opdenacker 4 participants 6 messages Sep 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta: stop using "virtual/" in RPROVIDES and RDEPENDS

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

---
 meta/recipes-bsp/grub/grub-bootconf_1.00.bb        | 2 +-
 meta/recipes-bsp/grub/grub-efi_2.06.bb             | 2 +-
 meta/recipes-core/systemd/systemd-boot_249.3.bb    | 2 +-
 meta/recipes-core/systemd/systemd-bootconf_1.00.bb | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-bsp/grub/grub-bootconf_1.00.bb +1 -1
index 151e601fd2..783e30bf38 100644
@@ -5,7 +5,7 @@ DESCRIPTION = "Grub might require different configuration file for \
 different machines."
 HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuration"
 
-RPROVIDES:${PN} += "virtual/grub-bootconf"
+RPROVIDES:${PN} += "virtual-grub-bootconf"
 
 inherit grub-efi-cfg
 
meta/recipes-bsp/grub/grub-efi_2.06.bb +1 -1
index 96e9df88b6..a8cc209a02 100644
@@ -5,7 +5,7 @@ require conf/image-uefi.conf
 GRUBPLATFORM = "efi"
 
 DEPENDS:append = " grub-native"
-RDEPENDS:${PN} = "grub-common virtual/grub-bootconf"
+RDEPENDS:${PN} = "grub-common virtual-grub-bootconf"
 
 SRC_URI += " \
            file://cfg \
meta/recipes-core/systemd/systemd-boot_249.3.bb +1 -1
index af2be162a3..b3d4e31e08 100644
@@ -46,7 +46,7 @@ python __anonymous () {
 
 FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
 
-RDEPENDS:${PN} += "virtual/systemd-bootconf"
+RDEPENDS:${PN} += "virtual-systemd-bootconf"
 
 # Imported from the old gummiboot recipe
 TUNE_CCARGS:remove = "-mfpmath=sse"
meta/recipes-core/systemd/systemd-bootconf_1.00.bb +1 -1
index 12c4447f37..19637546a9 100644
@@ -2,7 +2,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SUMMARY = "Basic systemd-boot configuration files"
 
-RPROVIDES:${PN} += "virtual/systemd-bootconf"
+RPROVIDES:${PN} += "virtual-systemd-bootconf"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit systemd-boot-cfg
Signature · 1 line
2.25.1
#1 lore raw
Quoted 10 lines · Michael Opdenacker

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

We have quite a few cases in meta-virtualization, where the same unclear syntax is used.

I can take care of updating it, if you aren't looking at it already.

Bruce

Quoted 67 lines
---
 meta/recipes-bsp/grub/grub-bootconf_1.00.bb        | 2 +-
 meta/recipes-bsp/grub/grub-efi_2.06.bb             | 2 +-
 meta/recipes-core/systemd/systemd-boot_249.3.bb    | 2 +-
 meta/recipes-core/systemd/systemd-bootconf_1.00.bb | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta/recipes-bsp/grub/grub-bootconf_1.00.bb +1 -1
index 151e601fd2..783e30bf38 100644
@@ -5,7 +5,7 @@ DESCRIPTION = "Grub might require different configuration file for \
 different machines."
 HOMEPAGE = "https://www.gnu.org/software/grub/manual/grub/grub.html#Configuration"
 
-RPROVIDES:${PN} += "virtual/grub-bootconf"
+RPROVIDES:${PN} += "virtual-grub-bootconf"
 
 inherit grub-efi-cfg
 
meta/recipes-bsp/grub/grub-efi_2.06.bb +1 -1
index 96e9df88b6..a8cc209a02 100644
@@ -5,7 +5,7 @@ require conf/image-uefi.conf
 GRUBPLATFORM = "efi"
 
 DEPENDS:append = " grub-native"
-RDEPENDS:${PN} = "grub-common virtual/grub-bootconf"
+RDEPENDS:${PN} = "grub-common virtual-grub-bootconf"
 
 SRC_URI += " \
            file://cfg \
meta/recipes-core/systemd/systemd-boot_249.3.bb +1 -1
index af2be162a3..b3d4e31e08 100644
@@ -46,7 +46,7 @@ python __anonymous () {
 
 FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
 
-RDEPENDS:${PN} += "virtual/systemd-bootconf"
+RDEPENDS:${PN} += "virtual-systemd-bootconf"
 
 # Imported from the old gummiboot recipe
 TUNE_CCARGS:remove = "-mfpmath=sse"
meta/recipes-core/systemd/systemd-bootconf_1.00.bb +1 -2
index 12c4447f37..19637546a9 100644
@@ -2,7 +2,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SUMMARY = "Basic systemd-boot configuration files"
 
-RPROVIDES:${PN} += "virtual/systemd-bootconf"
+RPROVIDES:${PN} += "virtual-systemd-bootconf"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit systemd-boot-cfg
--

2.25.1

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#2 lore raw
Quoted 23 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Bruce Ashfield
Sent: den 1 september 2021 15:24
To: Michael Opdenacker <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] meta: stop using "virtual/" in RPROVIDES and RDEPENDS

Quoted 10 lines · Michael Opdenacker

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

Quoted 6 lines

We have quite a few cases in meta-virtualization, where the same unclear syntax is used.

I can take care of updating it, if you aren't looking at it already.

Bruce

Can anyone enlighten me to what benefit changing "virtual/" to "virtual-" for runtime dependencies gives? AFAIU, this makes no technical difference and everything will still work exactly as before, but with a different provided name.

If you then have virtual/foo for build dependencies and virtual-foo for the corresponding runtime dependencies, then I only see increased confusion with a change like this.

And yes, I know about the problems with virtual runtime dependencies, but in my experience, as long as you do not try to create a global package repository with packages from multiple builds, but only use the packages created by bitbake to generate an image, they work as expected.

//Peter

#3 lore raw
Quoted 27 lines · Peter Kjellerstedt
Quoted 27 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Bruce Ashfield
Sent: den 1 september 2021 15:24
To: Michael Opdenacker <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] meta: stop using "virtual/" in RPROVIDES and RDEPENDS

Quoted 10 lines · Michael Opdenacker

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

We have quite a few cases in meta-virtualization, where the same unclear syntax is used.

Quoted 8 lines
Quoted 3 lines

I can take care of updating it, if you aren't looking at it already.

Bruce

Can anyone enlighten me to what benefit changing "virtual/" to "virtual-" for runtime dependencies gives? AFAIU, this makes no technical difference and everything will still work exactly as before, but with a different provided name.

Yup.

Quoted 4 lines

If you then have virtual/foo for build dependencies and virtual-foo for the corresponding runtime dependencies, then I only see increased confusion with a change like this.

I don't disagree :D

I wanted to take care of meta-virt for exactly that reason. I want to have a closer look at things, and decide what is the best path to take (from a consistency point of view, or leaving it .. if it isn't broken :)

Quoted 6 lines

And yes, I know about the problems with virtual runtime dependencies, but in my experience, as long as you do not try to create a global package repository with packages from multiple builds, but only use the packages created by bitbake to generate an image, they work as expected.

That has also been my experience. We've had our virtual/ providers for years in meta-virt, and haven't even run into an issue.

Bruce

Quoted 3 lines

//Peter

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
#4 lore raw
Quoted 53 lines · Bruce Ashfield
Quoted 27 lines · Peter Kjellerstedt
Quoted 27 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Bruce Ashfield
Sent: den 1 september 2021 15:24
To: Michael Opdenacker <[email protected]>
Cc: Patches and discussions about the oe-core layer <openembedded- [email protected]>
Subject: Re: [OE-core] [PATCH] meta: stop using "virtual/" in RPROVIDES and RDEPENDS

Quoted 10 lines · Michael Opdenacker

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

We have quite a few cases in meta-virtualization, where the same unclear syntax is used.

Quoted 8 lines
Quoted 3 lines

I can take care of updating it, if you aren't looking at it already.

Bruce

Can anyone enlighten me to what benefit changing "virtual/" to "virtual-" for runtime dependencies gives? AFAIU, this makes no technical difference and everything will still work exactly as before, but with a different provided name.

Yup.

Quoted 4 lines

If you then have virtual/foo for build dependencies and virtual-foo for the corresponding runtime dependencies, then I only see increased confusion with a change like this.

I don't disagree :D

I wanted to take care of meta-virt for exactly that reason. I want to have a closer look at things, and decide what is the best path to take (from a consistency point of view, or leaving it .. if it isn't broken :)

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

And yes, I know about the problems with virtual runtime dependencies, but in my experience, as long as you do not try to create a global package repository with packages from multiple builds, but only use the packages created by bitbake to generate an image, they work as expected.

That has also been my experience. We've had our virtual/ providers for years in meta-virt, and haven't even run into an issue.

Have a look at the discussion on the docs list where people are getting really confused about whether virtual/ is allowed in the runtime space or not.

I maintain that it is not and never has been supported. I'd like to be able to continue to say that the "virtual/" namespace is DEPENDS/PROVIDES only. I therefore suggested the small number of problem entries that sneaked into OE- Core get fixed. I'd actually got further and suggest we add a QA check that errors if it sees these in RDEPENDS/PRORIVDES.

The change is focused on us being able to clearly say "don't do it, it isn't expected to work like virtual/". The alternative is just more confusion and docs which can't be as clear.

Cheers,

Richard

#5 lore raw
In reply to Bruce Ashfield

Hi Bruce

Quoted 9 lines · Bruce Ashfield
Quoted 7 lines · Michael Opdenacker

Fixes [YOCTO #14538]

Recipes shouldn't use the "virtual/" string in RPROVIDES and RDEPENDS.

That's confusing because "virtual/" has no special meaning in RPROVIDES and RDEPENDS (unlike in PROVIDES and DEPENDS).

Quoted 6 lines
Quoted 2 lines

Instead, using "virtual-" instead of "virtual/"
as already done in the glibc recipe.

We have quite a few cases in meta-virtualization, where the same unclear syntax is used.

I can take care of updating it, if you aren't looking at it already.

That would be great if you take care of it. I just covered oe-core and meta-oe so far.

Thanks!
Michael.

Signature · 3 lines
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com