On Fri, Aug 23, 2013 at 2:15 PM, Michael Scherer <misc@xxxxxxxx> wrote: > So what we found on irc : > > Since rpm first create the files for the new rpm that is installed, then > remove the files that should be removed still present from old rpm and > not in the new one, we fix the issue by waiting until the directory is > removed to create the symlink. Looking at > https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scriptlet_Ordering , we need something after step 10. <snip code> While we're sharing hacks...did you know that rpm doesn't move symlink targets when they change in some instances, too? I can't make a simple minimal test case reproduce this to save my life, but it sure does blow up in the real world: https://bugzilla.redhat.com/show_bug.cgi?id=997978 Thank $DEITY with nodejs I can divine the correct symlink targets from a json file on the filesystem, so I can fix up ~20 packages in one scriptlet: http://pkgs.fedoraproject.org/cgit/nodejs-inherits.git/tree/nodejs-inherits.spec#n43 If I weren't so lucky I would have had to add scriptlet gunk to ~20 packages instead of just that one. :-( > Now, this method has a huge problem, we cannot downgrade the package to > the bundled version. There is no script that would remove the symlink in > time, ie before step 3 of > https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scriptlet_Ordering > Everything that is run is from the new package to install, ie the old > rpm that we want to downgrade to. So since we would need to fix the old > rpm to have it downgradable, that's a bit hard. The %pretrans hackery previously recommended also suffers from the same flaw. I'm not sure there's anything we can do about it. :-( > Another issue is the %ghost, we cannot really check the symlink is still > the same. Maybe there is some better syntax for that. -T.C. -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct