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.35.2.15 -r1.35.2.16 --- openacs-4/packages/acs-tcl/tcl/install-procs.tcl 27 Dec 2024 08:29:47 -0000 1.35.2.15 +++ openacs-4/packages/acs-tcl/tcl/install-procs.tcl 27 Dec 2024 09:01:59 -0000 1.35.2.16 @@ -136,7 +136,8 @@ regexp {(.*)/([^/]*)$} $mount_point match parent_url leaf_url set parent_id [site_node::get_node_id -url "/$parent_url"] - + ns_log notice install::xml::action::mount: parent_url '/$parent_url' has parent_id $parent_id + # technically this isn't safe - between us checking that the node exists # and using it, the node may have been deleted. # We could "select for update" but since it's in a memory cache anyway, @@ -147,8 +148,11 @@ if { [catch { array set site_node [site_node::get_from_url -exact -url "/$mount_point"] } error] } { set node_id [site_node::new -name $leaf_url -parent_id $parent_id] array set site_node [site_node::get_from_url -exact -url "/$mount_point"] + ns_log notice install::xml::action::mount: [list site_node::get_from_url -exact -url "/$mount_point"] lead to error, refetch leads to site_node [array get $site_node] } + ns_log notice install::xml::action::mount: comparing [string trimright $site_node(url) /] ne "/$mount_point" + if {[string trimright $site_node(url) /] ne "/$mount_point"} { # no such package mounted - good! set node_id $site_node(node_id) @@ -162,6 +166,7 @@ set context_id [install::xml::util::get_id $context_id] } } + if {$node_id ne ""} { lappend out "Mounting new instance of package $package_key at /$mount_point" 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.141.2.49 -r1.141.2.50 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 27 Dec 2024 08:00:24 -0000 1.141.2.49 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 27 Dec 2024 09:01:59 -0000 1.141.2.50 @@ -198,15 +198,15 @@ if { $context_id eq "" } { set context_id [site_node::closest_ancestor_package -node_id $node_id] } - #ns_log notice "site_node::instantiate_and_mount -node_id '$node_id' context_id '$context_id'" + ns_log notice "site_node::instantiate_and_mount -node_id '$node_id' context_id '$context_id'" # Instantiate the package set package_id [apm_package_instance_new \ -package_id $package_id \ -package_key $package_key \ -instance_name $package_name \ -context_id $context_id] - #ns_log notice "site_node::instantiate_and_mount -node_id '$node_id' context_id '$context_id' package_id '$package_id'" + ns_log notice "site_node::instantiate_and_mount -node_id '$node_id' context_id '$context_id' -> new package_id '$package_id'" # Mount the package site_node::mount -node_id $node_id -object_id $package_id