Skip to contentSkip to conversation

dnf, libdnf: Ignore if PACKAGE_CLASSES does not have rpm

PATCH Superseded Khem Raj 2 participants 12 messages Feb 12, 2020 – Feb 13, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 dnf, libdnf: Ignore if PACKAGE_CLASSES does not have rpm

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
index f38167f1ad..220f1aabbd 100644
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
index 882c435b32..49afa04812 100644
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
 
Signature · 1 line
2.25.0
#1 lore raw

I would still prefer to just split rpm packaging into binaries and libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

Alex

Quoted 47 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
index f38167f1ad..220f1aabbd 100644
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service
 dnf-makecache.timer \
                          dnf-automatic-notifyonly.service
 dnf-automatic-notifyonly.timer \
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
index 882c435b32..49afa04812 100644
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

--
2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#2 lore raw
Quoted 3 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 42 lines

Alex

Quoted 39 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
index f38167f1ad..220f1aabbd 100644
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -1
index 882c435b32..49afa04812 100644
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
 
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

But you do not need to fix or touch dnf at all. You only need to adjust rpm packaging and split it in two parts instead of bundling everything into a single package.

Alex

Quoted 70 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and

libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

Quoted 1 line

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 10 lines

Alex

Quoted 7 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

Quoted 5 lines

Review

Quoted 5 lines
 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-devtools/dnf/dnf_4.2.2.bb

Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

Quoted 4 lines

index f38167f1ad..220f1aabbd 100644

meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

dnf-makecache.timer \

Quoted 1 line

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service · line 84

Quoted 1 line
meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
                          dnf-automatic-notifyonly.service

dnf-automatic-notifyonly.timer \

Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \

Quoted 4 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb

Quoted 8 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF" · line 29

Quoted 8 lines

index 882c435b32..49afa04812 100644

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -1
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#4 lore raw
Quoted 3 lines · Alexander Kanavin

But you do not need to fix or touch dnf at all. You only need to adjust rpm packaging and split it in two parts instead of bundling everything into a single package.

when we do world builds without package_rpm, dnf and related packages get compiled which is unnecessary and moreover wrong and when we mark libsolv to enable rpmdb only for package_rpm, this becomes even more evident.

Perhaps, I am missing what you intend to convey, in that case maybe you can send code changes to support what you are intending here.

Quoted 61 lines

Alex

Quoted 58 lines · Khem Raj
Quoted 3 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 42 lines

Alex

Quoted 39 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
index f38167f1ad..220f1aabbd 100644
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -1
index 882c435b32..49afa04812 100644
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"
 
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw

World builds also enable apt and dpkg, but there is no problem with that for you? There is no consistency here; if you want to start excluding things from world based on what packaging is enabled, you need to treat all options equally, including deb and ipk.

The original problem was that libsolv pulls in the full set of rpm executables and libraries, which erroneously triggers the rpm test on target. We can solve this by making libsolv pull in only the rpm libraries and not executables, so that rpm test will be skipped. Or maybe even make the test itself check whether rpm is the packaging format and skip otherwise.

Alex

Quoted 92 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

But you do not need to fix or touch dnf at all. You only need to adjust

rpm packaging and split it in two parts instead of bundling everything into a single package.

Quoted 1 line

when we do world builds without package_rpm, dnf and related packages get compiled which is unnecessary and moreover wrong and when we mark libsolv to enable rpmdb only for package_rpm, this becomes even more evident.

Perhaps, I am missing what you intend to convey, in that case maybe you can send
code changes to support what you are intending here.

Quoted 8 lines

Alex

Quoted 5 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and

libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 10 lines

Alex

Quoted 7 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Review

Quoted 5 lines
 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-devtools/dnf/dnf_4.2.2.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

Quoted 4 lines

index f38167f1ad..220f1aabbd 100644

meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

dnf-makecache.timer \

Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service · line 84

Quoted 1 line
meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
                          dnf-automatic-notifyonly.service

dnf-automatic-notifyonly.timer \

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \

Quoted 4 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = "

Quoted 4 lines

index 882c435b32..49afa04812 100644

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -0
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = "

-DWITH_GIR=OFF"

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"

Quoted 4 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -1
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

I took a look at meta/lib/oeqa/runtime/cases/rpm.py.

All tests depend on test_rpm_query, which should be skipped if rpm is not used for packaging:

status, output = self.target.run('ls /var/lib/rpm/') if status != 0:
self.skipTest('No /var/lib/rpm on target')

Can you please check, how the tests fails for you exactly, and why /var/lib/rpm exists (and what is the content of it)?

The test used to have the check I am talking about, but it was removed by

commit 633bd85270922d71ab4b1f94cd166da51fbe1458

Author: Richard Purdie <[email protected]>
Date:   Thu Nov 8 19:55:17 2018 +0000

oeqa/runtime/cases: Improve test dependency information
...
- @classmethod
- def setUpClass(cls):
- if cls.tc.td['PACKAGE_CLASSES'].split()[0] != 'package_rpm':
- cls.skipTest('Tests require image to be build from rpm')

Alex

Quoted 109 lines · Alexander Kanavin

World builds also enable apt and dpkg, but there is no problem with that for you? There is no consistency here; if you want to start excluding things from world based on what packaging is enabled, you need to treat all options equally, including deb and ipk.

The original problem was that libsolv pulls in the full set of rpm executables and libraries, which erroneously triggers the rpm test on target. We can solve this by making libsolv pull in only the rpm libraries and not executables, so that rpm test will be skipped. Or maybe even make the test itself check whether rpm is the packaging format and skip otherwise.

Alex

Quoted 92 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

But you do not need to fix or touch dnf at all. You only need to adjust

rpm packaging and split it in two parts instead of bundling everything into a single package.

Quoted 1 line

when we do world builds without package_rpm, dnf and related packages get compiled which is unnecessary and moreover wrong and when we mark libsolv to enable rpmdb only for package_rpm, this becomes even more evident.

Perhaps, I am missing what you intend to convey, in that case maybe you can send
code changes to support what you are intending here.

Quoted 8 lines

Alex

Quoted 5 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and

libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 10 lines

Alex

Quoted 7 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Review

Quoted 5 lines
 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-devtools/dnf/dnf_4.2.2.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

Quoted 4 lines

index f38167f1ad..220f1aabbd 100644

meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

dnf-makecache.timer \

Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service · line 84

Quoted 1 line
meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
                          dnf-automatic-notifyonly.service

dnf-automatic-notifyonly.timer \

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \

Quoted 4 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = "

Quoted 4 lines

index 882c435b32..49afa04812 100644

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -0
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = "

-DWITH_GIR=OFF"

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"

Quoted 4 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -1
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#7 lore raw
In reply to Alexander Kanavin
Quoted 5 lines · Alexander Kanavin

World builds also enable apt and dpkg, but there is no problem with that for you? There is no consistency here; if you want to start excluding things from world based on what packaging is enabled, you need to treat all options equally, including deb and ipk.

No, problem is that if One wants to use opkg backend then rpm drags along but apt or dpkg don’t
World builds are also problem but secondary
Please try to understand the entirety of problem

I tried everything to keep it building but i could not and I have been saying that all along

If you can come up with patches to dnf to build with libresolv that is not build with rpm support we might get to built however I don’t think it will of any use at runtime

Quoted 6 lines

The original problem was that libsolv pulls in the full set of rpm executables and libraries, which erroneously triggers the rpm test on target. We can solve this by making libsolv pull in only the rpm libraries and not executables,

Libsolve already has option to disable rpmdb support and we use it

so that rpm test will be skipped. Or maybe even make the test itself check

Quoted 2 lines

whether rpm is the packaging format and skip otherwise.

No. Skipping test is just symptom of the problem I knew we could paper over it but that’s not the point

Even if test is made to pass rpm will be dragged into Images which is not desired

Quoted 97 lines

Alex

Quoted 92 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

But you do not need to fix or touch dnf at all. You only need to adjust

rpm packaging and split it in two parts instead of bundling everything into a single package.

Quoted 1 line

when we do world builds without package_rpm, dnf and related packages get compiled which is unnecessary and moreover wrong and when we mark libsolv to enable rpmdb only for package_rpm, this becomes even more evident.

Perhaps, I am missing what you intend to convey, in that case maybe you can send
code changes to support what you are intending here.

Quoted 8 lines

Alex

Quoted 5 lines · Khem Raj
Quoted 2 lines · Alexander Kanavin

I would still prefer to just split rpm packaging into binaries and

libraries, and avoid the need to blacklist and tweak recipes based on what PACKAGE_CLASSES is set to altogether. That setting should not leak into recipes, and should only matter from do_package onwards. Can you look into the rpm recipe please?

Quoted 21 lines
Quoted 21 lines
Quoted 1 line

dnf and dnf related packages expecting rpmdb support in libresolv. I
do not know dnf well enough to fix it and moreover it has no direct use for my usecase either. I also don't see a point of entertaining dnf for non-rpm backends. Its not intended for that either even if we were to make dnf not want rpmdb what good will it do to build for distros who do not use rpm. These changes do not change poky defaults which use rpm as default. OE-core does not and I dont know of any opkg user who also has rpmdb needed.

Quoted 10 lines

Alex

Quoted 7 lines · Khem Raj

dnf does not work with opkg or dpkg/apt anyway

---
v2: Use PNBLACKLIST instead of anon python

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Review

Quoted 5 lines
 meta/recipes-devtools/dnf/dnf_4.2.2.bb        | 2 ++
 meta/recipes-devtools/libdnf/libdnf_0.28.1.bb | 1 +
 2 files changed, 3 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-devtools/dnf/dnf_4.2.2.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

Quoted 4 lines

index f38167f1ad..220f1aabbd 100644

meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
@@ -84,3 +84,5 @@ SYSTEMD_SERVICE_${PN} = "dnf-makecache.service

dnf-makecache.timer \

Quoted 1 line
Quoted 1 line
Quoted 1 line

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service · line 84

Quoted 1 line
meta/recipes-devtools/dnf/dnf_4.2.2.bb +0 -0
                          dnf-automatic-notifyonly.service

dnf-automatic-notifyonly.timer \

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/dnf/dnf_4.2.2.bb SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \

Quoted 4 lines
meta/recipes-devtools/dnf/dnf_4.2.2.bb +2 -0
 "
 SYSTEMD_AUTO_ENABLE ?= "disable"
+
+PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-devtools/libdnf/libdnf_0.28.1.bb

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = "

Quoted 4 lines

index 882c435b32..49afa04812 100644

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -0
@@ -26,4 +26,5 @@ EXTRA_OECMAKE_append_class-native = "

-DWITH_GIR=OFF"

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

meta/recipes-devtools/libdnf/libdnf_0.28.1.bb EXTRA_OECMAKE_append_class-native = " -DWITH_GIR=OFF"

Quoted 4 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +1 -0
 EXTRA_OECMAKE_append_class-nativesdk = " -DWITH_GIR=OFF"
 
 BBCLASSEXTEND = "native nativesdk"
+PNBLACKLIST[libdnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES',

'package_rpm', '', 'does not build correctly without package_rpm in PACKAGE_CLASSES', d)}"

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
meta/recipes-devtools/libdnf/libdnf_0.28.1.bb +0 -1
--

2.25.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw
Quoted 6 lines · Khem Raj

No, problem is that if One wants to use opkg backend then rpm drags along but apt or dpkg don’t

Even if test is made to pass rpm will be dragged into Images which is not desired

We can modify the rpm packaging so that only the library from rpm that libresolv links with, but not the executables or other libraries are in the image. Would you be ok with that?

Alex

author
#9 lore raw
Quoted 5 lines · Alexander Kanavin
Quoted 3 lines · Khem Raj

No, problem is that if One wants to use opkg backend then rpm drags along but apt or dpkg don’t

Quoted 8 lines
Quoted 3 lines

Even if test is made to pass rpm will be dragged into Images which is not desired

We can modify the rpm packaging so that only the library from rpm that libresolv links with, but not the executables or other libraries are in the image. Would you be ok with that?

This still sneaks in pieces of rpm into distros where rpm is not needed so better would be to retool dnf to not demand rpm support in libsolv and break the dependency chain. Opkg is usually sought for small systems and last thing we want is unneeded dependencies

I would rather use the OE configuration powers as such but I am not opposed to such a solution

Quoted 2 lines

Alex

#10 lore raw
Quoted 8 lines · Khem Raj

This still sneaks in pieces of rpm into distros where rpm is not needed so better would be to retool dnf to not demand rpm support in libsolv and break the dependency chain. Opkg is usually sought for small systems and last thing we want is unneeded dependencies

I would rather use the OE configuration powers as such but I am not opposed to such a solution

You can always set these things (rpm disabling in libsolv, blacklisting libdnf/dnf) in your distro configuration, but I would like less complexity and special-casing in poky, not more, for the pieces that I maintain at least.

Alex

author
#11 lore raw
Quoted 7 lines · Alexander Kanavin
Quoted 5 lines · Khem Raj

This still sneaks in pieces of rpm into distros where rpm is not needed so better would be to retool dnf to not demand rpm support in libsolv and break the dependency chain. Opkg is usually sought for small systems and last thing we want is unneeded dependencies

Quoted 9 lines
Quoted 3 lines

I would rather use the OE configuration powers as such but I am not opposed to such a solution

You can always set these things (rpm disabling in libsolv, blacklisting libdnf/dnf) in your distro configuration, but I would like less complexity and special-casing in poky, not more, for the pieces that I maintain at least.

Btw it’s being proposed for Oe-core not poky and in Oe core rpm is not default backend but opkg is
Moreover it is being done in a way where poky default are being taken into account

I really fail to understand your line of arguments
Here I am sorry, there seems to be no technical arguments for alternatives but for convenience

I certainly can this goes unsaid and it just takes distro one step away from Oe-core

Quoted 2 lines

Alex