FS#60401 - [hatari] atari-hd-image script doesn't work with Python 3

Attached to Project: Community Packages
Opened by Nicolas Guillaumin (nguillaumin) - Saturday, 13 October 2018, 18:32 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 18 April 2023, 08:25 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Laurent Carlier (lordheavy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Hatari comes with the atari-hd-image script to create a HDD image. Trying to run the script with a standard Arch install where Python 3 is the default results in a warning:

$ atari-hd-image 128 test.img

1) Create DOS Master Boot Record / partition table...
File "<stdin>", line 16
print "CHS: %3d,%3d,%3d @ $%x" % (c,h,s,idx)
^
SyntaxError: invalid syntax
od: test.img: No such file or directory

The script proceeds in creating the image, but the resulting image is invalid.

Editing the script and changing line 150 from "python" to "python2" makes it work.

Additional info:
* package version: 2.1.0-1

Steps to reproduce:
* Run atari-hd-image 128 test.img

This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 18 April 2023, 08:25 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Saturday, 12 September 2020, 18:40 GMT
/usr/bin/atari-convert-dir the python script called by /usr/bin/atari-hd-image was made python3 compatible by [1] first packaged in hatari 2.2.1-1.

Perhaps python should be added as an optdepends?

[1] https://git.tuxfamily.org/hatari/hatari.git/commit/tools/atari-convert-dir.py?id=8471b0da44c79219927ff47bf0a26acaf13a3f4d

Loading...