Skip to content

Allow users to opt-out of apt repository install #22145

Closed
@jandsu

Description

  • VSCode Version: Code 1.10.1 (653f873, 2017-03-02T00:47:58.633Z)
  • OS Version: Linux x64 4.4.0-64-generic
  • Extensions: not relevant

My team and I use Artifactory to cache locally the .deb files rather than downloading from the Internet over and over again.

The consequence is that a dev's box has a single sources.list file holding all the entries reading from the site-local cache rather than from the Internet.

This eventually leads to following error when installing VS Code:

$ sudo apt-get install code
...
/var/lib/dpkg/info/code.postinst: line 66: /etc/apt//sources.list.d/vscode.list: No such file or directory
dpkg: error processing package code (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 code
E: Sub-process /usr/bin/dpkg returned an error code (1)

Steps to Reproduce:

  1. Configure the GPG key and APT repository manually (inspired by https://code.visualstudio.com/docs/setup/linux#_installation but using other files / folders to suite needs of site-local cache)
  2. run sudo apt-get install code
  3. the script /var/lib/dpkg/info/code.postinst fails as shown above

==> this script seems to silently try to add the repo to the sources list of the user.

This is not the Ubuntu / Debian usual way

This may be a good idea for the .deb downloaded from the web site directly, but it should not be run when the user has already configured his system to grab VS Code from a repo (Microsoft's or another) somewhere.

How can you know if the repo is already configured?
You may run apt-cache madison code to check if VS Code can be found and where.

The key is that the user should not be forced to have the GPG key and the apt source configured as you expect, because some of them will simply have different requirements.

Thanks

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersinstall-updateVS Code installation and upgrade system issueslinuxIssues with VS Code on LinuxmitigatedIssue has workaround in placeverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions