bab9bb6b69
Create new directories: ceph config config-files filesystem kernel kernel/kernel-modules ldap logging strorage-drivers tools utilities virt Retire directories: connectivity core devtools support extended Delete two packages: tgt irqbalance Relocated packages: base/ dhcp initscripts libevent lighttpd linuxptp memcached net-snmp novnc ntp openssh pam procps sanlock shadow sudo systemd util-linux vim watchdog ceph/ python-cephclient config/ facter puppet-4.8.2 puppet-modules filesystem/ e2fsprogs nfs-utils nfscheck kernel/ kernel-std kernel-rt kernel/kernel-modules/ mlnx-ofa_kernel ldap/ nss-pam-ldapd openldap logging/ syslog-ng logrotate networking/ lldpd iproute mellanox python-ryu mlx4-config python/ python-2.7.5 python-django python-gunicorn python-setuptools python-smartpm python-voluptuous security/ shim-signed shim-unsigned tboot strorage-drivers/ python-3parclient python-lefthandclient virt/ cloud-init libvirt libvirt-python qemu tools/ storage-topology vm-topology utilities/ tis-extensions namespace-utils nova-utils update-motd Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86 Story: 2002801 Task: 22687 Signed-off-by: Scott Little <scott.little@windriver.com>
61 lines
2.1 KiB
Diff
61 lines
2.1 KiB
Diff
Add ignore-recommends flag support
|
|
|
|
Allow configuring recommends on specific packages to be ignored.
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
|
---
|
|
smart/commands/flag.py | 3 +++
|
|
smart/transaction.py | 7 ++++++-
|
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/smart/commands/flag.py b/smart/commands/flag.py
|
|
index 8b90496..191bb11 100644
|
|
--- a/smart/commands/flag.py
|
|
+++ b/smart/commands/flag.py
|
|
@@ -47,6 +47,9 @@ Currently known flags are:
|
|
multi-version - Flagged packages may have more than one version
|
|
installed in the system at the same time
|
|
(backend dependent).
|
|
+ ignore-recommends - Flagged packages will not be installed, if
|
|
+ they are only recommended by a package to be
|
|
+ installed rather than required.
|
|
|
|
security - Flagged packages are updates for security errata.
|
|
bugfix - Flagged packages are updates for bugfix errata.
|
|
diff --git a/smart/transaction.py b/smart/transaction.py
|
|
index dd9aa38..38eabae 100644
|
|
--- a/smart/transaction.py
|
|
+++ b/smart/transaction.py
|
|
@@ -596,12 +596,17 @@ class Transaction(object):
|
|
# Install packages required by this one.
|
|
for req in pkg.requires + pkg.recommends:
|
|
|
|
+ reqrequired = req in pkg.requires
|
|
+
|
|
# Check if someone is already providing it.
|
|
prvpkgs = {}
|
|
lockedpkgs = {}
|
|
found = False
|
|
for prv in req.providedby:
|
|
for prvpkg in prv.packages:
|
|
+ if not reqrequired:
|
|
+ if pkgconf.testFlag("ignore-recommends", prvpkg):
|
|
+ continue
|
|
if isinst(prvpkg):
|
|
found = True
|
|
break
|
|
@@ -620,7 +625,7 @@ class Transaction(object):
|
|
|
|
if not prvpkgs:
|
|
# No packages provide it at all. Give up.
|
|
- if req in pkg.requires:
|
|
+ if reqrequired:
|
|
reasons = []
|
|
for prv in req.providedby:
|
|
for prvpkg in prv.packages:
|
|
--
|
|
1.8.1.2
|
|
|