vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.49k stars 96 forks source link

File conflict issue on RPM release #582

Open j0k2r opened 1 year ago

j0k2r commented 1 year ago

Description

$ dnf install ./electron-mail-5.1.3-linux-x86_64.rpm

Last metadata expiration check: 3:24:05 ago on Fri 27 Jan 2023 03:56:13 AM CET.
Dependencies resolved.
================================================================================
 Package              Architecture  Version           Repository           Size
================================================================================
Upgrading:
 electron-mail        x86_64        5.1.3-1           @commandline         92 M

Transaction Summary
================================================================================
Upgrade  1 Package

Total size: 92 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /usr/lib/.build-id/90/9d0b5007ba7bf20d9e4205235b3fe5a9f3309e from install of electron-mail-5.1.3-1.x86_64 conflicts with file from package insomnia-2022.7.5-1.x86_64

Reproduce

  1. install Insomnia core
  2. dnf install ./electron-mail-5.1.3-linux-x86_64.rpm
  3. above error happens

Expected behavior

The files /usr/lib/.build-id/* should not be included in the RPM.

Work around

Install via rpm directly, with --force flag:

$ sudo rpm -iU --force ./electron-mail-5.1.3-linux-x86_64.rpm

Fix

There is a way to disable generating .build-id in the RPM spec file: build_id_links

I don't know if there is a way to integrate that into electron-builder.