#16 Use hawkey instead of yum
Merged 5 years ago by kparal. Opened 5 years ago by frantisekz.

file modified
+9 -7
@@ -7,8 +7,8 @@ 

  import time

  import math

  import logging

+ import hawkey

  

- from rpmUtils.miscutils import splitFilename

  from libtaskotron import check

  from libtaskotron import arch_utils

  
@@ -107,9 +107,10 @@ 

                  stable_debuginfo_rpm.append(rpm)

              else:

                  stable_rpms.append(rpm)

-                 (n, v, r, e, a) = splitFilename(rpm)

-                 rpm_details = {'rpm': rpm, 'name': n, 'version': v, 'release': r,

-                                'e': e, 'arch': a}

+                 nevra = hawkey.split_nevra(rpm)

+                 rpm_details = {'rpm': rpm, 'name': nevra.name, 

+                                'version': nevra.version, 'release': nevra.release,

+                                'e': nevra.epoch, 'arch': nevra.arch}

                  stable_rpms_detail.append(rpm_details)

  

      '''
@@ -125,9 +126,10 @@ 

                  update_debuginfo_rpm.append(rpm)

              else:

                  update_rpms.append(rpm)

-                 (n, v, r, e, a) = splitFilename(rpm)

-                 rpm_details = {'rpm': rpm, 'name': n, 'version': v,

-                                'release': r, 'e': e, 'arch': a}

+                 nevra = hawkey.split_nevra(rpm)

+                 rpm_details = {'rpm': rpm, 'name': nevra.name, 

+                                'version': nevra.version, 'release': nevra.release,

+                                'e': nevra.epoch, 'arch': nevra.arch}

                  update_rpms_detail.append(rpm_details)

  

      # Prepare abipkgdiff command with required args

file modified
+1 -1
@@ -19,7 +19,7 @@ 

          state: latest

        with_items:

          - libabigail

-         - yum

+         - python2-hawkey

          - libtaskotron-core

          - libtaskotron-fedora

        register: dnf_output

yum is compatible with Python 2 only and is going to be dropped from Fedora 30 [0]

Also, I had to remove dnf-yum before being able to install yum on my F29 laptop.
I've tested these changes on some random packages, I hope I didn't miss anything important.

[0] https://fedoraproject.org/wiki/Changes/Deprecate_YUM_3

Frantisek, please install the hawkey rpm in tests.yml. I know it's a dependency of libtaskotron anyway, but it's better to have it explicit (libtaskotron deps can change).

Outside of that, it looks ok to me, we use the same code in libtaskotron. I haven't tried to run it, though. @sinnykumari , is the change ok with you?

1 new commit added

  • Depend explicitly on hawkey
5 years ago

It should be python2/3-hawkey.

3 new commits added

  • Depend explicitly on hawkey
  • Use hawkey instead of yum
  • Dont depend on yum
5 years ago

Works fine after testing, merging.

Commit 924c3fe fixes this pull-request

Pull-Request has been merged by kparal

5 years ago
Metadata