]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm.bbclass: add a /bin/sh Provides for nativesdk- packages
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Mon, 20 Feb 2017 10:23:20 +0000 (12:23 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 Mar 2017 09:43:21 +0000 (09:43 +0000)
nativesdk-* rpm packages all require /bin/sh because postinst scriptlets
are run with it. We can either teach rpm4 and dnf to ignore that dependency
(a lot of non-upstreamable work), or add auto-satisfy the dependency
in each package. I've chosen to do the latter.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
meta/classes/package_rpm.bbclass

index ff86dc87980eeb0b15437d49f1b6ff445cc86c57..2cdaae0ff25adcc4123fcd39a98fddefc54e5020 100644 (file)
@@ -560,7 +560,7 @@ python write_specfile () {
 
     print_deps(srcrrecommends, "Recommends", spec_preamble_top, d)
     print_deps(srcrsuggests, "Suggests", spec_preamble_top, d)
-    print_deps(srcrprovides, "Provides", spec_preamble_top, d)
+    print_deps(srcrprovides + (" /bin/sh" if srcname.startswith("nativesdk-") else ""), "Provides", spec_preamble_top, d)
     print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
     
     # conflicts can not be in a provide!  We will need to filter it.