#1674 Freeze Exception request: gallery2
Closed: Fixed None Opened 15 years ago by limb.

gallery2-2.3-8.fc11 fixes a pretrans symlink script. The previous, broken version requires user intervention to upgrade. No code or DB changes.


%pretrans is evil, and can easily cause failures on initial anaconda (or other) installs, where there is no "pretrans" environment. I'm not sure if that case can be gracefully handled or not.

So how do we drop a bundled library and use a Required system version? There have been a flurry of bugs requesting this in the last year and I've done things in %pre for gallery and moodle, and only recently have there been complaints.

Wouldn't doing this sort of thing in %pre with $1 conditionals break with cpio issues? https://bugzilla.redhat.com/show_bug.cgi?id=484240

Sorry, too brief, you may be able to use %pre here... heck, why not just do this in %post?

I originally tried to do this in %pre, and was told to use %pretrans instead, which I'd never heard of. See linked bug, comment #5.

Oh rats, of course, this is the "replace a dir with a symlink" problem here. ok.

I still think the %pretrans scriptlet as-is will fail if chosen for an initial install.

Would %pretrans as is and a $1 conditional in %pre do the trick?

I've got a -9 coming with another fix, for a dep that was missed. Rex, any further thoughts on this situation?

OK, confirmed with folks that %pretrans is to be avoided.

A solution I came up with under some testing, was to use in %files
%ghost /path/to/symlink

and a scriptlet (something like)
%post
if [ -d /path/to/symlink -a ! -L /path/to/symlink ]; then
mv /path/to/symlink /path/to/symlink.rpmbak && \
ln -s /path/to/symlink-target /path/to/symlink && \
rm -rf /path/to/symlink.rpmbak
fi

I can help do a proof-of-concept implemation in gallery cvs if you want.

Sorry for the delay, was on medical AFK.

A POC in CS would be great.

I just committed a version implementing the above, and built in rawhide. It seems to work here, I'll build for 11 and 10 and post to the BZ to have others try it.

gallery2-2.3-9.fc11 Should be taggable.

This incarnation is safer thanks, any testing/feedback yet?

Yeah, just ccd you on the BZ.

Moving, tagging, signing.

Um, I got feedback, didn't say it was positive feedback, see https://bugzilla.redhat.com/show_bug.cgi?id=498334

Metadata Update from @limb:
- Issue set to the milestone: Fedora 11 Final

7 years ago

Login to comment on this ticket.

Metadata