Skip to contentSkip to conversation

Regarding poppler auto PACKAGECONFIG when qt5-layer exists

DISCUSSION Matthew 2 participants 4 messages Apr 1, 2020 – Apr 2, 2020 5 messages not in the archive

lore
Share & tools
lore

Matthew

author
#1 lore raw
In reply to a message not in the archive

Hello,

In meta-oe/recipes-support/poppler/poppler_0.85.0.bb line 17, there is the line

    PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"

Let's say I add meta-qt5 to bblayers.conf, but I don't plan to use it immediately in a build. Therefore I haven't make any additional change to local.conf.

However I will be receiving the following error when starting a build:

WARNING: qtbase is not whitelisted, figuring out PNWHITELIST...
ERROR: Nothing PROVIDES 'qtbase' (but .../meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.85.0.bb DEPENDS on or otherwise requires it)

because PACKAGECONFIG is changed so it assumes I'll be using qt5. Is this reasonable?

--
Mingde (Matthew) Zeng

#2 lore raw
Quoted 7 lines · Matthew

Hello,

In meta-oe/recipes-support/poppler/poppler_0.85.0.bb line 17, there is the line

     PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
Quoted 9 lines

Let's say I add meta-qt5 to bblayers.conf, but I don't plan to use it immediately in a build. Therefore I haven't make any additional change to local.conf.

However I will be receiving the following error when starting a build:

WARNING: qtbase is not whitelisted, figuring out PNWHITELIST...
ERROR: Nothing PROVIDES 'qtbase' (but .../meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.85.0.bb DEPENDS on or otherwise requires it)

because PACKAGECONFIG is changed so it assumes I'll be using qt5. Is this reasonable?

Yeah I think here the choice is dynamic, what happens if you add a bbappend where you do PACKAGECONFIG_remove = "qt5" does that work ?

Quoted 7 lines

--
Mingde (Matthew) Zeng

author
#3 lore raw
Quoted 18 lines · Khem Raj
Quoted 7 lines · Matthew

Hello,
In meta-oe/recipes-support/poppler/poppler_0.85.0.bb line 17, there is the line
PACKAGECONFIG ??= "jpeg openjpeg png tiff nss
${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"
Let's say I add meta-qt5 to bblayers.conf, but I don't plan to use

Quoted 9 lines

it immediately in a build. Therefore I haven't make any additional
change to local.conf.
However I will be receiving the following error when starting a
build:
WARNING: qtbase is not whitelisted, figuring out PNWHITELIST...
ERROR: Nothing PROVIDES 'qtbase' (but .../meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.85.0.bb DEPENDS on or otherwise requires it)
because PACKAGECONFIG is changed so it assumes I'll be using qt5. Is
this reasonable?

Quoted 2 lines

Yeah I think here the choice is dynamic, what happens if you add a bbappend where you do PACKAGECONFIG_remove = "qt5" does that work ?

Haven't test specifically, but this should work.

However I personally don't think it is reasonable to add a PACKAGECONFIG_remove line, or any line in local.conf for a layer that I don't plan to use immediately. The layer is added to bblayers.conf because I can use it whenever I feel necessary for my build, but I don't think anything should be triggered based on bblayers.conf, it creates more confusion.

Matthew

Quoted 6 lines
Quoted 6 lines

--
Mingde (Matthew) Zeng

--
Mingde (Matthew) Zeng

author
#8 lore raw
In reply to a message not in the archive
Quoted 56 lines · Andreas Müller
Quoted 54 lines · Randy MacLeod
Quoted 14 lines · Mingde (Matthew) Zeng
Quoted 11 lines · Andreas Müller
Quoted 9 lines · Mingde (Matthew) Zeng

Hello,

In meta-oe/recipes-support/poppler/poppler_0.85.0.bb line 17, there is the line

     PACKAGECONFIG ??= "jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5', '', d)}"

Let's say I add meta-qt5 to bblayers.conf, but I don't plan to use it immediately in a build. Therefore I haven't make any additional change to local.conf.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

However I will be receiving the following error when starting a build:

WARNING: qtbase is not whitelisted, figuring out PNWHITELIST...
ERROR: Nothing PROVIDES 'qtbase' (but .../meta-openembedded/meta-oe/recipes-support/poppler/poppler_0.85.0.bb DEPENDS on or otherwise requires it)

Guess I know how this is going to end so just out of curiosity: What configuration is causing 'qtbase is not whitelisted' ?

This is the problem. I don't have any configuration in local.conf related to qt5, because I don't plan to use it in my build. It is only in bblayers.conf so I can use qt5 layer when I feel necessary.

Mathew is building xfce using the whitelist bbclass that some people use. When he added meta-qt5 and whitelisted a few recipes, the build broke. I don't object to adding changing how poppler works when qt is present but by default as Matthew said, adding a layer should not change anything. On the other hand, I can understand how it would be very convenient to have the dependencies and configuration change automatically. Could the be a tunable that is off by default? The obvious downside to such an approach is testing but the PACKAGECONFIGs already suffer from lack of testing so this only makes it incrementally less tested! ;-)

There are only two such dynamic package configurarations in meta-oe:

$ grep -r BBFILE_COLLECTIONS | grep "PACKAGECONFIG "
meta-oe/recipes-support/poppler/poppler_0.85.0.bb:PACKAGECONFIG ??=
"jpeg openjpeg png tiff nss ${@bb.utils.contains('BBFILE_COLLECTIONS',
'qt5-layer', 'qt5', '', d)}"
meta-networking/recipes-support/wireshark/wireshark_3.2.2.bb:PACKAGECONFIG
?= "libpcap gnutls libnl libcap sbc
${@bb.utils.contains('BBFILE_COLLECTIONS', 'qt5-layer', 'qt5 plugins',
'', d)}"

and the only other such usage that I have in the meta-foo layers in my local collection is:
meta-security/meta-tpm/recipes-tpm/swtpm/swtpm_0.2.0.bb:PACKAGECONFIG += "${@bb.utils.contains('BBFILE_COLLECTIONS', 'filesystems-layer', 'cuse', '', d)}"

Quoted 6 lines
Quoted 6 lines

so fixing this isn't a huge impact.

Matthew,
If Andreas agrees, please send a patch removing this behaviour unless someone replies this week, providing a mechanism and a local.conf setting to make it configurable.

Sounds good, let's see if there is an alternative mechanism.

Quoted 7 lines
Quoted 2 lines

../Randy

Ahh - thanks for explanation. Send out whatever is 'correct' I won't complain and find a way to not break the qt-based pdf readers / poppler consumers.

Andreas

--
Mingde (Matthew) Zeng