dev-ruby/rdoc: make sure rdoc exists, bug 562980
authorHans de Graaff <graaff@gentoo.org>
Sat, 24 Oct 2015 06:52:07 +0000 (08:52 +0200)
committerHans de Graaff <graaff@gentoo.org>
Sat, 24 Oct 2015 06:52:26 +0000 (08:52 +0200)
Make sure to (re)eselect ruby when the rdoc symlink
does not exist (anymore), similar to what we do in
dev-ruby/rubygems.

Package-Manager: portage-2.2.20.1

dev-ruby/rdoc/rdoc-4.2.0.ebuild

index 84b3eb3e24e3c95dd78664ffcc9fb14fd53b9b2b..4a28db3a18c3d27c4f04a28ce97feda558d6c1d4 100644 (file)
@@ -90,3 +90,9 @@ all_ruby_install() {
                done
        done
 }
+
+pkg_postinst() {
+       if [[ ! -n $(readlink "${ROOT}"usr/bin/rdoc) ]] ; then
+               eselect ruby set $(eselect --brief --colour=no ruby show | head -n1)
+       fi
+}