Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828914 - games-action/multimc-bin missing dependency
Summary: games-action/multimc-bin missing dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Nowa Ammerlaan
URL: https://github.com/MultiMC/Launcher/i...
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-12-11 11:21 UTC by Stephen Mollett
Modified: 2021-12-13 08:14 UTC (History)
2 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 Stephen Mollett 2021-12-11 11:21:12 UTC
The launcher script (/opt/multimc/run.sh) which is installed by games-action/multimc-bin uses zenity to display a progress bar during the initial download of the MultiMC binary. If gnome-extra/zenity is not installed, the script will fail (silently if run using the desktop menu entry). Running it from the console gives:

----
$ /opt/multimc/run.sh 
/opt/multimc/run.sh: line 16: zenity: command not found
tar (child): mmc-stable-lin64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
rm: cannot remove 'mmc-stable-lin64.tar.gz': No such file or directory
chmod: cannot access 'MultiMC': No such file or directory
/opt/multimc/run.sh: line 25: ./MultiMC: No such file or directory
----

After emerging gnome-extra/zenity, the launcher works as expected.

Either a dependency on gnome-extra/zenity should be added to the ebuild or perhaps, given that MultiMC is a Qt-based application, x11-misc/qarma could be used instead of zenity, although unfortunately it's not quite a drop-in replacement so will require a few tweaks to the regexp for two reasons:

1) It doesn't understand numbers suffixed with '%' (!)

2) It doesn't exit when the pipe breaks. The regexp never outputs '100' (so --auto-close doesn't work) because the final line of wget progress output is different from the rest:
  3450K .......... .......... .......... .......... .......... 99% 8.87M 0s
  3500K ....                                                  100% 19.0M=0.4s
Note the '=' character which prevents the regexp from matching.

The sed command I've got to work is:
sed -u 's/.* \([0-9]\+\)%\ \+\([0-9.]\+.\)[ =]\(.*\)/\1\n# Downloading at \2\/s, ETA \3/'

This still works with zenity so we could have an either-or dependency plus some logic in the script to use whichever one exists.
Comment 1 Andrew Nowa Ammerlaan gentoo-dev 2021-12-11 20:24:38 UTC
Thanks for looking into the zenity/qarma thing. It would be very nice indeed if we can avoid gnome/gtk deps in a qt app. Could you please open an issue or pull request upstream[1] so we can track this there? I would prefer to not have to maintain a patch for qarma compatibility within ::gentoo, moreover this problem is not gentoo specific so by taking this upstream we can solve it on other distros as well.

[1] https://github.com/MultiMC/Launcher/issues
Comment 2 Larry the Git Cow gentoo-dev 2021-12-11 20:44:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31782c3e19777e7ee8a76541f76eca75ca65a20d

commit 31782c3e19777e7ee8a76541f76eca75ca65a20d
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2021-12-11 20:43:55 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2021-12-11 20:44:49 +0000

    games-action/multimc-bin: add missing dep
    
    - add dep on zenity (TODO: make this work with qt alternative for zentiy: qarma)
    - drop our sed's to differentiate between multimc and multimc-bin since we are
            dropping the non-bin version anyway
    - block against multimc-bin
    - add bindist restriction to be safe
    - keyword for x86, the desktop file runs a ~20 line script that fetches either
            a 32 or 64 bit binary from upstream so this works on x86 as well
    - add convenience symlink to be able to launch the app from cli as well
    
    Closes: https://bugs.gentoo.org/828914
    Package-Manager: Portage-3.0.29, Repoman-3.0.3
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 ...in-1.6.1.ebuild => multimc-bin-1.6.1-r1.ebuild} | 30 ++++++++++++++--------
 1 file changed, 20 insertions(+), 10 deletions(-)
Comment 3 Stephen Mollett 2021-12-12 11:25:11 UTC
For reference - opened upstream issue #4344 - https://github.com/MultiMC/Launcher/issues/4344
Comment 4 Andrew Nowa Ammerlaan gentoo-dev 2021-12-13 08:14:06 UTC
(In reply to Stephen Mollett from comment #3)
> For reference - opened upstream issue #4344 -
> https://github.com/MultiMC/Launcher/issues/4344

Awesome, Thanks!