Skip to contentSkip to conversation

package_manager: Fix support for NO_RECOMMENDATONS

PATCH New Richard Röjfors 1 participant 1 message Jul 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package_manager: Fix support for NO_RECOMMENDATONS

When support for dnf was introduced the check of the no NO_RECOMMENDATIONS variable got broken.

This fixes the issue by compairing to the string "1" rather than the number 1.

---
 meta/lib/oe/package_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/package_manager.py +1 -1
index 72503eb9d3..518cf8dbe3 100644
@@ -585,7 +585,7 @@ class RpmPM(PackageManager):
 
         output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) +
                          (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) +
-                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == 1 else []) +
+                         (["--setopt=install_weak_deps=False"] if self.d.getVar('NO_RECOMMENDATIONS') == "1" else []) +
                          (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) +
                          ["install"] +
                          pkgs)
Signature · 1 line
2.11.0