-
Notifications
You must be signed in to change notification settings - Fork 190
dev-games/unityhub: Fix startup issues #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thank for the PR. |
Thank you, I amended and force-pushed the commit. |
|
ping @StefanCristian @revanj as the maintainers of dev-games/unityhub |
Signed-off-by: spixi <[email protected]>
Will check later today. |
| dodir usr/bin | ||
| dosym -r /opt/unityhub/unityhub /usr/bin/unityhub | ||
|
|
||
| xdg_desktop_database_update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spixi Cannot be used in src_install.
`>>> Install dev-games/unityhub-3.11.1-r1 into /var/tmp/portage/dev-games/unityhub-3.11.1-r1/image
- ERROR: dev-games/unityhub-3.11.1-r1::guru failed (install phase):
- xdg_desktop_database_update must be used in pkg_post* phases.
- Call stack:
-
ebuild.sh, line 136: Called src_install - environment, line 611: Called xdg_desktop_database_update
- environment, line 1773: Called die
- The specific snippet of code:
-
die "xdg_desktop_database_update must be used in pkg_post* phases."; - If you need support, post the output of emerge --info '=dev-games/unityhub-3.11.1-r1::guru',
- the complete build log and the output of emerge -pqv '=dev-games/unityhub-3.11.1-r1::guru'.
- The complete build log is located at '/var/tmp/portage/dev-games/unityhub-3.11.1-r1/temp/build.log'.
- The ebuild environment file is located at '/var/tmp/portage/dev-games/unityhub-3.11.1-r1/temp/environment'.
- Working directory: '/var/tmp/portage/dev-games/unityhub-3.11.1-r1/work'
- S: '/var/tmp/portage/dev-games/unityhub-3.11.1-r1/work'`
Add them in pkg_post*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I will have a look at this during this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we inherit xdg, there is no reason to run these functions manually at all. The eclass exports pkg_preinst, pkg_postinst & pkg_postrm, and we don't overwrite them.
| mv usr/share/doc/{${PN},${P}} || die | ||
| mv ./* "${ED}" || die | ||
|
|
||
| dodir usr/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spixi you can use insinto /usr/bin here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is literally taken from unityhub-3.11.1.ebuild, but I will check this out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is literally taken from unityhub-3.11.1.ebuild, but I will check this out.
When we do changes, preferably we fix all the issues we can, and especially for the changes to be as public as possible. While in the process, we keep the discussions public as well 👍
Regrettably the older ebuild was replaced forcefully by someone else, but this is good timing to help out everyone who starts to contribute to Gentoo, to fix the old commiter's mistakes 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to use insinto.
This is a binary package, so we just move the contents over.
But we need to create the directory for dosym, as that it's not created automatically.
| mv ./* "${ED}" || die | ||
|
|
||
| dodir usr/bin | ||
| dosym -r /opt/unityhub/unityhub /usr/bin/unityhub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spixi no need to hardcode, you can use ${PN} (no quotes) instead of unityhub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| dosym -r /opt/unityhub/unityhub /usr/bin/unityhub | ||
|
|
||
| xdg_desktop_database_update | ||
| xdg_mimeinfo_database_update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing this out. I will move the xdg steps to pkg_postinst (and pkg_postrm).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, you can just remove it. In this case should be enough inheriting xdg eclass as it already exports the relevant functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, you can just remove it. In this case should be enough inheriting xdg eclass as it already exports the relevant functions.
If the previous ebuild (that already had xdg) was not effective, we might need further investigation on why it's not configured properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested and it is already working. When merging or unmerging it shows:
* Updating .desktop files database ... [ ok ]
* Updating icons cache ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested and it is already working. When merging or unmerging it shows:
* Updating .desktop files database ... [ ok ] * Updating icons cache ...
I was as well under the impression it was working before, yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange. For me it did not register the unityhub URI scheme, which had the following effect:
- UnityHub starts (after fixing the TMPDIR issue)
- Firefox opens for credential request
- No callback from Firefox to UnityHub
I had to run xdg-mime default unityhub.desktop x-scheme-handler/unityhub manually to fix this issue.
I will investigate this further. Sorry for the inconvenience so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icon correctly appeared in mate-menu, but I had to edit the .desktop file in mozo, because of the noexec TMPDIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange. For me it did not register the unityhub URI scheme, which had the following effect:
- UnityHub starts (after fixing the TMPDIR issue)
- Firefox opens for credential request
- No callback from Firefox to UnityHub
I had to run
xdg-mime default unityhub.desktop x-scheme-handler/unityhubmanually to fix this issue.I will investigate this further. Sorry for the inconvenience so far.
No inconvenience! I was just wondering why did your portage not get that error with src_install() xdg 🤔
/tmpis often mounted as noexec, but required for Node.js to be executable. Starting UnityHub with a noexec TMPDIR will fail.Therefore, I suggest changing
Exec=/opt/unityhub/unityhub %Uto
Exec=env TMPDIR=/var/tmp /opt/unityhub/unityhub %UMoreover, the URI scheme is not installed correctly, however, the
unityhubscheme is required for the logon process. There is a missing update to the XDG mimetype database.This commit will fix both issues.