Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstallation of Code Alpha left it in a bad state #5840

Closed
joaomoreno opened this issue Apr 26, 2016 · 4 comments
Closed

Reinstallation of Code Alpha left it in a bad state #5840

joaomoreno opened this issue Apr 26, 2016 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

joaomoreno commented Apr 26, 2016

Fixing #5463

I had Code Alpha installed in CentOS (red hat). Today, I downloaded the latest RPM, installed it and now I can't launch Code nor reinstall it.

It doesn't seem to be installed at all. It is also gone from the Applications menu, where it used to be before installing it today.

image

Can't even reinstall it:

image

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Apr 26, 2016
@joaomoreno
Copy link
Member Author

I could fix it by running sudo rpm -ev code-alpha and reinstalling the rpm package.

@Tyriar
Copy link
Member

Tyriar commented Apr 27, 2016

I think I've experienced this where the installer didn't work, it seemed like the installer's issue to me. It happened to me pretty consistently whenever I tried to install a second thing. Fresh restart and using it always seemed to work.

@Tyriar Tyriar added this to the Backlog milestone May 31, 2016
@Tyriar Tyriar added install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux labels May 31, 2016
@astitcher
Copy link
Contributor

astitcher commented Jun 7, 2016

This issue exists with the 1.2 released rpm too.

The cause is a misunderstanding about the order of running the scriptlets:

If you are upgrading the postuninstall scriptlet runs after the upgrade to uninstall anything left over in the old installation. In this case it is removing the /usr/bin/code (or code-alpha) link to /usr/share/code/bin/code just after it was created.

The postuninstall scriptlet needs to check whether an upgrade is being run and in that case just not do the remove.

I think the section should look like:

%postun
f [ $1 = 0 ]; then
  rm -f /usr/bin/code
fi

Also note that you shouldn't need sudo for any part of the rpm scripts as installing a package runs as root.

@Tyriar
Copy link
Member

Tyriar commented Jun 8, 2016

Should be fixed via PR from @astitcher

@Tyriar Tyriar closed this as completed Jun 8, 2016
@joaomoreno joaomoreno added the verified Verification succeeded label Sep 2, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants