FS#63572 - [android-tools] unpack_bootimg shebang line should be python2

Attached to Project: Community Packages
Opened by oneup40 (oneup40) - Tuesday, 27 August 2019, 15:05 GMT
Last edited by Filipe Laíns (FFY00) - Friday, 30 August 2019, 07:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

The Python script unpack_bootimg assumes integer division when using '/' which was true in Python 2, but was changed to float division in Python 3. The script's shebang line should explicitly use Python 2 as this causes the script to break when run with Python 3.

Additional info:

* package version(s)
android-tools 29.0.2-1

* config and/or log files etc.
Traceback (most recent call last):
File "/usr/bin/unpack_bootimg", line 152, in <module>
main()
File "/usr/bin/unpack_bootimg", line 148, in main
unpack_bootimage(args)
File "/usr/bin/unpack_bootimg", line 127, in unpack_bootimage
os.path.join(args.out, image_info[2]))
File "/usr/bin/unpack_bootimg", line 35, in extract_image
bootimage.seek(offset)
TypeError: 'float' object cannot be interpreted as an integer

* link to upstream bug report, if any

Steps to reproduce:

Run unpack_bootimg on an Android bootimg.
This task depends upon

Closed by  Filipe Laíns (FFY00)
Friday, 30 August 2019, 07:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  29.0.2-2

Loading...