Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601200 - games-misc/katawa-shoujo: set proper slot for renpy dep
Summary: games-misc/katawa-shoujo: set proper slot for renpy dep
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alex Xu (Hello71)
URL:
Whiteboard:
Keywords:
Depends on: 587872 625624
Blocks: 575086
  Show dependency tree
 
Reported: 2016-11-29 12:13 UTC by Pacho Ramos
Modified: 2018-04-15 13:07 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2016-11-29 12:13:40 UTC
We should try to use games-engines/renpy:6.99 if possible as older slot is broken with recent ffmpeg... but reading the deps in the ebuild is not clear what version can it use. Can it be clarified and set proper slot dep in the ebuild
Comment 1 Alex Xu (Hello71) 2016-11-29 14:00:16 UTC
according to upstream (both) the only supported configuration is using the bundled Ren'Py version. there was a bug relating to incompatibility of saves between different versions at some point, but otherwise switching versions kinda-works. I cannot remember why system-renpy is default on (although it is quite likely that I was the one who set it that way).
Comment 2 Pacho Ramos gentoo-dev 2016-11-29 19:53:12 UTC
Probably is default because system libs are most of the times preferred :), we could then use the slot that bundled lib is using then :/
Comment 3 Alex Xu (Hello71) 2016-11-30 13:52:53 UTC
it is possible that some bugs or other were fixed by the new version. it's been so long that I don't know which, or if that's actually the case.
Comment 4 Pacho Ramos gentoo-dev 2016-12-04 10:41:31 UTC
I don't know... as a side note, it seems that on ArchLinux they are able to use 1.3.1 version with renpy:6.99:
https://aur.archlinux.org/packages/katawa-shoujo/

But not in FreeBSD... then I don't know what to do as I don't know much about this package :|
https://www.freshports.org/games/katawa-shoujo/
Comment 5 Pavel Volkov 2016-12-17 11:48:53 UTC
It's me who reported the previous bug (save incompatibility and in-game video playback problem).
Since I still haven't fully played this game, I'll do it soon with renpy 6.99 and report back :)
Comment 6 Pavel Volkov 2016-12-17 16:54:37 UTC
For now I can't compile neither Ren'Py version...
Comment 7 thexzoron 2017-01-30 22:34:22 UTC
https://www.archlinux.org/packages/community/x86_64/renpy/ It appears that Arch Linux is using a newer version of renpy (6.99.12) than that is shipped in portage (6.99.6) perhaps a bump is required on whoever maintains that's  part :/
Comment 8 Pavel Volkov 2017-04-04 05:43:11 UTC
Somehow it crashes with Ren'Py 6.99.12:

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/ui_settings.rpy", line 21, in <module>
  File "renpy/common/00compat.rpy", line 134, in _set_script_version
    config.window_auto_hide.remove("call screen")
ValueError: list.remove(x): x not in list

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "/home/rondo/ui_settings.rpyc", line 2, in script
  File "/usr/lib64/python2.7/site-packages/renpy699/renpy/ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/usr/lib64/python2.7/site-packages/renpy699/renpy/python.py", line 1695, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/ui_settings.rpy", line 21, in <module>
  File "/usr/lib64/python2.7/site-packages/renpy699/renpy/defaultstore.py", line 92, in __setattr__
    renpy.store._set_script_version(value)  # E1101 @UndefinedVariable
  File "renpy/common/00compat.rpy", line 134, in _set_script_version
    config.window_auto_hide.remove("call screen")
  File "/usr/lib64/python2.7/site-packages/renpy699/renpy/python.py", line 610, in do_mutation
    return method(self, *args, **kwargs)
ValueError: list.remove(x): x not in list

Linux-4.10.8-gentoomelf-x86_64-Intel-R-_Core-TM-_i5-2400_CPU_@_3.10GHz-with-gentoo-2.3
Ren'Py 6.99.12.2003
Comment 9 Andrew Savchenko gentoo-dev 2017-07-15 23:32:24 UTC
(In reply to Pavel Volkov from comment #8)
> Somehow it crashes with Ren'Py 6.99.12:
> 
> I'm sorry, but an uncaught exception occurred.
> 
> While running game code:
>   File "game/ui_settings.rpy", line 21, in <module>
>   File "renpy/common/00compat.rpy", line 134, in _set_script_version
>     config.window_auto_hide.remove("call screen")
> ValueError: list.remove(x): x not in list

I see the same problem with 6.99.12.4 which is now in the tree. I wonder how Arch was able to overcome this. Apparently ui_settings.rpyc needs a fix or workaround.

Another guess is that our SLOT splitting causes this trouble, because it is very intrusive; I will check this later.
Comment 10 Andrew Savchenko gentoo-dev 2017-07-15 23:36:33 UTC
(In reply to Andrew Savchenko from comment #9)
> I see the same problem with 6.99.12.4 which is now in the tree. I wonder how
> Arch was able to overcome this. Apparently ui_settings.rpyc needs a fix or
> workaround.

They have not: https://aur.archlinux.org/packages/katawa-shoujo/
as can be seen from comments, user experience the very same error.
Comment 11 Maks Verver 2017-07-16 12:45:13 UTC
(In reply to Pavel Volkov from comment #8)
> Somehow it crashes with Ren'Py 6.99.12:
> 
> I'm sorry, but an uncaught exception occurred.
> 
> While running game code:
>   File "game/ui_settings.rpy", line 21, in <module>
>   File "renpy/common/00compat.rpy", line 134, in _set_script_version
>     config.window_auto_hide.remove("call screen")
> ValueError: list.remove(x): x not in list


I discovered a very simple solution to this, and fixed the PKGBUILD on AUR: https://gist.github.com/maksverver/6bb02c95e8365b2eba36b47c4415a9ae

tl;dr:

  rm game/script_version.rpy{,c}

I don't run Gentoo anymore, but I'm sure someone can make a similar change to the ebuild script.
Comment 12 Andrew Savchenko gentoo-dev 2017-07-16 13:45:40 UTC
(In reply to Maks Verver from comment #11)
>   rm game/script_version.rpy{,c}

No, this is very bad solution: it removes version information about what RenPy version was used to create the game, this leads to assumption that the latest one is used and thus disables all compatibility layer which will cause other problems.

The real solution is to fix bug within compatibility layer, which I've done locally. I'm now testing it for regression and will push to the tree soon.
Comment 13 Maks Verver 2017-07-16 14:07:35 UTC
(In reply to Andrew Savchenko from comment #12)
> No, this is very bad solution: it removes version information about what
> RenPy version was used to create the game, this leads to assumption that the
> latest one is used and thus disables all compatibility layer which will
> cause other problems.

That would be the case if script_version.rpy was the only place where the config version was set, but then we wouldn't get the crash.

The reason for the crash is that gui_settings.rpy sets the version again after it has been set by script_version.rpy. (Even worse: these two scripts use different versions: gui_settings.rpy uses a lower version than script_version.py.)

If the script_version.rpy is removed, gui_settings.rpy will still set config.version correctly, and we do get the compatible behavior.

> The real solution is to fix bug within compatibility layer, which I've done
> locally. I'm now testing it for regression and will push to the tree soon.

If you fix the remove() call (making it not crash if it fails), that would also fix the crash, but that doesn't make it safe to set the version more than once. Specifically, when you call it first with a lower version and then with a higher version, you wouldn't get back the settings that were removed in the first call. So it seems like setting config.version more than once isn't really supported by Ren'Py, and it's easier to fix Katawa Shoujo not to do that.
Comment 14 Andrew Savchenko gentoo-dev 2017-07-16 16:40:09 UTC
(In reply to Maks Verver from comment #13)
> If you fix the remove() call (making it not crash if it fails), that would
> also fix the crash, but that doesn't make it safe to set the version more
> than once. Specifically, when you call it first with a lower version and
> then with a higher version, you wouldn't get back the settings that were
> removed in the first call. So it seems like setting config.version more than
> once isn't really supported by Ren'Py, and it's easier to fix Katawa Shoujo
> not to do that.

Other games may have similar problems as well, better fix it in one place once and for all.

Fix is added to games-engines/renpy-6.99.12.4-r1.ebuild. I'm not katawa-shoujo maintainer, so its up for maintainers what to do next, at least until some deadline.

@maintainers, what do you think on removing slots from renpy? Upstream doesn't support older versions and it seems it is easier to support proper old games in the latest renpy, than to support old renpy versions.
Comment 15 James Le Cuirot gentoo-dev 2017-07-16 17:35:40 UTC
(In reply to Andrew Savchenko from comment #14)
> @maintainers, what do you think on removing slots from renpy? Upstream
> doesn't support older versions and it seems it is easier to support proper
> old games in the latest renpy, than to support old renpy versions.

I you think that's feasible then I support that approach.
Comment 16 Andrew Savchenko gentoo-dev 2017-07-18 20:37:05 UTC
katawa-shoujo-1.3.1 works fine with system-renpy and ~renpy-6.99.12.4. So I removed package.use.mask for system-renpy.

renpy-6.99.12.4 is not yet stable however, I'm not sure if I can file a stabilization request right now, since it is too young in the tree. OTOH 6.17 version is utterly broken.
Comment 17 Pacho Ramos gentoo-dev 2018-04-15 13:07:12 UTC
[master 082acac5a57b] games-misc/katawa-shoujo: Use newer renpy (#601200)
 1 file changed, 84 insertions(+)
 create mode 100644 games-misc/katawa-shoujo/katawa-shoujo-1.3.1-r1.ebuild