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.91 -r1.92
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 29 Jul 2008 19:22:23 -0000 1.91
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 25 Nov 2008 17:08:49 -0000 1.92
@@ -124,19 +124,20 @@
}
}
-ad_proc -private pkg_info_new { package_key spec_file_path provides requires {dependency_p ""} {comment ""}} {
+ad_proc -private pkg_info_new { package_key spec_file_path extends provides requires {dependency_p ""} {comment ""}} {
Returns a datastructure that maintains information about a package.
@param package_key The key of the package.
@param spec_file_path The path to the package specification file
+ @param extends A list of packages extended by the package..
@param provides A list of dependencies provided by the package.
@param requires A list of requirements provided by the package..
@param dependency_p Can the package be installed without violating dependency checking.
@param comment Some text about the package. Useful to explain why it fails dependency check.
@return a list whose first element is a package key and whose second element is a path
to the associated .info file.
} {
- return [list $package_key $spec_file_path $provides $requires $dependency_p $comment]
+ return [list $package_key $spec_file_path $extends $provides $requires $dependency_p $comment]
}
ad_proc -private pkg_info_key {pkg_info} {
@@ -166,36 +167,44 @@
return [file dirname [pkg_info_spec $pkg_info]]
}
-ad_proc -private pkg_info_provides {pkg_info} {
+ad_proc -private pkg_info_extends {pkg_info} {
@return The dependencies provided by the package.
} {
return [lindex $pkg_info 2]
}
+ad_proc -private pkg_info_provides {pkg_info} {
+
+ @return The dependencies provided by the package.
+
+} {
+ return [lindex $pkg_info 3]
+}
+
ad_proc -private pkg_info_requires {pkg_info} {
@return The dependencies required by the package info map.
} {
- return [lindex $pkg_info 3]
+ return [lindex $pkg_info 4]
}
ad_proc -private pkg_info_dependency_p {pkg_info} {
@return Does it pass the dependency checker? "" Means it has not been run yet.
} {
- return [lindex $pkg_info 4]
+ return [lindex $pkg_info 5]
}
ad_proc -private pkg_info_comment {pkg_info} {
@return Any comment specified about this package.
} {
- return [lindex $pkg_info 5]
+ return [lindex $pkg_info 6]
}
# DRB: This routine does more than check dependencies, it also parses spec files,
@@ -245,7 +254,7 @@
array set package [apm_read_package_info_file $spec_file]
if { ([string equal $package(initial-install-p) "t"] || !$initial_install_p) && \
[apm_package_supports_rdbms_p -package_key $package(package.key)] } {
- lappend install_pend [pkg_info_new $package(package.key) $spec_file $package(provides) $package(requires) ""]
+ lappend install_pend [pkg_info_new $package(package.key) $spec_file $package(extends) $package(provides) $package(requires) ""]
}
# Remove this package from the pkg_info_all list ...
@@ -284,7 +293,7 @@
# Now determine if we can add another package to the install set.
foreach pkg_info $install_pend {
set satisfied_p 1
- foreach req [pkg_info_requires $pkg_info] {
+ foreach req [concat [pkg_info_extends $pkg_info] [pkg_info_requires $pkg_info]] {
if {[apm_dependency_provided_p -dependency_list $install_in_provides \
[lindex $req 0] [lindex $req 1]] != 1} {
# Unsatisfied dependency.
@@ -302,7 +311,7 @@
if { $satisfied_p } {
# At least one more package was added to the list that can be installed, so repeat.
lappend install_in [pkg_info_new [pkg_info_key $pkg_info] [pkg_info_spec $pkg_info] \
- [pkg_info_provides $pkg_info] [pkg_info_requires $pkg_info] \
+ [pkg_info_extends $pkg_info] [pkg_info_provides $pkg_info] [pkg_info_requires $pkg_info] \
"t" "Package satisfies dependencies."]
set updated_p 1
}
@@ -362,7 +371,8 @@
if { [exists_and_not_null install_pend] } {
foreach pkg_info $install_pend {
lappend install_in [pkg_info_new [pkg_info_key $pkg_info] [pkg_info_spec $pkg_info] \
- [pkg_info_provides $pkg_info] [pkg_info_requires $pkg_info] \
+ [pkg_info_extends $pkg_info] [pkg_info_provides $pkg_info] \
+ [pkg_info_requires $pkg_info] \
"f" $install_error([pkg_info_key $pkg_info])]
}
return [list 0 $install_in]
@@ -460,14 +470,14 @@
array set version $repository($package_key)
set satisfied_p 1
- foreach req $version(requires) {
+ foreach req [concat $version(extends) $version(requires)] {
set req_uri [lindex $req 0]
set req_version [lindex $req 1]
if { ![info exists provided($req_uri)] || \
[apm_version_names_compare $provided($req_uri) $req_version]== -1 } {
- ns_log Debug "apm_dependency_check_new: $package_key requires $req_uri $req_version => failed"
+ ns_log Debug "apm_dependency_check_new: $package_key extends or requires $req_uri $req_version => failed"
set satisfied_p 0
@@ -477,7 +487,7 @@
set required($req_uri) $req_version
}
} else {
- ns_log Debug "apm_dependency_check_new: $package_key requires $req_uri $req_version => OK"
+ ns_log Debug "apm_dependency_check_new: $package_key extends or requires $req_uri $req_version => OK"
}
}
@@ -589,16 +599,16 @@
lappend result(packages) $package_key
# Find unsatisfied requirements
- foreach req $version(requires) {
+ foreach req [concat $version(extends) $version(requires)] {
set req_uri [lindex $req 0]
set req_version [lindex $req 1]
if { ![info exists provided($req_uri)] || \
[apm_version_names_compare $provided($req_uri) $req_version] == -1 } {
lappend failed($package_key) [list $req_uri $req_version]
if { [info exists provided($req_uri)] } {
- ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key requires $req_uri $req_version, but we only provide $provided($req_uri)"
+ ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key extends/requires $req_uri $req_version, but we only provide $provided($req_uri)"
} else {
- ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key requires $req_uri $req_version, but we don't have it"
+ ns_log Debug "apm_dependency_check_new: Failed dependency: $package_key extends/requires $req_uri $req_version, but we don't have it"
}
}
}
@@ -684,6 +694,8 @@
set pretty_plural $version(pretty-plural)
set initial_install_p $version(initial-install-p)
set singleton_p $version(singleton-p)
+ set implements_subsite_p $version(implements-subsite-p)
+ set inherit_templates_p $version(inherit-templates-p)
set auto_mount $version(auto-mount)
set version_name $version(name)
set version_uri $version(url)
@@ -706,7 +718,9 @@
$package_uri \
$package_type \
$initial_install_p \
- $singleton_p
+ $singleton_p \
+ $implements_subsite_p \
+ $inherit_templates_p
}
# Source Tcl procs and queries to be able
@@ -786,10 +800,22 @@
}
# Update all other package information.
- apm_package_install_dependencies -callback $callback $version(provides) $version(requires) $version_id
+ apm_package_install_dependencies -callback $callback \
+ $version(extends) $version(provides) $version(requires) $version_id
apm_package_install_owners -callback $callback $version(owners) $version_id
apm_package_install_callbacks -callback $callback $version(callbacks) $version_id
+ 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 {}
+ }
+ } else {
+ foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
+ db_list copy_inherited_params {}
+ }
+ }
+
apm_callback_and_log $callback "Installed $version(package-name), version $version(name).
"
} {
global errorInfo
@@ -1199,7 +1225,7 @@
}
}
-ad_proc -private apm_package_install_dependencies { {-callback apm_dummy_callback} provides requires version_id} {
+ad_proc -private apm_package_install_dependencies { {-callback apm_dummy_callback} extends provides requires version_id} {
Install all package dependencies.
@@ -1222,11 +1248,18 @@
apm_interface_add $version_id $interface_uri $interface_version
}
+ foreach item $extends {
+ set dependency_uri [lindex $item 0]
+ set dependency_version [lindex $item 1]
+ ns_log Debug "apm_package_install_dependencies: Registering dependency $dependency_uri, $dependency_version for $version_id"
+ apm_dependency_add extends $version_id $dependency_uri $dependency_version
+ }
+
foreach item $requires {
set dependency_uri [lindex $item 0]
set dependency_version [lindex $item 1]
ns_log Debug "apm_package_install_dependencies: Registering dependency $dependency_uri, $dependency_version for $version_id"
- apm_dependency_add $version_id $dependency_uri $dependency_version
+ apm_dependency_add requires $version_id $dependency_uri $dependency_version
}
}
@@ -1382,6 +1415,8 @@
package_type
initial_install_p
singleton_p
+ implements_subsite_p
+ inherit_templates_p
} {
Register the package in the system.
} {
@@ -2252,7 +2287,7 @@
if { ![regexp {^-?[0-9]+$} $maturity] } {
set error_message "Maturity must be integer"
} elseif { [expr {$maturity < -1 || $maturity > 3}] } {
- set error_message "Matuirity must be integer between -1 and 3"
+ set error_message "Maturity must be integer between -1 and 3"
}
}
Index: openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 16 Jun 2004 01:34:24 -0000 1.13
+++ openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 25 Nov 2008 17:08:49 -0000 1.14
@@ -80,6 +80,7 @@
begin
:1 := apm_package_version.add_dependency(
+ dependency_type => :dependency_type,
dependency_id => :dependency_id,
version_id => :version_id,
dependency_uri => :dependency_uri,
Index: openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 1 Apr 2004 20:56:29 -0000 1.14
+++ openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 25 Nov 2008 17:08:50 -0000 1.15
@@ -59,6 +59,7 @@
select apm_package_version__add_dependency(
+ :dependency_type,
:dependency_id,
:version_id,
:dependency_uri,
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v
diff -u -r1.79 -r1.80
--- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 27 Jun 2007 23:35:35 -0000 1.79
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 25 Nov 2008 17:08:50 -0000 1.80
@@ -138,7 +138,166 @@
ns_log $severity $message
}
+ad_proc apm_one_package_descendents {
+ package_key
+} {
+ global apm_visited_package_keys
+ global apm_package_descendents
+ foreach descendent [db_list get_descendents {}] {
+ if { [info exists apm_visited_package_keys($descendent)] } {
+ continue
+ }
+ set apm_visited_package_keys($descendent) 1
+ lappend apm_package_descendents $descendent
+ apm_one_package_descendents $descendent
+ }
+
+}
+
+ad_proc apm_build_subsite_packages_list {} {
+
+ nsv_set apm_subsite_packages_list package_keys {}
+
+ # Make sure old versions work ...
+ catch { nsv_set apm_subsite_packages_list package_keys [db_list get_subsites {}] }
+ if { [lsearch -exact [nsv_get apm_subsite_packages_list package_keys] acs-subsite] == -1 } {
+ nsv_lappend apm_subsite_packages_list package_keys acs-subsite
+ }
+
+}
+
+ad_proc apm_package_list_search_order {
+ package_list
+} {
+ Left-right, breadth-first traverse of the inheritance DAG.
+} {
+ global apm_visited_package_keys
+ global apm_package_search_order
+
+ foreach package_key $package_list {
+ if { [info exists apm_visited_package_keys($package_key)] } {
+ continue
+ }
+ lappend apm_package_search_order $package_key
+ set apm_visited_package_keys($package_key) 1
+ }
+
+ # Make sure old versions work ...
+ foreach package_key $package_list {
+ set inherit_templates_p 1
+ catch { db_1row get_inherit_templates_p {} }
+ if { [string is true $inherit_templates_p] } {
+ apm_package_list_search_order [db_list get_dependencies {}]
+ }
+ }
+}
+
+ad_proc apm_one_package_inherit_order {
+ package_key
+} {
+ global apm_visited_package_keys
+ global apm_package_inherit_order
+
+ if { [info exists apm_visited_package_keys($package_key)] } {
+ return
+ }
+ set apm_visited_package_keys($package_key) 1
+
+ foreach dependency [db_list get_dependencies {}] {
+ apm_one_package_inherit_order $dependency
+ }
+
+ lappend apm_package_inherit_order $package_key
+}
+
+ad_proc apm_one_package_load_libraries_dependencies {
+ package_key
+} {
+ global apm_visited_package_keys
+ global apm_package_load_libraries_order
+
+ if { [info exists apm_visited_package_keys($package_key)] } {
+ return
+ }
+ set apm_visited_package_keys($package_key) 1
+ set package_key_list ""
+
+ foreach dependency [db_list get_dependencies {}] {
+ apm_one_package_load_libraries_dependencies $dependency
+ }
+ lappend apm_package_load_libraries_order $package_key
+}
+
+ad_proc apm_build_one_package_relationships {
+ package_key
+} {
+
+ Builds the nsv dependency structures for a single package.
+
+} {
+ global apm_visited_package_keys
+ global apm_package_search_order
+ global apm_package_inherit_order
+ global apm_package_load_libraries_order
+ global apm_package_descendents
+
+ array unset apm_visited_package_keys
+ set apm_package_search_order [list]
+ apm_package_list_search_order $package_key
+ nsv_set apm_package_search_order $package_key $apm_package_search_order
+
+ array unset apm_visited_package_keys
+ set apm_package_inherit_order [list]
+ apm_one_package_inherit_order $package_key
+ nsv_set apm_package_inherit_order $package_key $apm_package_inherit_order
+
+ array unset apm_visited_package_keys
+ set apm_package_load_libraries_order [list]
+ apm_one_package_load_libraries_dependencies $package_key
+ nsv_set apm_package_load_libraries_order $package_key $apm_package_load_libraries_order
+
+ array unset apm_visited_package_keys
+ set apm_package_descendents [list]
+ apm_one_package_descendents $package_key
+ nsv_set apm_package_descendents $package_key $apm_package_descendents
+
+}
+
+ad_proc apm_build_package_relationships {} {
+
+ Builds the nsv dependency and ancestor structures.
+
+} {
+ foreach package_key [apm_enabled_packages] {
+ apm_build_one_package_relationships $package_key
+ }
+}
+
+ad_proc apm_package_descendents {
+ package_key
+} {
+ return [nsv_get apm_package_descendents $package_key]
+}
+
+ad_proc apm_package_inherit_order {
+ package_key
+} {
+ return [nsv_get apm_package_inherit_order $package_key]
+}
+
+ad_proc apm_package_search_order {
+ package_key
+} {
+ return [nsv_get apm_package_search_order $package_key]
+}
+
+ad_proc apm_package_load_libraries_order {
+ package_key
+} {
+ return [nsv_get apm_package_load_libraries_order $package_key]
+}
+
ad_proc -public apm_version_loaded_p { version_id } {
Returns 1 if a version of a package has been loaded and initialized, or 0 otherwise.
@@ -852,7 +1011,7 @@
{
-callback apm_dummy_callback
-dependency_id ""
- } version_id dependency_uri dependency_version
+ } dependency_type version_id dependency_uri dependency_version
} {
Add a dependency to a version.
@@ -863,17 +1022,7 @@
set dependency_id [db_null]
}
- return [db_exec_plsql dependency_add {
- begin
- :1 := apm_package_version.add_dependency(
- dependency_id => :dependency_id,
- version_id => :version_id,
- dependency_uri => :dependency_uri,
- dependency_version => :dependency_version
- );
- end;
- }]
-}
+ return [db_exec_plsql dependency_add {}] }
ad_proc -public apm_dependency_remove {dependency_id} {
@@ -1536,7 +1685,12 @@
apm_parameter_sync $package_key $package_id
- apm_invoke_callback_proc -package_key $package_key -type "after-instantiate" -arg_list [list package_id $package_id]
+ foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
+ apm_invoke_callback_proc \
+ -package_key $inherited_package_key \
+ -type after-instantiate \
+ -arg_list [list package_id $package_id]
+ }
return $package_id
}
@@ -1568,10 +1722,15 @@
} {
Deletes an instance of a package
} {
- apm_invoke_callback_proc -package_key [apm_package_key_from_id $package_id] \
- -type before-uninstantiate \
- -arg_list [list package_id $package_id]
+ set package_key [apm_package_key_from_id $package_id]
+ foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
+ apm_invoke_callback_proc \
+ -package_key $inherited_package_key \
+ -type before-uninstantiate \
+ -arg_list [list package_id $package_id]
+ }
+
db_exec_plsql apm_package_instance_delete {}
}
Index: openacs-4/packages/acs-tcl/tcl/apm-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.xql,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/acs-tcl/tcl/apm-procs.xql 29 Aug 2007 13:53:40 -0000 1.23
+++ openacs-4/packages/acs-tcl/tcl/apm-procs.xql 25 Nov 2008 17:08:50 -0000 1.24
@@ -1,6 +1,69 @@
+
+
+ select apv.package_key
+ from apm_package_versions apv, apm_package_dependencies apd
+ where apd.version_id = apv.version_id
+ and apv.enabled_p = 't'
+ and apd.dependency_type = 'extends'
+ and apd.service_uri = :package_key
+
+
+
+
+
+ select package_key
+ from apm_package_types
+ where implements_subsite_p = 't'
+
+
+
+
+
+ select inherit_templates_p
+ from apm_package_types
+ where package_key = :package_key
+
+
+
+
+
+ select apd.service_uri
+ from apm_package_versions apv, apm_package_dependencies apd
+ where apv.package_key = :package_key
+ and apv.installed_p = 't'
+ and apd.version_id = apv.version_id
+ and apd.dependency_type = 'extends'
+ order by apd.dependency_id
+
+
+
+
+
+ select apd.service_uri
+ from apm_package_versions apv, apm_package_dependencies apd
+ where apv.package_key = :package_key
+ and apv.installed_p = 't'
+ and apd.version_id = apv.version_id
+ and apd.dependency_type = 'extends'
+ order by apd.dependency_id desc
+
+
+
+
+
+ select apd.service_uri
+ from apm_package_versions apv, apm_package_dependencies apd
+ where apv.package_key = :package_key
+ and apv.installed_p = 't'
+ and apd.version_id = apv.version_id
+ and apd.dependency_type in ('requires', 'extends')
+ order by apd.dependency_id desc
+
+
+
select case when count(*) = 0 then 0 else 1 end from apm_package_versions
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 10 Jan 2007 21:22:12 -0000 1.26
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 25 Nov 2008 17:08:50 -0000 1.27
@@ -72,6 +72,8 @@
[ad_quotehtml $pretty_plural]
$initial_install_p
$singleton_p
+ $implements_subsite_p
+ $inherit_templates_p
${auto_mount_tag}
\n"
@@ -167,8 +169,9 @@
path
: a path to the file read
mtime
: the mtime of the file read
- provides
and requires
: lists of dependency
- information, containing elements of the form [list $url $version]
+ provides
, extends
, and requires
:
+ lists of dependency information, containing elements of the form
+ [list $url $version]
owners
: a list of owners containing elements of the form
[list $url $name]
files
: a list of files in the package,
@@ -255,8 +258,10 @@
set properties(package.type) [apm_attribute_value -default "apm_application" $package type]
set properties(package-name) [apm_tag_value $package package-name]
set properties(initial-install-p) [apm_tag_value -default "f" $package initial-install-p]
- set properties(singleton-p) [apm_tag_value -default "f" $package singleton-p]
set properties(auto-mount) [apm_tag_value -default "" $package auto-mount]
+ set properties(singleton-p) [apm_tag_value -default "f" $package singleton-p]
+ set properties(implements-subsite-p) [apm_tag_value -default "f" $package implements-subsite-p]
+ set properties(inherit-templates-p) [apm_tag_value -default "t" $package inherit-templates-p]
set properties(pretty-plural) [apm_tag_value -default "$properties(package-name)s" $package pretty-plural]
@@ -306,8 +311,9 @@
set properties(provides) [list]
set properties(requires) [list]
+ set properties(extends) [list]
- foreach dependency_type { provides requires } {
+ foreach dependency_type { provides requires extends } {
set dependency_types [xml_node_get_children_by_name $version $dependency_type]
foreach node $dependency_types {
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 24 Sep 2003 17:51:24 -0000 1.7
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 25 Nov 2008 17:08:50 -0000 1.8
@@ -11,6 +11,8 @@
t.package_type,
t.initial_install_p,
t.singleton_p,
+ t.implements_subsite_p,
+ t.inherit_templates_p,
v.*
from apm_package_versions v,
apm_package_types t
Index: openacs-4/packages/acs-tcl/tcl/install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/install-procs.tcl,v
diff -u -r1.24 -r1.25
--- openacs-4/packages/acs-tcl/tcl/install-procs.tcl 15 Nov 2008 17:13:03 -0000 1.24
+++ openacs-4/packages/acs-tcl/tcl/install-procs.tcl 25 Nov 2008 17:08:50 -0000 1.25
@@ -118,6 +118,7 @@
}
lappend pkg_info_list [pkg_info_new $package(package.key) \
$spec_file \
+ $package(extends) \
$package(provides) \
$package(requires)]
}
Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v
diff -u -r1.95 -r1.96
--- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 5 Nov 2008 09:50:21 -0000 1.95
+++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 25 Nov 2008 17:08:50 -0000 1.96
@@ -851,7 +851,9 @@
set roots [ns_info pageroot][string trimright [ad_conn package_url] /]
if { [ad_conn package_key] ne "" } {
- lappend roots [acs_root_dir]/packages/[ad_conn package_key]/www
+ foreach package_key [apm_package_search_order [ad_conn package_key]] {
+ lappend roots [acs_root_dir]/packages/$package_key/www
+ }
}
foreach root $roots {
Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v
diff -u -r1.83 -r1.84
--- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 11 Apr 2008 22:37:12 -0000 1.83
+++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 25 Nov 2008 17:08:50 -0000 1.84
@@ -142,7 +142,13 @@
db_dml update_package_context_id ""
}
- apm_invoke_callback_proc -package_key [apm_package_key_from_id $object_id] -type "after-mount" -arg_list [list node_id $node_id package_id $object_id]
+ set package_key [apm_package_key_from_id $object_id]
+ foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
+ apm_invoke_callback_proc \
+ -package_key $inherited_package_key \
+ -type after-mount \
+ -arg_list [list package_id $package_id node_id $node_id]
+ }
}
@@ -242,8 +248,15 @@
unmount an object from the site node
} {
set package_id [get_object_id -node_id $node_id]
- apm_invoke_callback_proc -package_key [apm_package_key_from_id $package_id] -type before-unmount -arg_list [list package_id $package_id node_id $node_id]
+ set package_key [apm_package_key_from_id $package_id]
+ foreach inherited_package_key [nsv_get apm_package_inherit_order $package_key] {
+ apm_invoke_callback_proc \
+ -package_key $inherited_package_key \
+ -type before-unmount \
+ -arg_list [list package_id $package_id node_id $node_id]
+ }
+
db_dml unmount_object {}
db_dml update_object_package_id {}
update_cache -node_id $node_id