- VSCode Version: 1.53.0
- OS Version: Ubuntu Linux 20.04
Steps to Reproduce:
- install .deb package
Does this issue occur when all extensions are disabled?: Yes
I’d like to resurrect #37762: the checksums for .desktop files included in the .deb archive fail to pass post-install.
$ debsums -s code debsums: changed file /usr/share/applications/code.desktop (from code package) debsums: changed file /usr/share/applications/code-url-handler.desktop (from code package)
This happens because the postinst script calls
desktop-file-install for the .desktop files, which adds an
X-Desktop-File-Install-Version entry to them, and hence the checksums change.
I don’t know why the
desktop-file-install call is there, as including the .desktop files in the deb archive is sufficient to have them installed (in their proper place under /usr/share/applications/), with the checksum intact.
I built the package with just those
desktop-file-install calls removed (see below), after which the checksums pass post-install (with no other changes that I can see).
diff --git a/resources/linux/debian/postinst.template b/resources/linux/debian/postinst.template index c72fe5f9f5..dcc147de93 100755 --- a/resources/linux/debian/postinst.template +++ b/resources/linux/debian/postinst.template @@ -12,12 +12,6 @@ ln -s /usr/share/@@NAME@@/bin/@@NAME@@ /usr/bin/@@NAME@@ # developers would prefer a terminal editor as the default. update-alternatives --install /usr/bin/editor editor /usr/bin/@@NAME@@ 0 -# Install the desktop entry -if hash desktop-file-install 2>/dev/null; then - desktop-file-install /usr/share/applications/@@NAME@@.desktop - desktop-file-install /usr/share/applications/@@NAME@@-url-handler.desktop -fi - # Update mimetype database to pickup workspace mimetype if hash update-mime-database 2>/dev/null; then update-mime-database /usr/share/mime