Skip to content

[Bug]: RPM Install Should Include Upgrade Flag #5383

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

Closed
4 tasks done
shawnweeks opened this issue Jul 26, 2022 · 3 comments · Fixed by #5588
Closed
4 tasks done

[Bug]: RPM Install Should Include Upgrade Flag #5383

shawnweeks opened this issue Jul 26, 2022 · 3 comments · Fixed by #5588
Milestone

Comments

@shawnweeks
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: All
  • Local OS: MacOS 12.4
  • Remote OS: Rocky 8
  • Remote Architecture: x86 64
  • code-server --version: 4.5.1 97d1703 with Code 1.68.1

The issue from #2347 has never been resolved. We should update our install script to include the -U option when doing upgrades otherwise every upgrade on an EL distro will require manually re-running the rpm command to apply the update

Steps to Reproduce

  1. Install code-server using curl -fsSL https://code-server.dev/install.sh | sh
  2. Wait for an update to come out
  3. Try an install the upgrade using the same command curl -fsSL https://code-server.dev/install.sh | sh

Expected

Upgrade should apply

Actual

Error messages like these

file /usr/lib/code-server/out/node/wsRouter.js from install of code-server-0:4.5.1-1.x86_64 conflicts with file from package code-server-0:4.4.0-1.x86_64
file /usr/lib/code-server/out/node/wsRouter.js.map from install of code-server-0:4.5.1-1.x86_64 conflicts with file from package code-server-0:4.4.0-1.x86_64
file /usr/lib/code-server/package.json from install of code-server-0:4.5.1-1.x86_64 conflicts with file from package code-server-0:4.4.0-1.x86_64
file /usr/lib/code-server/postinstall.sh from install of code-server-0:4.5.1-1.x86_64 conflicts with file from package code-server-0:4.4.0-1.x86_64
file /usr/lib/code-server/yarn.lock from install of code-server-0:4.5.1-1.x86_64 conflicts with file from package code-server-0:4.4.0-1.x86_64

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

@shawnweeks shawnweeks added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Jul 26, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 1, 2022

The issue from #2347 has never been resolved. We should update our install script to include the -U option when doing upgrades otherwise every upgrade on an EL distro will require manually re-running the rpm command to apply the update

I'm not as familiar with RPM. Are you suggesting we include the -U in our install script here?

If so, would you be interested in submitting a PR?

@shawnweeks
Copy link
Contributor Author

shawnweeks commented Aug 1, 2022

Yeah, your rpm command should be rpm -U instead of rpm -i at https://github.com/coder/code-server/blob/main/install.sh#L367. The only difference between the two options is -U upgrades the package and removes the previous version if it's already installed otherwise it is the same as -i. This avoids the issue with files from the previous version conflicting with the new version. I'll see if I can workup a PR in the morning.

@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 3, 2022

Oh cool! TIL! Thanks for explaining that.

I'll see if I can workup a PR in the morning.

That would be awesome!

@jsjoeio jsjoeio added help-wanted and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Aug 3, 2022
@jsjoeio jsjoeio added this to the On Deck milestone Aug 3, 2022
@jsjoeio jsjoeio modified the milestones: On Deck, September 2022 Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants