During package update the postun scriptlet of the old package runs after the
post section of the new package. The postun unregistered the flake
unconditionally thus removing the command that was just set up by the
new package, (bsc#1253743). Make postun conditional such that the flake
deregistration does not happen on package update but only when the package
is being completely removed. Further safeguard the flake artifacts and restore
them if they have disappeared due to an unguarded postun. Last but not least
fix the dependency to ensure we have the proper sdk container image.
When updating the package an error was generated by flake-ctl because the
entry script to be generated existed already. Remove the script if it exists
to allow flake-ctl to start with a clean slate.
For sharing the home directory with the container the
security context needs to be disabled to allow this
shared mount. For details about this setting as well
as approval on the approach please visit bsc#1252390