Skip to content

Test: Users can opt out of apt repository #226675

Closed

Description

Refs: #22145

Complexity: 4

Create Issue


The latest VS Code Insiders Debian package contains a debconf configuration in order for users to configure whether the package adds a reference to the packages.microsoft.com repository after being installed. As a result, users who prefer to have or already have a custom apt setup have the ability to stop VS Code from automatically adding the reference, which could otherwise interfere with their setup.

You can use an Ubuntu WSL instance for this TPI.

  1. Download the .deb from https://code.visualstudio.com/insiders/#linux.
  2. In a terminal, run sudo dpkg -i <nameOfDeb>.deb to install the Debian file.
  3. If there is an alert about missing dependencies, run sudo apt-get -f install.
  4. A dialog should pop up asking whether you want to add the Microsoft repository and signing key. Previously, the post-install script would automatically set those up for you.
  5. Select Yes.
  6. Confirm that cat /etc/apt/sources.list.d/vscode.list mentions https://packages.microsoft.com/repos/code and that file /etc/apt/trusted.gpg.d/microsoft.gpg runs sucessfully.
  7. Run sudo dpkg -i <nameOfDeb>.deb again.
  8. Confirm that the dialog does not show up again.
  9. Run sudo dpkg -r code-insiders to remove the package.
  10. Confirm that /etc/apt/sources.list.d/vscode.list and /etc/apt/trusted.gpg.d/microsoft.gpg don't exist.
  11. Run sudo dpkg -i <nameOfDeb>.deb again.
  12. Confirm that the dialog does not show up again.
  13. Confirm that cat /etc/apt/sources.list.d/vscode.list mentions https://packages.microsoft.com/repos/code and file /etc/apt/trusted.gpg.d/microsoft.gpg runs sucessfully.
  14. Run sudo dpkg -P code-insiders to purge the package.
  15. Confirm that /etc/apt/sources.list.d/vscode.list and /etc/apt/trusted.gpg.d/microsoft.gpg don't exist.
  16. Run sudo dpkg -i <nameOfDeb>.deb to install the Debian package again.
  17. A dialog should pop up asking whether you want to add the Microsoft repository and signing key.
  18. Select No.
  19. Confirm that /etc/apt/sources.list.d/vscode.list and /etc/apt/trusted.gpg.d/microsoft.gpg don't exist.
  20. Run sudo dpkg -i <nameOfDeb>.deb again.
  21. Confirm that the dialog does not show up again.
  22. Confirm that /etc/apt/sources.list.d/vscode.list and /etc/apt/trusted.gpg.d/microsoft.gpg don't exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions