summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/python/python-smartpm/smart-config-ignore-all-recommends.patch
blob: df9d7799e85e94d72250e9cda3d4e65407cc8099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Add a simple method to disable the install of recommended packages

Upstream-Status: Pending

Usage:
   smart config --set ignore-all-recommends=1

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

Index: smart-1.4.1/smart/transaction.py
===================================================================
--- smart-1.4.1.orig/smart/transaction.py
+++ smart-1.4.1/smart/transaction.py
@@ -611,7 +611,9 @@ class Transaction(object):
             for prv in req.providedby:
                 for prvpkg in prv.packages:
                     if not reqrequired:
-                        if pkgconf.testFlag("ignore-recommends", prvpkg):
+                        if sysconf.get("ignore-all-recommends", 0) == 1:
+                            continue
+                        elif pkgconf.testFlag("ignore-recommends", prvpkg):
                             continue
                     if isinst(prvpkg):
                         found = True