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.
@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.
Thank you, I will have a look at this during this week.
There was a problem hiding this comment.
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.
This is literally taken from unityhub-3.11.1.ebuild, but I will check this out.
There was a problem hiding this comment.
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.
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.
@spixi no need to hardcode, you can use ${PN} (no quotes) instead of unityhub
| dosym -r /opt/unityhub/unityhub /usr/bin/unityhub | ||
|
|
||
| xdg_desktop_database_update | ||
| xdg_mimeinfo_database_update |
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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.
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.