Control: tags -1 confirmed moreinfo

On 05/03/17 00:20, Simon McVittie wrote:
> Package: release.debian.org
> Severity: normal
> User: release.debian....@packages.debian.org
> Usertags: unblock
> 
> opentyrian (contrib) uses game-data-packager to package its data files
> (which are freely downloadable but proprietary, and not under a
> sufficiently clear license for non-free). If launched without those data
> files, at the moment it silently exits, making users think it has crashed
> (#856728, 'important' severity, which I think is proportionate).
> 
> Alexandre Detiste has contributed a patch to make opentyrian pop up an
> error message using one of several xmessage clones. Would that be OK for
> a stretch unblock?
> 
> Proposed debdiff attached.

> ++#ifdef TARGET_UNIX
> ++#define MISSING_TEXT "One or more of the required Tyrian " TYRIAN_VERSION " 
> data files could not be found.\n" \
> ++                     "These can be installed using game-data-packager.\n"
> ++    if (code == 1)
> ++    {
> ++            char* argv[6];
> ++            pid_t child_pid;
> ++            child_pid = fork();
> ++            if(child_pid == 0) {
> ++                    argv[0] = "zenity";
> ++                    argv[1] = "--error";
> ++                    argv[2] = "--text=" MISSING_TEXT;
> ++                    argv[3] = "--title=Tyrian";
> ++                    argv[4] = NULL;
> ++                    execvp(argv[0], argv);
> ++                    argv[0] = "kdialog";
> ++                    argv[2] = MISSING_TEXT;
> ++                    execvp(argv[0], argv);
> ++                    argv[0] = "xmessage";
> ++                    argv[1] = "-center";
> ++                    argv[3] = NULL;
> ++                    execvp(argv[0], argv);
> ++                    argv[0] = "notify-send";
> ++                    argv[1] = "Tyrian";
> ++                    argv[3] = "-i";
> ++                    argv[4] = "dialog-error";
> ++                    argv[5] = NULL;
> ++                    execvp(argv[0], argv);
> ++            }
> ++    }
> ++#endif

For a moment I was wondering how xmessage or notify-send were going to display
MISSING_TEXT, until I realized you were reusing some argv members...

Go ahead and remove the moreinfo tag once this is accepted and built.

Cheers,
Emilio

Reply via email to