On 11/18/2010 01:59 PM, Panu Matilainen wrote: > On Thu, 18 Nov 2010, Ville Skyttà wrote: > >> On Wednesday 17 November 2010, Kevin Kofler wrote: >>> Ville Skyttà wrote: >>>> I'd get rid of the versioned javadoc dir altogether, and simply install >>>> to %{_javadocdir}/%{name}. Unversioned is good for bookmarking and >>>> javadoc crosslinking. >>> >>> One thing you have to be careful of, no matter which way you decide, is >>> that you MUST NOT change a directory to a symlink or the other way round >>> or RPM will get terribly confused on upgrades. >>> >>> (There are bizarre (and easy to get wrong) scriptlet workarounds that can >>> be used, but avoiding the mess in the first place is probably the best >>> solution.) >> >> In this case it's the unversioned dir we want to stay around, so the >> scriptlet doesn't have to be any more bizarre than something like this which >> IMO isn't that bad (certainly not bad enough to stop implementing the above >> plan IMO), and would only be needed in *-javadoc that created an unversioned >> symlink, either owned by the package as usual or created "in the wild" in >> %post: >> >> %pretrans javadoc -p <lua> >> -- TODO: remove this scriptlet in F-17 >> os.remove("%{_javadocdir}/%{name}") > > It's not the script itself that's bad and bizarre, it's the entire > %pretrans mechanism that's problematic. > > %pretrans runs before fingerprinting (this is required for the > directory/symlink replacing tricks to work at all), which means that the > transaction can abort due to file conflicts /after/ %pretrans scripts have > already modified the system. A further complication is that yum runs a > test-transcation first, where %pretrans (obviously) doesn't run, so it can > fail with file conflicts on the test transaction that wouldn't exist if > %pretrans had run. > > While %pretrans script /can/ be used to work around the symlink/directory > issue to some extent, it should be only considered as a very last resort. > So, think hard before making a choice that might involve > directory<->symlink transitions, and certainly don't /design/ on using > %pretrans for this. > > - Panu - Ok. So what do you propose? I am almost sure there will be packages that have %{_javadocdir}/%{name} symlink and that will become directory according to new guidelines. The change itself is good, simplifies things...but if rpm in its current state can't make this work I'd like to see a workaround until it can. -- Stanislav Ochotnicky <sochotnicky@xxxxxxxxxx> Associate Software Engineer - Base Operating Systems Brno PGP: 71A1677C Red Hat Inc. http://cz.redhat.com
Attachment:
signature.asc
Description: OpenPGP digital signature
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel