Bug 17023

Summary: Port mgarepo to python 3
Product: Mageia Reporter: papoteur <yvesbrungard>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Normal CC: olav
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: mgarepo CVE:
Status comment:

Description papoteur 2015-10-26 20:02:33 CET
magrepo needs to be ported to python3.


Reproducible: 

Steps to Reproduce:
papoteur 2015-10-26 20:37:36 CET

CC: (none) => olav

Comment 1 papoteur 2015-10-31 15:28:02 CET
I committed a first set of modifications in git.
As I'm not a packager, I have only tested commands which get informations from svn :
co
sync
getspec
rpmlog
changed

As cheetah template module is no available in Python 3, I replaced it by writing directly Changelog, without template usage.
In section template of the config file, "path" is no more useful. I added a "name" entry which can be set to "default" or "revno" to select two types of output, according to the previous templates default.chlog and revno.chlog.
I have update man page accordingly.
papoteur 2015-10-31 16:49:17 CET

Assignee: bugsquad => thierry.vignaud

Comment 2 Thierry Vignaud 2015-11-04 08:35:07 CET
Why do you assign this bug to me?
Comment 3 Rémi Verschelde 2015-11-04 08:40:19 CET
For review of his changes in git I guess.
Comment 4 Rémi Verschelde 2015-11-04 09:04:18 CET
BTW I tested the port and it's working relatively well, though there were some encoding issues when using putsrpm or commit, but Papoteur managed to fix them (also in current git HEAD).

I'll test the current HEAD further to hunt down possible regressions.
Comment 5 Olav Vitters 2015-11-04 09:14:27 CET
Awesome! I am interested in this as well. mgarepo uses various external Python modules. I thought already about avoiding that. It's also used server-side btw!
Comment 6 Olav Vitters 2015-11-04 18:37:33 CET
http://gitweb.mageia.org/software/build-system/mgarepo/commit/?id=938eaa61b14479745f0012a934e2e0814ff14f1a

This commit is not right. You should convert the input into utf-8 / strings. Then convert back as needed. Currently you're trying to keep it as bytes, that's not right.
Comment 7 Mageia Robot 2015-11-29 10:41:07 CET
commit aad29188ffc60b9b687ae8d6431f9d055af17f29
Author: Papoteur <papoteur@...>
Date:   Sun Nov 29 10:40:41 2015 +0100

    suppress standard output of executed command mga#17023
---
 Commit Link:
   http://gitweb.mageia.org/software/build-system/mgarepo/commit/?id=aad29188ffc60b9b687ae8d6431f9d055af17f29
Comment 8 Thierry Vignaud 2015-12-02 08:46:52 CET
Conversion to python3 has been done

Status: NEW => RESOLVED
Resolution: (none) => FIXED