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

Command ran by the RPM updater not working #8305

Closed
rastiqdev opened this issue Jul 8, 2024 · 3 comments · Fixed by #8311
Closed

Command ran by the RPM updater not working #8305

rastiqdev opened this issue Jul 8, 2024 · 3 comments · Fixed by #8311

Comments

@rastiqdev
Copy link
Contributor

rastiqdev commented Jul 8, 2024

  • Electron-Builder Version:
    24.13.3 (electron-updater 6.2.1)
  • Node Version:
    20.15.0
  • Electron Version:
    31.1.0
  • Electron Type (current, beta, nightly):
    current
  • Target:
    RPM

When an app from an RPM file updates, the command that electron-updater runs tries to uninstall the app by its name, then installs the new version's RPM file. However, (with the dnf package manager for example) it is not possible to do this, as we need the app's package name to uninstall it. On Electron apps it seems to be the name value in our package.json, but electron-updater tries to do this with the productName value from our electron-builder config.

So, the app just restarts on the same version and causes a bootloop if updates are on start, automatic and forced.

(I also do not understand the need to uninstall the app before installing the new version, as dnf, yum, and zypper all support updating apps from RPM files.)

@rastiqdev
Copy link
Contributor Author

(sorry, the productName seems to be from the package.json, but that doesn't change the fact that app.getName() shouldn't be used to get the package name of an app)

@mmaietta
Copy link
Collaborator

mmaietta commented Jul 9, 2024

(I also do not understand the need to uninstall the app before installing the new version, as dnf, yum, and zypper all support updating apps from RPM files.)

That's very interesting! Would you be willing to open up a PR with that change?

rastiqdev added a commit to rastiqdev/electron-builder that referenced this issue Jul 9, 2024
Stop uninstalling an app before it updates, as dnf, yum, and zypper all 
support updating an app from a .rpm, and because app.getName() returns 
the product name of the app instead of its package name. (electron-userland#8305)
rastiqdev added a commit to rastiqdev/electron-builder that referenced this issue Jul 9, 2024
Stop uninstalling an app before it updates, as dnf, yum, and zypper all 
support updating an app from a .rpm, and because app.getName() returns 
the product name of the app instead of its package name. (electron-userland#8305)
@rastiqdev
Copy link
Contributor Author

PR: #8311

@mmaietta mmaietta linked a pull request Jul 10, 2024 that will close this issue
mmaietta pushed a commit that referenced this issue Jul 10, 2024
Stop uninstalling an app before it updates, as dnf, yum, and zypper all 
support updating an app from a .rpm, and because app.getName() returns 
the product name of the app instead of its package name. (Fixes #8305)
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