[DRE-commits] [SCM] redmine.git branch, master-experimental, updated. debian/1.4.4+dfsg1-1-5-g7f1f228

Jérémy Lal kapouer at melix.org
Thu Oct 11 10:25:05 UTC 2012


The following commit has been merged in the master-experimental branch:
commit 3515f89a4d41c6616402544d47a73added47aa5b
Author: Jérémy Lal <kapouer at melix.org>
Date:   Tue Aug 23 20:47:32 2011 +0200

    ruby-rails-2.3 has a different place : update link to it in postinst.
    
    Old place was /usr/share/rails-ruby1.8,
    new place is /usr/lib/ruby/vendor_ruby/rails.
    Stay compatible with older rails.

diff --git a/debian/postinst b/debian/postinst
index d6a34da..34c7fd5 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -38,6 +38,11 @@ fRailsEnv=production
 fRailsLog=/var/log/redmine
 fRailsVar=/var/lib/redmine
 fRailsCache=/var/cache/redmine
+fRailsDir=/usr/lib/ruby/vendor_ruby/rails
+if [ ! -e "$fRailsDir" ]; then
+	# keep rails package compatibility
+	fRailsDir="/usr/share/rails-ruby1.8"
+fi
 
 case "$1" in
 	configure|reconfigure)
@@ -60,7 +65,14 @@ case "$1" in
 			rm -f vendor/rails
 		fi
 		if [ ! -L vendor/rails ]; then
-			ln -s /usr/share/rails-ruby1.8 vendor/rails
+			ln -s "$fRailsDir" vendor/rails
+		else
+			# rails 2.3 to ruby-rails-2.3 migration
+			fMigrateLink=$(readlink vendor/rails)
+			if [ "$fMigrateLink" != "$fRailsDir" ]; then
+				rm -f vendor/rails
+				ln -s "$fRailsDir" vendor/rails
+			fi
 		fi
 		if [ ! -e app/views/members ]; then
 			mkdir app/views/members

-- 
redmine.git



More information about the Pkg-ruby-extras-commits mailing list