[OE-core] [PATCH 1/1] nativesdk/sdk: Fix sdk dummy providers for opkg

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Wed Dec 5 17:38:02 UTC 2018


On Wed, 2018-12-05 at 08:59 +0100, Andrej Valek wrote:
> We have made some deeper analysis of this problem.
> 
> In our opinion the code as it is now does not work for any packaging
> method.
> For RPM it's a silent failure (purpose of dummy class is to replace
> tools like perl, however without RCONFLICTS clause those tools will
> be installed instead anyway of replaced.

That isn't true as for the buildtools-tarball case it *is* working with
rpm.

> OPKG correctly creates a hard failure when RCONFLICTS is not set.
> 
> The problem in RPM/DNF is that it cannot compare conflict between
> package name and file name (e.g. perl vs. /usr/bin/perl), so it will
> try install both.
> For this you have implemented a "workaround" by removing the
> RCONFLICTS which however makes the package useless for RPM and
> breaking OPKG build.
> 
> We ha tried to replace /usr/bin/perl by perl (which works fine),
> however there is still /bin/sh and /bin/env which can have multiple
> providers and we can't conflict with any possible package out there.
> 
> Unfortunately reworking RPM/DNS is something we don't know how to.
> Therefore we would like to at least fix OPKG that it does not crash
> during build and leave the background problem for later (e.g. create
> bugreport).
> 
> Would you reconsider merging this MR

If I merge your patch, the autobuilder breaks and shows errors. Is that
acceptable?

>  or would you accept if we create separate recipe for OPKG?

No, that is hacking around the problem.

I took a look at this myself. It seems that the patch below does work
for rpm. That does make me wonder about some of things you've mentioned
above. Basically the problem is that some recipes like nativesdk-
autoconf depend on more than just /usr/bin/perl. We therefore need to
extend the providers list to cover the various possibilities.

Cheers,

Richard


diff --git a/meta/recipes-core/meta/dummy-sdk-package.inc b/meta/recipes-core/meta/dummy-sdk-package.inc
index eafcb823ab..4d653706b1 100644
--- a/meta/recipes-core/meta/dummy-sdk-package.inc
+++ b/meta/recipes-core/meta/dummy-sdk-package.inc
@@ -20,7 +20,7 @@ PR[vardeps] += "DUMMYPROVIDES"
 python populate_packages_prepend() {
     p = d.getVar("PN")
     d.appendVar("RPROVIDES_%s" % p, "${DUMMYPROVIDES}")
-    #d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
-    #d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
+    d.appendVar("RCONFLICTS_%s" % p, "${DUMMYPROVIDES}")
+    d.appendVar("RREPLACES_%s" % p, "${DUMMYPROVIDES}")
 }
 
diff --git a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
index 11a727d486..d33e978666 100644
--- a/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/nativesdk-sdk-provides-dummy.bb
@@ -2,6 +2,26 @@ DUMMYARCH = "sdk-provides-dummy-${SDKPKGSUFFIX}"
 
 # Add /bin/sh?
 DUMMYPROVIDES = "\
+    nativesdk-perl \
+    nativesdk-libxml-parser-perl \
+    nativesdk-perl-module-bytes \
+    nativesdk-perl-module-carp \
+    nativesdk-perl-module-constant \
+    nativesdk-perl-module-data-dumper \
+    nativesdk-perl-module-errno \
+    nativesdk-perl-module-exporter \
+    nativesdk-perl-module-file-basename \
+    nativesdk-perl-module-file-compare \
+    nativesdk-perl-module-file-copy \
+    nativesdk-perl-module-file-find \
+    nativesdk-perl-module-file-glob \
+    nativesdk-perl-module-file-path \
+    nativesdk-perl-module-file-stat \
+    nativesdk-perl-module-getopt-long \
+    nativesdk-perl-module-io-file \
+    nativesdk-perl-module-posix \
+    nativesdk-perl-module-thread-queue \
+    nativesdk-perl-module-threads \
     /bin/bash \
     /usr/bin/env \
     /usr/bin/perl \
diff --git a/meta/recipes-core/meta/target-sdk-provides-dummy.bb b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
index 714d15d8ba..57c10044f8 100644
--- a/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -1,6 +1,9 @@
 DUMMYARCH = "sdk-provides-dummy-target"
 
 DUMMYPROVIDES = "\
+    busybox \
+    bash \
+    perl \
     /bin/sh \
     /bin/bash \
     /usr/bin/env \




More information about the Openembedded-core mailing list