FS#76575 - [pyzy] 1.1-1 has a broken database file
Attached to Project:
Community Packages
Opened by John Schoenick (Nephyrin) - Monday, 14 November 2022, 23:41 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 24 September 2023, 10:44 GMT
Opened by John Schoenick (Nephyrin) - Monday, 14 November 2022, 23:41 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 24 September 2023, 10:44 GMT
|
Details
Description:
It seems that the `pyzy` package, as of `1.1`, no longer comes with a valid database, resulting in it not working right. More info: Compare ``` $ pacman -Q --info pyzy Name : pyzy Version : 1.0-6 $ ls -l /usr/share/pyzy/db/ total 3356 -rw-r--r-- 1 root root 3432448 Mar 25 2021 android.db -rw-r--r-- 1 root root 2907 Mar 25 2021 create_index.sql ``` to ``` $ sudo pacman -Q --info pyzy Name : pyzy Version : 1.1-1 $ ls -l /usr/share/pyzy/db total 204 -rw-r--r-- 1 root root 204800 Sep 11 12:13 android.db -rw-r--r-- 1 root root 2907 Sep 11 12:13 create_index.sql ``` Cause: This seems to be due to a compilation error that doesn't result in the build failing, so it is not caught: ``` Making all in android make[4]: Entering directory '/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android' GEN android.db Traceback (most recent call last): File "/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android/./create_db.py", line 83, in <module> main() File "/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android/./create_db.py", line 80, in main create_db(sys.argv[1]) File "/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android/./create_db.py", line 51, in create_db records = list(read_phrases(filename)) File "/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android/./create_db.py", line 19, in read_phrases buf = file(filename).read() NameError: name 'file' is not defined. Did you mean: 'filter'? make[4]: Leaving directory '/home/foo/pyzy-1.1-1/src/pyzy-1.1/data/db/android' ``` This, in turn, seems to be because the upstream was switched to https://github.com/openSUSE/pyzy -- which seems to contain the bad patch, related to converting to python3. Note that despite being under github.com/openSUSE, this fork doesn't seem to be in use by openSUSE currently: https://software.opensuse.org/package/pyzy |
This task depends upon
These two issues in this report have been addressed in https://github.com/openSUSE/pyzy/pull/1 and https://github.com/openSUSE/pyzy/pull/2 and let's see if this fork will respond :/
Please let me know if pyzy 1.1-2 with these two patches makes it work.