Bug 1329737

Summary: crash in dnf python api for download transaction
Product: [Fedora] Fedora Reporter: Angelo Naselli <anaselli>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 23CC: anaselli, ignatenko, jsilhan, mluscon, ngompa13, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-02 11:33:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Angelo Naselli 2016-04-22 19:32:24 UTC
Description of problem:
I'm developing a GUI python application based on dnf api, now I based the code on
dnf-apiex project:
 https://github.com/timlau/dnf-apiex

now the problem i saw is related to 
installing and then removing packages (or viceversa), the example in that
project is showing the crash by running it
https://github.com/timlau/dnf-apiex/blob/master/dnf-remove.py

To look at the output i have i posted an issue here:
https://github.com/timlau/dnf-apiex/issues/1

Version-Release number of selected component (if applicable):

- hawkey
hawkey-0.6.2-3.fc23.x86_64
python3-hawkey-0.6.2-3.fc23.x86_64

- dnf
dnf-plugins-core-0.1.20-1.fc23.noarch
python3-dnf-1.1.8-1.fc23.noarch
dnf-yum-1.1.8-1.fc23.noarch
dnf-conf-1.1.8-1.fc23.noarch
python3-dnf-plugins-core-0.1.20-1.fc23.noarch
dnf-1.1.8-1.fc23.noarch

Comment 1 Honza Silhan 2016-04-25 11:12:35 UTC
Hi, are you really running it on Fedora? I remember talking with you on IRC.

Comment 2 Angelo Naselli 2016-04-25 12:58:58 UTC
Odd question... :/

as I said on IRC i started to work on gui application in mageia. But of course i tried the example in fedora before opening the bug for two reasons, first
to see if the mageia ported version was the problem, lastly to help dnf developers as much as possible. And you can see reading the comment on issue i posted in my comment#0 (https://github.com/timlau/dnf-apiex/issues/1) that's clear enough also by looking at what packages i was installing in the debug 
test :p

Now since you ask me for it i should figure that you could not replicate it, couldn't you? and since the code into dnf-apiex it's not mine that sounds very odd to me :/

Comment 3 Honza Silhan 2016-05-02 11:17:19 UTC
We will investigate.

Comment 4 Igor Gnatenko 2016-05-02 11:33:50 UTC
It works here: it installed btanks with dependencies here.

[ignatenko@ignatenko ~]$ rpm -q libsolv hawkey dnf 
libsolv-0.6.20-1.fc24.x86_64
hawkey-0.6.2-4.fc24.x86_64
dnf-1.1.8-1.fc24.noarch

Comment 5 Angelo Naselli 2016-05-02 12:18:34 UTC
So doe it work in fc24? I will check which package versions i have in my fc23
(the only ones i seem to have reported already is hawkey-0.6.2-3.fc23.x86_64 and 
dnf-1.1.8-1.fc23.noarch)

Comment 6 Angelo Naselli 2016-07-23 14:21:26 UTC
I seem i found the cause why this 
https://github.com/timlau/dnf-apiex/blob/master/dnf-remove.py
script crashes despite of the bug closure i still have the crash there.

I added a 
self.close()
call between install and remove transaction call and now it works.