You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reinstallation of Code Alpha left it in a bad state #5840
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.
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.
Activity
joaomoreno commentedon Apr 26, 2016
I could fix it by running
sudo rpm -ev code-alphaand reinstalling therpmpackage.Tyriar commentedon 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.
astitcher commentedon 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:
Also note that you shouldn't need sudo for any part of the rpm scripts as installing a package runs as root.
Tyriar commentedon Jun 8, 2016
Should be fixed via PR from Andrew Stitcher (@astitcher)