On Fri, Aug 23, 2013 at 1:47 PM, Adam Williamson <awill...@redhat.com>wrote:
> On Fri, 2013-08-23 at 11:26 -0700, Adam Williamson wrote: > > > > You could just say "screw anaconda installs" and just use `rm -rf`. > Though I > > > tried that once, in *EPEL* even, and it only took a week for someone to > > > complain. :-( > > > > I suppose we could do it that way wrapped in an 'if' statement so it > > only runs on updates; seems reasonable to assume bash is available for > > an update transaction? > > Well, no, I guess not: > > http://lists.opensuse.org/opensuse-factory/2012-09/msg01063.html > > We can't have nice things. It's looking like I either need an ugly patch > to RC or an ugly pile of lua in the spec. Sigh. > Sorry, just noticed the gist of this thread. Are you trying to replace a directory with a symlink? Take a look at gallery2: Example. In %install: #remove bundled Smarty. rm -rf lib/smarty ln -s ../../php/Smarty2 ${RPM_BUILD_ROOT}%{installprefix}/gallery2/lib/smarty Then in %post: if [ -L %{installprefix}/gallery2/lib/smarty ]; then rm -f %{installprefix}/gallery2/lib/smarty fi if [ -d %{installprefix}/gallery2/lib/smarty -a ! -L %{installprefix}/gallery2/lib/smarty ]; then mv %{installprefix}/gallery2/lib/smarty %{installprefix}/gallery2/lib/smarty.rpmbak && \ ln -s ../../php/Smarty2 %{installprefix}/gallery2/lib/smarty && \ rm -rf %{installprefix}/gallery2/lib/smarty.rpmbak fi if [ ! -L %{installprefix}/gallery2/lib/smarty ]; then ln -s ../../php/Smarty2 %{installprefix}/gallery2/lib/smarty fi Then in %files %ghost %{installprefix}/gallery2/lib/smarty Pretty? Nope. Overkill? Maybe? Reliable? So far. This was the product of work by myself, Rex Dieter, and some serious pain. <shudder> moodle has similar examples, including one we had to reverse. -J > -- > Adam Williamson > Fedora QA Community Monkey > IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora > http://www.happyassassin.net > > -- > devel mailing list > devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/devel > Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct -- http://cecinestpasunefromage.wordpress.com/ ------------------------------------------------ in your fear, seek only peace in your fear, seek only love -d. bowie
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct