Skip to content

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

Closed

Description

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

Activity

  1. joaomoreno commented on Apr 26, 2016

    @joaomoreno
    ContributorAuthor

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

  2. Tyriar commented on Apr 27, 2016

    @Tyriar
    Contributor

    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.

  3. added this to the Backlog milestone on May 31, 2016
  4. astitcher commented on Jun 7, 2016

    @astitcher
    Contributor

    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.

  5. Tyriar commented on Jun 8, 2016

    @Tyriar
    Contributor

    Should be fixed via PR from Andrew Stitcher (@astitcher)

  6. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginstall-updateVS Code installation and upgrade system issueslinuxIssues with VS Code on LinuxverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions