[OE-core] [PATCH 20/36] package_rpm.bbclass: correctly map RRECOMMENDS and RSUGGESTS to rpm tags

Alexander Kanavin alexander.kanavin at linux.intel.com
Mon Feb 13 15:05:50 UTC 2017


Previously they were swapped, not sure why. Their meaning, as far as rpm
world goes, is different:

- Recommends is a soft dependency and will be installed by default; there is
an option not to do that.

- Suggests is a suggestion to be picked up and presented to end user by
package management tools; it has no special meaning otherwise.

OE packages use RRECOMMENDS, which should be mapped to Recommends rpm tag,
so that the packages will be picked up as dependencies.

Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
 meta/classes/package_rpm.bbclass | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 36625fe02cc..95a8b147c4e 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -452,10 +452,8 @@ python write_specfile () {
         if splitrpostrm:
             print_deps(splitrdepends, "Requires(postun)", spec_preamble_bottom, d)
 
-        # Suggests in RPM are like recommends in OE-core!
-        print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
-        # While there is no analog for suggests... (So call them recommends for now)
-        print_deps(splitrsuggests,  "Recommends", spec_preamble_bottom, d)
+        print_deps(splitrrecommends, "Recommends", spec_preamble_bottom, d)
+        print_deps(splitrsuggests,  "Suggests", spec_preamble_bottom, d)
         print_deps(splitrprovides,  "Provides", spec_preamble_bottom, d)
         print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
 
@@ -562,10 +560,8 @@ python write_specfile () {
     if srcrpostrm:
         print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
 
-    # Suggests in RPM are like recommends in OE-core!
-    print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
-    # While there is no analog for suggests... (So call them recommends for now)
-    print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
+    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(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
     
-- 
2.11.0




More information about the Openembedded-core mailing list