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
I wish to retain symbolic links made during install, on update.
During a package upgrade process, because the new package gets installed before the old package gets uninstalled, I've found that symlinks made by the post script of the new package are then deleted by the postuninstall script of the old package (as the symlinks are the same in both packages).
This behaviour could not be overwritten because in com.typesafe.sbt.packager.rpm.RpmMetadata.writeSpec(rpmRoot: File, tmpRoot: File) [line 261], teardown of symlinks is always appended to the end of the postuninstall script as long as the linuxPackageSymlinks key is populated.
It would be useful if tearing down of symlinks to somehow be conditional on update, preferably to have update behaviour configurable.
The text was updated successfully, but these errors were encountered:
I have the same issue. While it looks like it is fairly common to use %post to add symbolic links, there seems to be pretty consistent advice to create them in the %install section. Here are some references:
I assume that if you list the links in %files, then upgrade can "do the right thing".
Another option that I considered is to use the argument that RPM passes to %postun as described in http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html. This would avoid removing all symbolic links, so links that are not present in newer versions would not get deleted.
Thanks @jneko33 for the detailed bug report and thanks @dpennell for the research. I tried a naive approach and putting the symlinks into the install section. I haven't tested this yet, just want to get something out quick to get feedback.
I wish to retain symbolic links made during install, on update.
During a package upgrade process, because the new package gets installed before the old package gets uninstalled, I've found that symlinks made by the post script of the new package are then deleted by the postuninstall script of the old package (as the symlinks are the same in both packages).
This behaviour could not be overwritten because in
com.typesafe.sbt.packager.rpm.RpmMetadata.writeSpec(rpmRoot: File, tmpRoot: File) [line 261]
, teardown of symlinks is always appended to the end of the postuninstall script as long as thelinuxPackageSymlinks
key is populated.It would be useful if tearing down of symlinks to somehow be conditional on update, preferably to have update behaviour configurable.
The text was updated successfully, but these errors were encountered: