Add vendor override for openSUSE repositories
Zypper uses the concept of "vendor stickiness" and will refuse to upgrade packages that require a vendor change. This change introduces a new override variable to instruct zypper to view a list of vendors as equivalent. Change-Id: Ib3412b02f1edf9aae03cd5478ac2310cce3f2e8a Signed-off-by: Nicolas Bock <nicolas.bock@suse.com>
This commit is contained in:
parent
ba4dcfdbf9
commit
f140a2e565
@ -59,6 +59,11 @@ openstack_hosts_package_list: "{{ _package_list + (user_package_list | default([
|
||||
# named user_external_repo_lists and the standard defaults _package_repos
|
||||
openstack_hosts_package_repos: "{{ _package_repos + (user_external_repos_list | default([])) }}"
|
||||
|
||||
# Overridable package vendors is composed of the old override named
|
||||
# user_external_vendors_lists and the standard defaults
|
||||
# _package_vendors
|
||||
openstack_hosts_package_vendors: "{{ (_package_vendors | default([])) + (user_external_vendors_list | default([])) }}"
|
||||
|
||||
# Overridable package repo gpg is composed of the old override
|
||||
# named user_external_repo_keys_list and the standard defaults _package_repos_keys
|
||||
openstack_hosts_package_repos_keys: "{{ _package_repos_keys + (user_external_repo_keys_list | default([])) }}"
|
||||
|
@ -74,6 +74,14 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: Add/Remove/Update acceptable repository vendors
|
||||
template:
|
||||
src: osa.vendors.j2
|
||||
dest: /etc/zypp/vendors.d/osa.vendors
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Add requirement packages (repositories gpg keys, toolkits...)
|
||||
zypper:
|
||||
name: "{{ openstack_hosts_package_list | rejectattr('state','equalto','absent') | map(attribute='name') | list }}"
|
||||
|
2
templates/osa.vendors.j2
Normal file
2
templates/osa.vendors.j2
Normal file
@ -0,0 +1,2 @@
|
||||
[main]
|
||||
vendors = {{ openstack_hosts_package_vendors | join(',') }}
|
@ -119,3 +119,13 @@ _package_repos:
|
||||
repo: "{{ opensuse_obs_cloud_repo_url }}"
|
||||
auto_import_keys: yes
|
||||
autorefresh: yes
|
||||
|
||||
_package_vendors:
|
||||
## https://en.opensuse.org/SDB:Vendor_change_update#Allowing_Vendor_change_for_selected_repositories
|
||||
# - suse
|
||||
# - opensuse
|
||||
# - obs://build.suse.deb
|
||||
# - Packman
|
||||
# - http://packman.links2linux.de
|
||||
- openSUSE
|
||||
- obs://build.opensuse.org/Cloud:OpenStack
|
||||
|
Loading…
Reference in New Issue
Block a user