diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch | 60 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm_1.4.1.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch b/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch new file mode 100644 index 0000000000..5d5c6f4346 --- /dev/null +++ b/meta/recipes-devtools/python/python-smartpm/smart-flag-ignore-recommends.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Add ignore-recommends flag support | ||
2 | |||
3 | Allow configuring recommends on specific packages to be ignored. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
8 | --- | ||
9 | smart/commands/flag.py | 3 +++ | ||
10 | smart/transaction.py | 7 ++++++- | ||
11 | 2 files changed, 9 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/smart/commands/flag.py b/smart/commands/flag.py | ||
14 | index 8b90496..191bb11 100644 | ||
15 | --- a/smart/commands/flag.py | ||
16 | +++ b/smart/commands/flag.py | ||
17 | @@ -47,6 +47,9 @@ Currently known flags are: | ||
18 | multi-version - Flagged packages may have more than one version | ||
19 | installed in the system at the same time | ||
20 | (backend dependent). | ||
21 | + ignore-recommends - Flagged packages will not be installed, if | ||
22 | + they are only recommended by a package to be | ||
23 | + installed rather than required. | ||
24 | |||
25 | security - Flagged packages are updates for security errata. | ||
26 | bugfix - Flagged packages are updates for bugfix errata. | ||
27 | diff --git a/smart/transaction.py b/smart/transaction.py | ||
28 | index dd9aa38..38eabae 100644 | ||
29 | --- a/smart/transaction.py | ||
30 | +++ b/smart/transaction.py | ||
31 | @@ -596,12 +596,17 @@ class Transaction(object): | ||
32 | # Install packages required by this one. | ||
33 | for req in pkg.requires + pkg.recommends: | ||
34 | |||
35 | + reqrequired = req in pkg.requires | ||
36 | + | ||
37 | # Check if someone is already providing it. | ||
38 | prvpkgs = {} | ||
39 | lockedpkgs = {} | ||
40 | found = False | ||
41 | for prv in req.providedby: | ||
42 | for prvpkg in prv.packages: | ||
43 | + if not reqrequired: | ||
44 | + if pkgconf.testFlag("ignore-recommends", prvpkg): | ||
45 | + continue | ||
46 | if isinst(prvpkg): | ||
47 | found = True | ||
48 | break | ||
49 | @@ -620,7 +625,7 @@ class Transaction(object): | ||
50 | |||
51 | if not prvpkgs: | ||
52 | # No packages provide it at all. Give up. | ||
53 | - if req in pkg.requires: | ||
54 | + if reqrequired: | ||
55 | reasons = [] | ||
56 | for prv in req.providedby: | ||
57 | for prvpkg in prv.packages: | ||
58 | -- | ||
59 | 1.8.1.2 | ||
60 | |||
diff --git a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb index 3e392311f3..70ac8bf288 100644 --- a/meta/recipes-devtools/python/python-smartpm_1.4.1.bb +++ b/meta/recipes-devtools/python/python-smartpm_1.4.1.bb | |||
@@ -27,6 +27,7 @@ SRC_URI = "\ | |||
27 | file://smart-yaml-error.patch \ | 27 | file://smart-yaml-error.patch \ |
28 | file://smart-channelsdir.patch \ | 28 | file://smart-channelsdir.patch \ |
29 | file://smart-conflict-provider.patch \ | 29 | file://smart-conflict-provider.patch \ |
30 | file://smart-flag-ignore-recommends.patch \ | ||
30 | " | 31 | " |
31 | 32 | ||
32 | SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6" | 33 | SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6" |