Lines 30-48
Link Here
|
30 |
# Rename slotted files that may clash so that eselect can handle |
30 |
# Rename slotted files that may clash so that eselect can handle |
31 |
# them |
31 |
# them |
32 |
mv "${D}/usr/bin/rails" "${D}/usr/bin/rails-${PV}" |
32 |
mv "${D}/usr/bin/rails" "${D}/usr/bin/rails-${PV}" |
|
|
33 |
sed -i -e "s/>= 0/${PV}/" "${D}/usr/bin/rails-${PV}" |
33 |
mv "${D}/${GEMSDIR}/bin/rails" "${D}/${GEMSDIR}/bin/rails-${PV}" |
34 |
mv "${D}/${GEMSDIR}/bin/rails" "${D}/${GEMSDIR}/bin/rails-${PV}" |
34 |
} |
35 |
} |
35 |
|
36 |
|
36 |
pkg_postinst() { |
37 |
pkg_postinst() { |
37 |
einfo "To select between slots of rails, use:" |
38 |
einfo "To select between slots of rails, use:" |
38 |
einfo "\teselect rails" |
39 |
einfo "\teselect rails" |
39 |
# Bring users to rails 2.0.x by default when updating |
40 |
eselect rails update |
40 |
eselect rails update 2 |
|
|
41 |
|
41 |
|
42 |
ewarn "All database USE flags have been moved to dev-ruby/activerecord" |
42 |
ewarn "All database USE flags have been moved to dev-ruby/activerecord" |
43 |
} |
43 |
} |
44 |
|
44 |
|
45 |
pkg_postrm() { |
45 |
pkg_postrm() { |
46 |
# Drop users back to rails 1.2.x when they remove 2.0.x |
46 |
eselect rails update --if-unset |
47 |
eselect rails update 1.2 |
47 |
if [ -n "`eselect rails list` | grep 'none found'" ]; then |
|
|
48 |
rm -f /usr/bin/rails |
49 |
fi |
50 |
eselect rails update |
48 |
} |
51 |
} |