[Fusionforge-commits] r14251 - in trunk: . src src/utils

Roland Mas lolando at fusionforge.org
Fri Aug 26 14:17:21 CEST 2011


Author: lolando
Date: 2011-08-26 14:17:20 +0200 (Fri, 26 Aug 2011)
New Revision: 14251

Modified:
   trunk/
   trunk/src/fusionforge.spec
   trunk/src/utils/list-enabled-plugins.sh
Log:
Remove files coming from non-enabled plugins to avoid RPM build breakage

Modified: trunk/src/fusionforge.spec
===================================================================
--- trunk/src/fusionforge.spec	2011-08-26 10:55:04 UTC (rev 14250)
+++ trunk/src/fusionforge.spec	2011-08-26 12:17:20 UTC (rev 14251)
@@ -619,6 +619,12 @@
 # plugin: oauthprovider
 #%{__ln_s} ../../plugins/oauthprovider/www $RPM_BUILD_ROOT%{FORGE_DIR}/www/plugins/oauthprovider
 
+for i in utils/list-enabled-plugins.sh --disabled ; do
+    %{__rm} -rf $RPM_BUILD_ROOT%{FORGE_DIR}/plugins/$i
+    %{__rm} -f $RPM_BUILD_ROOT%{FORGE_CONF_DIR}/config.ini.d/$i.ini
+    %{__rm} -f $RPM_BUILD_ROOT%{FORGE_CONF_DIR}/httpd.d/[0-9][0-9]$i
+done
+
 ### END OF PLUGIN SETUP ###
 
 %pre

Modified: trunk/src/utils/list-enabled-plugins.sh
===================================================================
--- trunk/src/utils/list-enabled-plugins.sh	2011-08-26 10:55:04 UTC (rev 14250)
+++ trunk/src/utils/list-enabled-plugins.sh	2011-08-26 12:17:20 UTC (rev 14251)
@@ -23,8 +23,13 @@
 	if [ ! -e $dir/etc/$plugin.ini ] ; then
 	    enabled="$enabled $plugin"
 	else
+	    if [ -x /usr/bin/confget ] ; then
+		status=$(confget -f $dir/etc/$plugin.ini plugin_status | sed -r 's/[ \t]*;.*//g')
+	    else
+		status=$(awk -d= '/^[ \t]*plugin_status[ \t]*=/ { print $2 }' $dir/etc/$plugin.ini | sed -r 's/[ ^t]*;.*//g')
+	    fi
 	    # confget returns litteral semi-colons after values, so get rid of comments
-	    if [ "$(confget -f $dir/etc/$plugin.ini plugin_status | sed -r 's/[ ^t]*;.*//g')" = "valid" ] ; then
+	    if [ "$status" = "valid" ] ; then
 		enabled="$enabled $plugin"
 	    else
 		disabled="$disabled $plugin"




More information about the Fusionforge-commits mailing list