[mythtv-commits] Ticket #13529: Feature patch - Ansible - adjust python requirements for fedora (prep for centos8)

MythTV noreply at mythtv.org
Mon Dec 2 05:06:46 UTC 2019


#13529: Feature patch - Ansible - adjust python requirements for fedora (prep for
centos8)
---------------------------------+---------------------------------
     Reporter:  Gary Buhrmaster  |      Owner:  Stuart Auchterlonie
         Type:  Patch - Feature  |     Status:  new
     Priority:  minor            |  Milestone:  needs_triage
    Component:  Ansible          |    Version:  Master Head
     Severity:  medium           |   Keywords:
Ticket locked:  0                |
---------------------------------+---------------------------------
 This patch adjusts the python requirements for fedora (in prep for centos8
 python requirements) by making the various required python2/3 modules
 explicit for each legacy releases.

 The patch is somewhat ugly (blame diff).  I recommend looking at the
 resulting file (it is much easy to look at).

 Lightly tested with F30, F31.

 Note that there is a bug with ansible and F30 (upstream issue), where if
 you have python-unversioned-command (or equivalent) installed, ansible
 will try to install python2-dnf, which is not available in F30.  There is
 a fix being worked in ansible (I think targeted for 2.12?)


 {{{
 diff --git a/roles/mythtv-dnf/tasks/main.yml b/roles/mythtv-
 dnf/tasks/main.yml
 index e87b05d..1b43169 100644
 --- a/roles/mythtv-dnf/tasks/main.yml
 +++ b/roles/mythtv-dnf/tasks/main.yml
 @@ -85,7 +85,8 @@
        - libcec-devel
    when: ansible_distribution == "Fedora"

 -- name: add mythtv essential python modules
 +# Adjust for various python package renamings/availability in Fedora
 +- name: add mythtv essential python modules - Fedora <30
    set_fact:
      dnf_pkg_lst:
        - '{{ dnf_pkg_lst }}'
 @@ -93,42 +94,36 @@
        - python-lxml
        - python-urlgrabber
        - python2-requests
 -
 -- name: add mythtv essential python modules - Fedora only
 -  set_fact:
 -    dnf_pkg_lst:
 -      - '{{ dnf_pkg_lst }}'
        - python-oauth
 -  when: ansible_distribution == "Fedora"
 -
 -# Packages renamed in f30
 -# python-requests-cache -> python2-requests-cache
 -- name: add mythtv essential python modules - Fedora <30
 -  set_fact:
 -    dnf_pkg_lst:
 -      - '{{ dnf_pkg_lst }}'
        - python-requests-cache
 +      - python-libselinux
 +      - python2-future
    when: ansible_distribution == "Fedora" and
 ansible_distribution_version|int < 30

 -- name: add mythtv essential python modules - Fedora 30,31
 +- name: add mythtv essential python2 modules - Fedora 30
    set_fact:
      dnf_pkg_lst:
        - '{{ dnf_pkg_lst }}'
 -      - python2-requests-cache
 -  when: ansible_distribution == "Fedora" and
 ansible_distribution_version|int >= 30 and
 ansible_distribution_version|int < 32
 +      - python2-libselinux
 +      - python2-future
 +      - python2-oauth
 +  when: ansible_distribution == "Fedora" and
 ansible_distribution_version|int == 30

 -- name: add mythtv essential python modules - Fedora <31
 +- name: add mythtv essential python2 modules - Fedora 30,31
    set_fact:
      dnf_pkg_lst:
        - '{{ dnf_pkg_lst }}'
 -      - libselinux-python
 -      - python2-future
 -  when: ansible_distribution == "Fedora" and
 ansible_distribution_version|int < 31
 +      - python2-mysql
 +      - python2-lxml
 +      - python2-urlgrabber
 +      - python2-requests-cache
 +  when: ansible_distribution == "Fedora" and
 ansible_distribution_version|int >= 30 and
 ansible_distribution_version|int < 32

  - name: add mythtv essential python3 modules - Fedora 30+
    set_fact:
      dnf_pkg_lst:
        - '{{ dnf_pkg_lst }}'
 +      - python3-lxml
        - python3-libselinux
        - python3-future
        - python3-mysql
 }}}

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13529>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list