Skip to content

Skip unchanged mime database updates#318436

Open
aydinomer00 wants to merge 1 commit into
microsoft:mainfrom
aydinomer00:codex-skip-unchanged-mime-db-update
Open

Skip unchanged mime database updates#318436
aydinomer00 wants to merge 1 commit into
microsoft:mainfrom
aydinomer00:codex-skip-unchanged-mime-db-update

Conversation

@aydinomer00
Copy link
Copy Markdown

Fixes #163690

This updates the Linux package scripts to pass -n to update-mime-database.

The -n option skips rebuilding the MIME database when it is already up to date, which avoids unnecessary work during package install/update/removal. The Debian package scripts are updated for the reported issue, and the RPM script is updated for consistency.

Validation:

  • git diff --check
  • bash -n resources/linux/debian/postinst.template
  • bash -n resources/linux/debian/postrm.template
  • nvm use && node --experimental-strip-types build/hygiene.ts resources/linux/debian/postinst.template resources/linux/debian/postrm.template resources/linux/rpm/code.spec.template

Copilot AI review requested due to automatic review settings May 26, 2026 21:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds the -n flag to update-mime-database invocations in Linux package install/uninstall scripts to skip processing the deprecated .desktop files in the MIME database (improves speed and aligns with modern usage).

Changes:

  • Pass -n to update-mime-database in Debian postinst/postrm templates.
  • Pass -n to update-mime-database in the RPM spec template (post and postun).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
resources/linux/debian/postinst.template Add -n flag on install to skip deprecated processing.
resources/linux/debian/postrm.template Add -n flag on removal to skip deprecated processing.
resources/linux/rpm/code.spec.template Add -n flag in both %post and %postun invocations.

@vs-code-engineering
Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@rzhao271

Matched files:

  • resources/linux/debian/postinst.template
  • resources/linux/debian/postrm.template
  • resources/linux/rpm/code.spec.template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow updates on Debian GNU/Linux

3 participants