Bug 9894

Summary: Investigate porting smartpm, createrepo to python3
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Randy MacLeod <randy.macleod>
Component: devtools / tool chainAssignee: Chen Qi <Qi.Chen>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Medium+ CC: fan.xin, joshuagloe, mark.hatle, meta.mr.watcher, meta.watcher, Qi.Chen, richard.purdie, sgw
Version: 2.2   
Target Milestone: 2.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on: 9675    
Bug Blocks:    

Description Randy MacLeod 2016-07-07 15:33:37 UTC
The consensus on the weekly YP bug review call is that oe-core should drop smartpm and use dnf in the 2.3 release. 

For the 2.2 release, we'll keep smartpm as the system package manager so it would be good to attempt to port it to python3 rather than leave it as one of the few key packages in the system that still require python2. I expect that this work is worth doing since we would have to support smartpm for another year or more.

As mentioned in:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9675

we should fork the project and see if the python3 port can be done by early M3.
Comment 1 Chen Qi 2016-07-13 02:21:03 UTC
Hi Randy,

It seems that python 2 to 3 converting work in OE is mainly about bitbake and metadata.
This bug seems to try to achieve a goal that is making python default to python3 on target instead of python2.
Is this goal in the plan of Yocto 2.2?
If it's a goal for Yocto 2.3 and we are going to use dnf in 2.3, it seems we don't have to fix this bug?
Do I misunderstand something?

Regards,
Chen Qi
Comment 2 Randy MacLeod 2016-07-28 15:28:12 UTC
I've discussed the defect with Mark Hatle and Qi Chen. Qi is going to do an initial investigation and report here by ~ Aug 3rd.
Comment 3 Chen Qi 2016-08-02 08:17:26 UTC
After talking to Saul, I've focused on getting createrepo not dependant on python2. However, after some investigation, I found it's more complicated that I thought.

The problem is that:
"createrepo-native" -> "libxml2-native" [style=solid]
"createrepo-native" -> "rpm-native" [style=solid]
"libxml2-native" -> "python-native" [style=solid]
"rpm-native" -> "python-native" [style=solid]

So createrepo depends on rpm, and rpm requires python2 version as stated in its configure script like below.

--with-python only supports values "2.x", "2.3", "2.4", "2.5", "2.6" or "2.7"

Best Regards,
Chen Qi
Comment 4 Fan Xin 2016-09-02 02:31:57 UTC
The conclusion about this bug is keep using smartpm until Yocto 2.2, and change to dnf from Yocto 2.3 .

My understanding is correct ?

I find that rpm5 is used in Yocto and dnf is using rpm4.
And rpm5 is not compatible with rpm4.

rpm5(www.rpm5.org)
rpm4(www.rpm.org)

Even though using dnf in Yocto 2.3, it is still a problem to solve the rpm compatible.
Comment 5 Mark Hatle 2016-09-02 03:35:37 UTC
> The conclusion about this bug is keep using smartpm until Yocto 2.2,
> and change to dnf from Yocto 2.3 .

The content for YP 2.3 has not yet been decided.  But generally I believe this will be true.

YP 2.2 will definitely be smart, it's too late to change now.

We are going to strongly consider DNF for YP 2.3, but as you mentioned there are some API level compatibility issues that will have to be investigated and resolved.

So it is not yet committed for YP 2.3, but highly likely.
Comment 6 Richard Purdie 2016-10-26 16:32:18 UTC
This bug may be obsoleted by 9675, I've set a dependency to highlight there is overlap.
Comment 7 Chen Qi 2016-11-15 06:39:08 UTC
This bug seems obsolete. I'll check with Mark and the owner of 9675 to determine whether to close it or not.
Comment 8 Chen Qi 2017-03-09 09:29:12 UTC
As we've determined to switch to dnf. Close this bug as 'WONTFIX'.