Vscode: Linux update flow is not very user friendly

Created on 1 Jun 2016  路  17Comments  路  Source: microsoft/vscode

When I start my Code on Linux I always get the notification that an update is available but that notification just points me to the general download location, not the right build for my update channel.

Can we not just download the right RPM/DEB package in the background and open it using the package manager, similar to how we do it on windows with the installer?

/cc @joaomoreno

install-update linux

Most helpful comment

@bpasero You can also upgrade specific single packages using package manager, for apt it is 'apt-get install --only-upgrade mypackage' iirc. If you leave out the '--only-upgrade' parameter, it will install the package if it isnt already installed.

So basically you'd have 'sudo apt-get install vscode' (or whatever the package is called), and it is done.

With dnf it is a more intuitive command with 'dnf upgrade vscode'.

Btw, for solving the issue of updates breaking your VM, you could just use 'apt-mark hold mypackage' to exclude the package from updates, but still be able to update everything else normally. That requires you to know what exactly the problematic package is though. You can remove the hold with 'apt-mark unhold mypackage' again.

All 17 comments

The smoothness is still blocked by signing, I feel like just doing it ourselves and owning the keys.

@Tyriar even with signed bits, I would like to just click a button in VS Code that downloads the package and opens the package manager to run the update.

@bpasero when the repo is signed it will be the OS notifying the user, not VS Code. Then just launch the updater and press the button just like with the majority of the software on the system.

There is potential to streamline this further but it would come after the repo is signed. For example show a message box which runs sudo apt-get update && sudo apt-get install -y code (on Ubuntu anyhow) after an admin prompt then restarts code.

@Tyriar note that i have any update info disabled on my Ubuntu because I had it so many times that an update would totally break my Linux in Parallels. I would still prefer a way to do this from within the application.

How does Chrome do it?

@bpasero our system is modeled basically exactly after how Chrome's works. It's what Atom has been wanting to do as well.

So you can not update from within the application?

@bpasero I'd think it's unwise to go against convention for starters and roll our own update system. Calling into apt-get, or whatever the OS' package management system is (if it can be detected) from within VS Code seems achievable.

Users do have a choice in package managers though, so we may try to update via apt-get when it was installed using aptitude or something. Apparently this was a problem in the past but not anymore, but that's just one example.

@bpasero The current solution is also temporary. Would a Do not ask again for this version button work?

There's a "never show again" button which seems to work fine?

Oh... @bpasero ?

@Tyriar @joaomoreno I am used to an experience for update where I acknowledge the update from within VS Code and it runs. Currently on Linux I never update because this experience does not exist. I am asking to make the same experience possible on Linux for stable and insiders.

Just to add my 2垄, the preferred experience on Linux is that the package manager takes care of updating installed packages, and applications do not interfere with it.

In my opinion, an application should not even try to call the package manager to try triggering an update, since it is not the concern of the application if or when the package management does the updating.

No offense, but handling updating in the application itself is bad practice on Linux, imho.

Edit: That is not saying that a notification to the user is a bad idea, say "we found you haven't got the newest version yet, please check your package management for updates".

Yeah don't take my point of view as general Linux behaviour, I just disabled any automatic updates in the package manager because applying them always nukes my Linux VM.

I think if I had an action from the update message that just opens the package manager for me to do the right clicks to perform the update is also totally fine.

@bpasero You can also upgrade specific single packages using package manager, for apt it is 'apt-get install --only-upgrade mypackage' iirc. If you leave out the '--only-upgrade' parameter, it will install the package if it isnt already installed.

So basically you'd have 'sudo apt-get install vscode' (or whatever the package is called), and it is done.

With dnf it is a more intuitive command with 'dnf upgrade vscode'.

Btw, for solving the issue of updates breaking your VM, you could just use 'apt-mark hold mypackage' to exclude the package from updates, but still be able to update everything else normally. That requires you to know what exactly the problematic package is though. You can remove the hold with 'apt-mark unhold mypackage' again.

I think we should still leave the in-app notification in but delay it a week or so, so it only annoys people who aren't updating their OS. I'm going to close this since #229 and #2973 already exist.

@Tyriar can we at least directly link to the right deb package from the update notification? I think that would speed up my update flow quite a bit because it could just download after click via browser and then when I open it the update happens from the package manager.

@bpasero right now it's powered by updateUrl in product.json, there would need to be a different value for each 3 builds (deb, rpm, tar.xz) but they all share the build assets. Seems like a mess to get into fiddling with that as then the gulp task vscode-linux-x64 would need to be split into 3 tasks different tasks just for the product.json. Messing with product.json after it's built could cause weird race condition issues otherwise.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sirius1024 picture sirius1024  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

biij5698 picture biij5698  路  3Comments

ryan-wong picture ryan-wong  路  3Comments