From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.17-12mdk i586; Nav) The --relocate option for rpm is very useful, but would be even more so if it were possible to optionally create symlinks between relocated directories and their "canonical" positions (as specified in the specfile). Reproducible: Always Steps to Reproduce: n/a Actual Results: see attachment Expected Results: see attachment
Created attachment 16926 [details] "Actual" and "Expected" results
While I understand the need, rpm --relocate is not the right place to implement this, there are far too many problems with overloading --relocate. For example, should directories be created or symlinked. etc? You can detect that the package is being relocated, create the symlinks in %post, add a %verifyscript section to check that, if relocated, the symlinks are correct, and filnally remove, if relocated, the symlinks in %preun if erasing the package if you wish rpm to manage the functionality. Alternatively, write a script, possibly using rpm -q, to create the shadow directories and symlink the files.