Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql 14 Feb 2009 22:35:25 -0000 1.13 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql 5 Jan 2010 21:26:01 -0000 1.14 @@ -248,7 +248,18 @@ - + + + + select version_id + from apm_package_versions + where package_key = :package_key + and version_id = apm_package.highest_version(:package_key) + + + + + select apm.register_parameter( @@ -271,7 +282,7 @@ - + select apm.register_parameter( null, @@ -293,17 +304,6 @@ - - - - select version_id - from apm_package_versions - where package_key = :package_key - and version_id = apm_package.highest_version(:package_key) - - - - Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 25 Nov 2008 17:08:49 -0000 1.15 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 5 Jan 2010 21:26:01 -0000 1.16 @@ -189,7 +189,18 @@ - + + + + select version_id + from apm_package_versions + where package_key = :package_key + and version_id = apm_package__highest_version(:package_key) + + + + + select apm__register_parameter(null, :descendent_package_key, ap.parameter_name, ap.description, ap.datatype, ap.default_value, @@ -203,7 +214,7 @@ - + select apm__register_parameter(null, :package_key, ap.parameter_name, ap.description, ap.datatype, ap.default_value, ap.section_name, @@ -217,17 +228,6 @@ - - - - select version_id - from apm_package_versions - where package_key = :package_key - and version_id = apm_package__highest_version(:package_key) - - - - Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.98 -r1.99 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 13 Feb 2009 20:28:08 -0000 1.98 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 5 Jan 2010 21:26:01 -0000 1.99 @@ -884,13 +884,9 @@ apm_build_one_package_relationships $package_key if { $upgrade_p } { - foreach descendent_package_key [nsv_get apm_package_descendents $package_key] { - db_list copy_descendent_params {} - } + apm_copy_descendent_params $package_key } else { - foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] { - db_list copy_inherited_params {} - } + apm_copy_inherited_params $package_key } apm_callback_and_log $callback "

Installed $version(package-name), version $version(name).

" @@ -979,6 +975,23 @@ return $version_id } +ad_proc apm_copy_descendent_params { package_key } { + Copy new parameters in the package to its descendents. Called when a package is + upgraded. +} { + foreach descendent_package_key [nsv_get apm_package_descendents $package_key] { + db_list copy_descendent_params {} + } +} + +ad_proc apm_copy_inherited_params { package_key } { + Copy parameters from a packages ancestors. Called for an "extends" dependency. +} { + foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] { + db_list copy_inherited_params {} + } +} + ad_proc -private apm_package_install_version { {-callback apm_dummy_callback} {-array:required}