[Fusionforge-commits] FusionForge branch Branch_5_3 updated. a58627b6888f218db469d397fc619e16eb0e32ec

Sylvain Beucler beuc-inria at fusionforge.org
Mon Apr 7 16:51:43 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  a58627b6888f218db469d397fc619e16eb0e32ec (commit)
       via  86eb198431cb87059ae9610bda68946994bd2b1d (commit)
       via  9e3e9fa6437cfe7cf9855a67f208cf245df44410 (commit)
      from  dd68bb576eeba151d0617f90b4d1d07c1d6f2a7a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a58627b6888f218db469d397fc619e16eb0e32ec
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Mon Apr 7 16:51:30 2014 +0200

    Report upgrade status to upgrade-db.php

diff --git a/src/db/20140406-convert-deb-plugin-upgrade.php b/src/db/20140406-convert-deb-plugin-upgrade.php
index abb4ad9..6460b77 100644
--- a/src/db/20140406-convert-deb-plugin-upgrade.php
+++ b/src/db/20140406-convert-deb-plugin-upgrade.php
@@ -71,3 +71,7 @@ while($row = db_fetch_array($res)) {
 	print "  Dropping {$row['relname']}\n";
 	db_drop_table_if_exists($row['relname']);
 }
+
+// Report to upgrade-db.php
+echo "SUCCESS\n";
+exit(0);

commit 86eb198431cb87059ae9610bda68946994bd2b1d
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Mon Apr 7 16:41:03 2014 +0200

    packaging: remove deb-specific/register-plugin and deb-specific/unregister-plugin to clarify that they are not used [#632]

diff --git a/src/deb-specific/register-plugin b/src/deb-specific/register-plugin
deleted file mode 100644
index cddb0b9..0000000
--- a/src/deb-specific/register-plugin
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to register a new plugin into the SF database
-
-use DBI ;
-use strict ;
-use diagnostics ;
-
-use vars qw/$dbh @reqlist $plugin_name $plugin_desc $plugin_id/ ;
-
-sub debug ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include all the predefined functions
-
-&db_connect ;
-
-if ($#ARGV < 1) {
-    debug "Usage: register-plugin <plugin name> <plugin description>" ;
-    exit 1 ;
-}
-
-$plugin_name = $ARGV [0] ;
-$plugin_desc = $ARGV [1] ;
-
-if ($plugin_name =~ /[^a-z]/) {
-    debug "Error: the plugin name must contain only [a-z] characters" ;
-    exit 1 ;
-}
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($query, $sth, @array, $version, $action) ;
-
-    $plugin_desc = $dbh->quote ($plugin_desc) ;
-
-    $query = "SELECT count(*) FROM plugins WHERE plugin_name = '$plugin_name'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-    if ($array[0] == 1) {
-	$query = "SELECT plugin_id FROM plugins WHERE plugin_name = '$plugin_name'" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-
-	$plugin_id = $array[0] ;
-	debug "Plugin '$plugin_name' already registered, skipping." ;
-	print "$plugin_id\n" ;
-    } else {
-	$query = "INSERT INTO plugins (plugin_name, plugin_desc) VALUES ('$plugin_name', $plugin_desc)" ;
-
-	debug $query ;
-
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	$sth->finish () ;
-
-	$query = "SELECT plugin_id FROM plugins WHERE plugin_name = '$plugin_name'" ;
-	$sth = $dbh->prepare ($query) ;
-	$sth->execute () ;
-	@array = $sth->fetchrow_array () ;
-	$sth->finish () ;
-
-	$plugin_id = $array[0] ;
-	debug "Plugin '$plugin_name' registered with id $plugin_id." ;
-	print "$plugin_id\n" ;
-
-	# debug "Committing." ;
-	$dbh->commit () ;
-    }
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
diff --git a/src/deb-specific/unregister-plugin b/src/deb-specific/unregister-plugin
deleted file mode 100644
index 419c124..0000000
--- a/src/deb-specific/unregister-plugin
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Debian-specific script to unregister a plugin from the SF database
-
-use DBI ;
-use strict ;
-use diagnostics ;
-
-use vars qw/$dbh @reqlist $plugin_name $plugin_desc $plugin_id/ ;
-
-sub debug ( $ ) ;
-
-require ("/usr/share/gforge/lib/include.pl") ; # Include all the predefined functions
-
-&db_connect ;
-
-if ($#ARGV < 0) {
-    debug "Usage: unregister-plugin <plugin name>" ;
-    exit 1 ;
-}
-
-$plugin_name = $ARGV [0] ;
-
-if ($plugin_name =~ /[^a-z]/) {
-    debug "Error: the plugin name must contain only [a-z] characters" ;
-    exit 1 ;
-}
-
-$dbh->{AutoCommit} = 0;
-$dbh->{RaiseError} = 1;
-eval {
-    my ($query, $query2, $query3, $sth, @array, @array2, @array3, $version, $action) ;
-
-    $query = "SELECT count(*) FROM plugins WHERE plugin_name = '$plugin_name'" ;
-    $sth = $dbh->prepare ($query) ;
-    $sth->execute () ;
-    @array = $sth->fetchrow_array () ;
-    $sth->finish () ;
-
-
-
-
-    if ($array[0] == 1) {
-    	# Looking if this plugin is already referenced by a group
-    	$query2="SELECT group_plugin.plugin_id FROM group_plugin,plugins WHERE group_plugin.plugin_id=plugins.plugin_id AND plugin_name = '$plugin_name'";
-        $sth = $dbh->prepare ($query2) ;
-        $sth->execute () ;
-        @array2 = $sth->fetchrow_array () ;
-        $sth->finish () ;
-    	if ($array2[0] && $array2[0] >= 1) {
-		print "WARNING: This plugin is already used by one or more groups, can't unregister\n"
-	} else {
-    		$query3="SELECT user_plugin.plugin_id FROM user_plugin,plugins WHERE user_plugin.plugin_id=plugins.plugin_id AND plugin_name = '$plugin_name'";
-        	$sth = $dbh->prepare ($query3) ;
-        	$sth->execute () ;
-        	@array3 = $sth->fetchrow_array () ;
-        	$sth->finish () ;
-    		if ($array3[0] && $array3[0] >= 1) {
-			print "WARNING: This plugin is already used by one or more users, can't unregister\n"
-		} else {
-			$query = "DELETE FROM plugins WHERE plugin_name = '$plugin_name'" ;
-			$sth = $dbh->prepare ($query) ;
-			$sth->execute () ;
-			$sth->finish () ;
-
-			$plugin_id = $array[0] ;
-			debug "Plugin '$plugin_name' successfully unregistered." ;
-
-			# debug "Committing." ;
-			$dbh->commit () ;
-		}
-	}
-    } else {
-	debug "No plugin '$plugin_name' found, skipping." ;
-    }
-
-    # There should be a commit at the end of every block above.
-    # If there is not, then it might be symptomatic of a problem.
-    # For safety, we roll back.
-    $dbh->rollback ();
-};
-
-if ($@) {
-    warn "Transaction aborted because $@" ;
-    debug "Transaction aborted because $@" ;
-    $dbh->rollback ;
-    debug "Please report this bug on the Debian bug-tracking system." ;
-    debug "Please include the previous messages as well to help debugging." ;
-    debug "You should not worry too much about this," ;
-    debug "your DB is still in a consistent state and should be usable." ;
-    exit 1 ;
-}
-
-$dbh->rollback ;
-$dbh->disconnect ;
-
-sub debug ( $ ) {
-    my $v = shift ;
-    chomp $v ;
-    print STDERR "$v\n" ;
-}
diff --git a/src/packaging/install/common b/src/packaging/install/common
index f60294b..e45ad25 100644
--- a/src/packaging/install/common
+++ b/src/packaging/install/common
@@ -16,9 +16,6 @@ utils/migrate-to-ini-files.sh	       @BINARY_PATH@/
 deb-specific/sqlparser.pm              @SOURCE_PATH@/lib/
 deb-specific/sqlhelper.pm              @SOURCE_PATH@/lib/
 #
-deb-specific/register-plugin           @BINARY_PATH@/
-deb-specific/unregister-plugin         @BINARY_PATH@/
-#
 #deb-specific/user_dump_update.pl       @BINARY_PATH@/
 #deb-specific/ssh_dump_update.pl        @BINARY_PATH@/
 deb-specific/mailfwd_update.pl         @BINARY_PATH@/

commit 9e3e9fa6437cfe7cf9855a67f208cf245df44410
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Mon Apr 7 16:30:06 2014 +0200

    Don't use 'debian' in the upgrade scripts as it is filtered out by upgrade-db.php; Debian uses upgrade-db.php now

diff --git a/src/db/20140406-convert-debian-plugin-upgrade.php b/src/db/20140406-convert-deb-plugin-upgrade.php
similarity index 100%
rename from src/db/20140406-convert-debian-plugin-upgrade.php
rename to src/db/20140406-convert-deb-plugin-upgrade.php

-----------------------------------------------------------------------

Summary of changes:
 ...php => 20140406-convert-deb-plugin-upgrade.php} |    4 +
 src/deb-specific/register-plugin                   |  100 -------------------
 src/deb-specific/unregister-plugin                 |  101 --------------------
 src/packaging/install/common                       |    3 -
 4 files changed, 4 insertions(+), 204 deletions(-)
 rename src/db/{20140406-convert-debian-plugin-upgrade.php => 20140406-convert-deb-plugin-upgrade.php} (98%)
 delete mode 100644 src/deb-specific/register-plugin
 delete mode 100644 src/deb-specific/unregister-plugin


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list