libabigail task
AbandonedPublic

Authored by kparal on Apr 18 2016, 7:27 AM.

Details

Reviewers
sinnykumari
Summary

Code re-factoring as per review comments

Test Plan

None

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
sinnykumari retitled this revision from to libabigail task.Apr 18 2016, 7:27 AM
sinnykumari updated this object.
sinnykumari edited the test plan for this revision. (Show Details)
sinnykumari added a reviewer: kparal.
kparal accepted this revision.Apr 21 2016, 2:07 PM

Looks good to me. I haven't checked the bitwise operations :-)

run_abipkgdiff.py
160

This might have been left here as a debug printout by accident.

This revision is now accepted and ready to land.Apr 21 2016, 2:07 PM

Thanks Kamil for the review :)

run_abipkgdiff.py
160

Ah, yes. Forgot to remove print statement after debugging.

tflink added a comment.May 4 2016, 1:07 PM

A few minor questions, otherwise looks good to me. Very much looking forward to getting this running in production.

libabigail.yml
12

Out of curiosity, is yum going to be a long term requirement?

run_abipkgdiff.py
154

Why is the check.ReportType.BODHI_UPDATE part hardcoded? Shouldn't this be reported as check.ReportType.KOJI_BUILD?

Thanks Tim for the review :)

libabigail.yml
12

As per usecase, it was easy to use splitFilename provided by rpmUtils.miscutils module. If there is some issues with keeping yum as dependency then I can remove it.

run_abipkgdiff.py
154

Ah, that's because initially (before discussion started on qa-devel ML) plan was to run task only on bodhi updates. Slipped from mind to update it to check.ReportType.KOJI_BUILD. Fixed it in commit https://github.com/sinnykumari/task-libabigail/commit/e203c0d86d84a716c38d1a58b89daa7a77bffd8e

kparal commandeered this revision.May 13 2016, 8:26 AM
kparal edited reviewers, added: sinnykumari; removed: kparal.

This was done (modulo some trailing comments), I'm closing this so that it gets removed from the queue.

Sinny, one last comment below.

libabigail.yml
12

I think Tim is asking because Fedora in general is trying to steer away from yum towards dnf (the transition is almost complete). Yum is going to be deprecated in the future. However, for this particular use case and for the mid-term future, I don't think it matters much.

If you wanted to switch, you can do this:

from libtaskotron.ext.fedora import rpm_utils

nevra = rpm[:-len('.rpm')]
name = rpm_utils.rpmformat(nevra, fmt='n', end_arch=True)

or this (add a dependency on python2-hawkey):

import hawkey

nevra = rpm[:-len('.rpm')]
name = hawkey.split_nevra(nevra).name

You don't actually use anything else than name in your code (you don't use version, release, epoch, etc). If you did, it's trivial to do with hawkey (it returns an object), and we could easily add it to rpm_utils.rpmformat as well, if requested.

Regardless of whether you do this or not, I'd recommend you to edit lines 34 and 50 and add a safety check that only rpm files are processed, like this:

for rpm in os.listdir(stable_rpmsdir):
    if not rpm.endswith('.rpm'):
        continue
    ...
This revision now requires review to proceed.May 13 2016, 8:26 AM
kparal abandoned this revision.May 13 2016, 8:27 AM