electron-builder: DEB build created hardlinks which breaks when /opt is on a different drive

  • Version: 22.9.1
  • Electron Version: 9.x
  • Target: DEB

If /opt is on it’s own device the DEB installer throws errors when creating hardlinks:

Preparing to unpack .../beekeeper-studio_1.10.0_amd64.deb ...
Unpacking beekeeper-studio (1.10.0) over (1.9.4) ...
13dpkg: error processing archive /var/cache/apt/archives/beekeeper-studio_1.10.0
_amd64.deb (--unpack):
 error creating hard link './usr/share/icons/hicolor/24x24/apps/beekeeper-studio
.png': Invalid cross-device link
Errors were encountered while processing:
 /var/cache/apt/archives/beekeeper-studio_1.10.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is present in the app I maintain (Beekeeper Studio) and found for other electron apps hosted on GitHub:

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 5
  • Comments: 29 (2 by maintainers)

Most upvoted comments

I’m not aware of a single package that would require the user to set an environment variable prior to installation (except for the package manager itself, of course). Such things should be handled inside the package. And hardlinks are a bad idea anyway, since their usage implies an assumption about the target system that (obviously) isn’t always true. So please, after 4+ years, just fix this…