commit:     973ad60d28d19f15a983708e476b1a744fab89d1
Author:     Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
AuthorDate: Sun Feb  7 23:12:50 2021 +0000
Commit:     Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
CommitDate: Sun Feb  7 23:13:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=973ad60d

app-editors/visual-studio-code-bin: fix issues on desktop files

Closes: https://bugs.gentoo.org/769344
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com>

 .../visual-studio-code-bin-1.53.0.ebuild                      | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git 
a/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.53.0.ebuild 
b/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.53.0.ebuild
index 4d781191..e36c20b3 100644
--- a/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.53.0.ebuild
+++ b/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.53.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit desktop eutils pax-utils
+inherit desktop eutils pax-utils xdg
 
 DESCRIPTION="Multiplatform Visual Studio Code from Microsoft"
 HOMEPAGE="https://code.visualstudio.com";
@@ -60,7 +60,7 @@ src_install() {
        insinto "/opt/${PN}"
        doins -r *
        fperms +x /opt/${PN}/{,bin/}code
-       dosym "../../opt/${PN}/bin/code" "usr/bin/${PN}"
+       dosym "../../opt/${PN}/bin/code" "usr/bin/code"
        domenu "${FILESDIR}/code.desktop"
        domenu "${FILESDIR}/code-url-handler.desktop"
        dodoc "resources/app/LICENSE.rtf"
@@ -68,6 +68,13 @@ src_install() {
 }
 
 pkg_postinst() {
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
        elog "You may want to install some additional utils, check in:"
        elog "https://code.visualstudio.com/Docs/setup#_additional-tools";
 }
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+}

Reply via email to