<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For re-locateable the symlink must be relative, it can not be absolute.<br>
<br>
ln -sf ../../foo %{buildroot}%{_datadir}/bar<br></blockquote><div><br></div><div>Thanks this works for the basic case.<br>However relative symlinks would work in cases when only symlink location can be changed but since rpm supports --relocate flag it can happen that also source file/directory can be relocated and then the relative path no longer helps.<br>Is there a non workaround solution for this or is this simply not supported by rpm out of the box?<br></div><div><br>For a workaround solution I guess that overriding existing symlink in %post section would work:<br>rm ${RPM_INSTALL_PREFIX1}/bar<br>ln -sf ${RPM_INSTALL_PREFIX0}/foo ${RPM_INSTALL_PREFIX1}/bar<br></div><div>This way rpm would keep track of symlink file and symlink would point to the right location.<br></div><div>Is there a better workaround solution - something that would hide the fact that the file was changed when querying rpm package for changes with -V?<br></div></div></div></div>