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:
Nicolas Bock 2019-02-27 06:27:41 -07:00
parent ba4dcfdbf9
commit f140a2e565
No known key found for this signature in database
GPG Key ID: 9E90013DEF7F5B7B
4 changed files with 25 additions and 0 deletions

View File

@ -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([])) }}"

View File

@ -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
View File

@ -0,0 +1,2 @@
[main]
vendors = {{ openstack_hosts_package_vendors | join(',') }}

View File

@ -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