Mises à jour RBS Change : Migration 3.0.1 vers 3.0.2

  • 13513.1

    25/05/2010 17:07


    teles
    Rang : Adepte
    J'ai mis le fichier change.xml avec les versions 3.0.2, j'ai supprimé le framework, j'ai lancé la commande init-generic-modules :

    Fatal error: Cannot redeclare class f_util_fileutils in /home/intessit/change/repository/framework/framework-3.0.2/util/FileUtils.class.php on line 3

    Je relance la commande :

    Error line 513 (/home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php): Duplicate command alias compileDocumentEditor, used by compile-document-editor and compile-document-editor
    #0 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(556): c_Changescript->_getCommands(Array, 'default')
    #1 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(444): c_Changescript->getCommands()
    #2 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(200): c_Changescript->getCommand('compileConfig')
    #3 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(191): c_Changescript->_executeCommand('compileConfig', Array, true)
    #4 /home/intessit/change/repository/framework/framework-3.0.1/change-commands/InitGenericModules.php(62): c_Changescript->executeCommand('compileConfig')
    #5 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/ChangescriptCommand.php(445): commands_InitGenericModules->_execute(Array, Array)
    #6 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(210): c_ChangescriptCommand->execute(Array, Array)
    #7 /home/intessit/change/repository/change-lib/change-script/change-script-3.0/classes/Changescript.php(171): c_Changescript->_executeCommand('init-generic-mo...', Array)
    #8 /home/intessit/change/repository/framework/framework-3.0.2/bin/change_script.inc(97): c_Changescript->execute(Array)
    #9 /home/intessit/change/repository/framework/framework-3.0.2/bin/change.php(3): require('/home/intessit/...')
    #10 {main}

    Je relance la même commande une 3e fois, ça passe... bon...

    Je fais un check-patch, cela me sort une liste, je fais un script de migration avec ces patchs, en me basant sur le script de migration 3.0.0 -> 3.0.1 et je lance le script :

    change.php update-autoload --refresh-cli-autoload... done
    change.php init-project ... done
    change.php init-generic-modules ... done
    change.php update-autoload --refresh-cli-autoload... done
    change.php init-webapp ...Could not execute change.php init-webapp  (exit code 1):
    == Init webapp ==
    == Compile config ==
    Warn: some targets can depend on the configuration file. Please run the target that depends on
    if AG_LOGGING_LEVEL was modified please execute compile-js-dependencies.
    Warn: if AG_SUPPORTED_LANGUAGES was updated, please execute change generate-database to update database structure.
    Warn: if you changed CHANGE_USE_CORRECTION or CHANGE_USE_WORKFLOW, please run change compile-documents.
    Config compiled
    
    Import framework home files
    Add missing .htaccess
    Create /publicmedia folder
    Create icons symlink
    Import /home/intessit/change30/lilas/modules/media/webapp files
    Import /home/intessit/change30/lilas/modules/order/webapp files
    Import /home/intessit/change30/lilas/modules/payment/webapp files
    Import /home/intessit/change30/lilas/modules/uixul/webapp files
    Import /home/intessit/change30/lilas/modules/users/webapp files
    Import /home/intessit/change30/lilas/modules/website/webapp files
    Error line 57 (/home/intessit/change/repository/framework/framework-3.0.2/util/FileUtils.class.php): Could not create symlink /home/intessit/change30/lilas/webapp/www/cache => /home/intessit/change30/lilas/cache
    #0 /home/intessit/change/repository/framework/framework-3.0.2/change-commands/InitWebapp.php(141): f_util_FileUtils->symlink('/home/intessit/...', '/home/intessit/...', 2)
    #1 /home/intessit/change/repository/framework/framework-3.0.2/change-commands/InitWebapp.php(119): commands_InitWebapp->addRootLink('/home/intessit/...')
    #2 /home/intessit/change/repository/change-lib/change-script/change-script-3.1/classes/ChangescriptCommand.php(371): commands_InitWebapp->_execute(Array, Array)
    #3 /home/intessit/change/repository/change-lib/change-script/change-script-3.1/classes/Changescript.php(210): c_ChangescriptCommand->execute(Array, Array)
    #4 /home/intessit/change/repository/change-lib/change-script/change-script-3.1/classes/Changescript.php(171): c_Changescript->_executeCommand('init-webapp', Array)
    #5 /home/intessit/change/repository/framework/framework-3.0.2/bin/change_script.inc(97): c_Changescript->execute(Array)
    #6 /home/intessit/change/repository/framework/framework-3.0.2/bin/change.php(3): require('/home/intessit/...')
    #7 {main}change.php apply-patch framework 0311... done
    change.php apply-patch framework 0312...
    Fatal error: Uncaught exception 'Exception' with message 'Could not execute change.php apply-patch framework 0312 (exit code 255):
    == Apply patch framework/0312 ==
    Version : 3.0.2
    
    Checks the correct implemtation of getNewDocumentInstance in Services.
    
    Fatal error: Cannot override final method f_persistentdocument_PersistentDocumentModel::isModelCompatible() in /home/intessit/change30/lilas/build/intessit/modules/brand/persistentdocument/brandmodel_and_base.class.php on line 322' in /home/intessit/change30/lilas/migration/migrate-3.0.1_to_3.0.2.php:69
    Stack trace:
    #0 /home/intessit/change30/lilas/migration/migrate-3.0.1_to_3.0.2.php(42): ChangeProject->exec('change.php appl...', 'change.php appl...')
    #1 /home/intessit/change30/lilas/migration/migrate-3.0.1_to_3.0.2.php(121): ChangeProject->executeTask('apply-patch', Array)
    #2 /home/intessit/change30/lilas/migration/migrate-3.0.1_to_3.0.2.php(214): c_ChangeMigrationScript::main()
    #3 {main}
      thrown in /home/intessit/change30/lilas/migration/migrate-3.0.1_to_3.0.2.php on line 69

    J'avais imaginé plus simple :/

    Édité par teles 25/05/2010 17:10

  • 13513.2 en réponse à 13513.1 écrit par teles

    25/05/2010 18:09


    Franck Stauffer
    Titre : Responsable produit
    Rang : Expert
    C'est ce qui arrive quand on est impatient et qu'on attend pas le script officiel qui s'occupe de ces détails ;) (puisque je le rappelle il était mentionné dans l'annonce officielle que le script de migration serait disponible d'ici peu). Tu ne fais donc que te heurté aux problèmes que nous avons déjà résolu dans le script en question.

    Voici le "main" du script final qui sera diffusé demain.

    	public static function main()
    	{
    		$project = ChangeProject::getInstance();
    		$profile = $project->getProfile();
    		
    		unlink(WEBEDIT_HOME . '/framework');
    		exec("rm " . WEBEDIT_HOME . "/modules/*");
    		exec("rm -rf " . WEBEDIT_HOME . "/.change");
    		exec("rm -rf " . WEBEDIT_HOME . "/log/" . $profile);
    		exec("rm -rf " . WEBEDIT_HOME . "/build/" . $profile);
    		exec("rm -rf " . WEBEDIT_HOME . "/cache/" . $profile);
    		$project->executeTask("update-autoload", array("--refresh-cli-autoload"));
    		$project->executeTask("init-project");
    		
    		$project->executeTask("init-generic-modules");
    		$project->executeTask("update-autoload", array("--refresh-cli-autoload"));
    		
    		//Convertion de la structure du dossier
    		$project->executeTask("apply-patch", array("framework", "0311"));
    		
    		//Checks the correct implemtation of getNewDocumentInstance in Services
    		$project->executeTask("apply-patch", array("framework", "0312"));
    		
    
    		$project->executeTask("compile-config");
    		$project->executeTask("compile-documents");
    		$project->executeTask("compile-db-schema");
    		
    		if ($project->moduleExist('marketing'))
    		{
    			//Added field "multipleUsage" on coupons
    			$project->executeTask("apply-patch", array("marketing", "0301"));
    		}
    		
    		if ($project->moduleExist('blog'))
    		{	
    			//Makes sure keywords are not duplicated
    			$project->executeTask("apply-patch", array("blog", "0302"));
    		}
    	
    	
    		if ($project->moduleExist('customer'))
    		{
    			//Introduces a lastcartupdate property equivalent to the former meta modules.customer.lastCartUpdate
    			$project->executeTask("apply-patch", array("customer", "0307"));
    		}
    		if ($project->moduleExist('ecomfilters'))
    		{
    			//Adds a static list for the abandonned shopping carts
    			$project->executeTask("apply-patch", array("ecomfilters", "0300"));
    		}
    		
    		if ($project->moduleExist('form'))
    		{
    			//aknowledgment handling.
    			//add recipientGroupFolder and move all groups to it.
    			$project->executeTask("apply-patch", array("form", "0301"));
    		}
    
    
    		if ($project->moduleExist('markergas'))
    		{
    			//Two new block parameters : allows to track with or without taxes and not yet paiud transactions
    			$project->executeTask("apply-patch", array("markergas", "0301"));
    		}
    		if ($project->moduleExist('markergmaps'))
    		{
    			//Add new documents
    			$project->executeTask("apply-patch", array("markergmaps", "0301"));
    			//Copy media files
    			$project->executeTask("apply-patch", array("markergmaps", "0302"));
    		}
    
    
    		if ($project->moduleExist('skin'))
    		{
    			//Correction de la list modules_skin/linkurl
    			$project->executeTask("apply-patch", array("skin", "0302"));
    		}
    		if ($project->moduleExist('solrsearch'))
    		{
    			//Import new list.
    			$project->executeTask("apply-patch", array("solrsearch", "0300"));
    		}
    		if ($project->moduleExist('task'))
    		{
    			//Ajout de changecron.php
    			$project->executeTask("apply-patch", array("task", "0300"));
    		}
    		if ($project->moduleExist('videos'))
    		{
    			//Update preferences to reflect dailymotion embedded player API Change
    			$project->executeTask("apply-patch", array("videos", "0300"));
    		}
    		if ($project->moduleExist('website'))
    		{
    			//Ajout d'un avertissement si pas de site par défaut.
    			//Ajout du choix de la structure du site dans le formulaire de création.
    			$project->executeTask("apply-patch", array("website", "0314"));
    		}
    		if ($project->moduleExist('workflow'))
    		{
    			//Import new 'modules_workflow/existingstarttasks' dynamic list.
    			$project->executeTask("apply-patch", array("workflow", "0301"));
    		}
    		
    		$project->executeTask("init-webapp");
    		$project->executeTask("clear-all");
    		$project->executeTask("compile-all");
    		
    		$project->executeTask("init-patch-db");
    		
    	}

    Il suffira d'exécuter ce script PHP et rien d'autre avant (pas de suppression du framework, d'update-autoload ou quoi que ce soit).

    Édité par Franck Stauffer 25/05/2010 18:33

  • 13513.3 en réponse à 13513.2 écrit par Franck Stauffer

    26/05/2010 08:55


    teles
    Rang : Adepte
    Moi je migre, je ne décide pas de migrer...
  • 13513.4 en réponse à 13513.3 écrit par teles

    26/05/2010 09:06


    Franck Stauffer
    Titre : Responsable produit
    Rang : Expert
    Ce qui n'empêche toutefois pas de monter les 19 marches qui nous séparent ;)
 
Merci de prendre connaissance et de respecter les règles des forums.
 
1467 membres
Aucun membre connecté