Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#28045 - [pkgtools] drop python 2 for all scripts in package

Attached to Project: Community Packages
Opened by solsTiCe (zebul666) - Sunday, 22 January 2012, 10:13 GMT
Last edited by Alexander F. Rødseth (xyproto) - Tuesday, 21 February 2012, 07:31 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Gavin Bisesi (Daenyth)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

this is rather weird that the main script pkgfile is using python 3 while some other ones are still using python 2.

especially that pkgconflict is a little script and could be easily converted to python 3

here is the ouput of 2to3 on pkgconflict

$ 2to3 /usr/bin/pkgconflict
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored /usr/bin/pkgconflict
--- /usr/bin/pkgconflict (original)
+++ /usr/bin/pkgconflict (refactored)
@@ -60,7 +60,7 @@
for package in packages:
listfile = open(os.path.join(repopath, package, 'files'))
listfile.readline() # discard the %files% line
- for entry in filter(isfilename, map(chomp, listfile.readlines())):
+ for entry in filter(isfilename, list(map(chomp, listfile.readlines()))):
known_files[entry] = (repo, package)
listfile.close()
return known_files
@@ -91,4 +91,4 @@
for file in pkg_contents:
if file in known_files:
(repo, package) = known_files[file]
- print "%s already provided by the %s package from [%s]" % (file, package, repo)
+ print("%s already provided by the %s package from [%s]" % (file, package, repo))
RefactoringTool: Files that need to be modified:
RefactoringTool: /usr/bin/pkgconflict
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Tuesday, 21 February 2012, 07:31 GMT
Reason for closing:  Fixed
Additional comments about closing:  All the .py files in pkgtools.git are for python 3 now, and all the .py files included in the pkgtools package use #!/usr/bin/env python.
Comment by solsTiCe (zebul666) - Sunday, 22 January 2012, 10:14 GMT
oooops: I mean drop python 2 depends for [pkgtools] package
Comment by Gavin Bisesi (Daenyth) - Sunday, 22 January 2012, 15:28 GMT
Mostly it's just because the other scripts are user-contributed and not made by me. I haven't had the time to investigate it really. This is more of an upstream thing - the package is technically correct. Please open a ticket on github (and a pull request would be really really nice too ;) )

Loading...