Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 221899 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 221899