Added pixbuf cache update to install to properly update loader.cache

loader.cach is being updated to point to the Cellar and not include loaders installed by librsvg. This update fixes that by refreshing the loader cache after install.
Is there a way to set the ENV variable in a way that will not break when
the version of gdkpixbuf changes?

On Thursday, October 9, 2014, Jack Nagel <notifications@github.com> wrote:

> In Library/Formula/librsvg.rb:
>
> > @@ -31,4 +31,9 @@ def install
> >      system "./configure", *args
> >      system "make install"
> >    end
> > +  def post_install
> > +    #librsvg is not aware GDK_PIXBUF_MODULEDIR must be set
> > +    #set GDK_PIXBUF_MODULEDIR and update loader cache
> > +    system "GDK_PIXBUF_MODULEDIR=\"#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders\" gdk-pixbuf-query-loaders --update-cache"
>
> I think we probably want to do this like:
>
> ENV["GDK_PIXBUF_MODULEDIR"] = ...system "#{Formula["gdk-pixbuf"].opt_bin}/gdk-pixbuf-query-loaders", "--update-cache"
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Homebrew/homebrew/pull/32888/files#r18627785>.
>