Problem changing symlink to directory with %pretrans scriptlet

Bill Nottingham notting at
Mon Jan 6 21:47:43 UTC 2014

Richard Fearn (richardfearn at said: 
> On 28 December 2013 16:43, Bruno Wolff III <bruno at> wrote:
> >
> > Notes that you need to use lua in pretrans scriptlets, not shell commands.
> Thanks. I've already seen that. It doesn't seem to make any difference
> whether it's a bash scriptlet or a lua scriptlet, though; irrespective
> of what language is used to delete the symlink, the problem still
> occurs.
> > I haven't found an example for you to copy, but note there are still some
> > cases where changing symlinks to directories or vise versa won't work with
> > rpm (
> I think deleting the symlink manually may be revealing a problem in
> rpm. It seems to treat /usr/share/javadoc/test-1/
> hello (from the old
> package) and /usr/share/javadoc/test/hello (from the new package) as
> the same thing. Since the new package is installing
> /usr/share/javadoc/test/hello, it therefore decides to 'skip' the old
> 'hello' file, rather than 'erase' it.
> I'm not sure yet why these two paths are considered to be the same...

I believe (but can't confirm ATM) that file disposition checks (i.e., which
files are added/removed/replaced) happen before pretrans scripts. So if
you're using pretrans scripts to change paths that were valid
pre-transaction to something else, weird results may happen.


More information about the devel mailing list