Index: openacs-4/packages/acs-tcl/acs-tcl.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v
diff -u -r1.95.2.48 -r1.95.2.49
--- openacs-4/packages/acs-tcl/acs-tcl.info 15 Jul 2022 14:11:01 -0000 1.95.2.48
+++ openacs-4/packages/acs-tcl/acs-tcl.info 11 Aug 2022 13:49:46 -0000 1.95.2.49
@@ -9,7 +9,7 @@
f
t
-
+
OpenACS
The Kernel Tcl API library.
2021-09-15
@@ -18,7 +18,7 @@
GPL version 2
3
-
+
Index: openacs-4/packages/acs-tcl/lib/check-installed.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/lib/check-installed.tcl,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/acs-tcl/lib/check-installed.tcl 28 Jul 2020 11:11:33 -0000 1.3.2.1
+++ openacs-4/packages/acs-tcl/lib/check-installed.tcl 11 Aug 2022 13:49:46 -0000 1.3.2.2
@@ -18,12 +18,18 @@
set cdn [dict get $resource_info cdn]
set resource_name [dict get $resource_info resourceName]
+set version_dir [expr {
+ [dict exists $resource_info versionDir]
+ ? [dict get $resource_info versionDir]
+ : $version
+ }]
+
#
# Check, if the resources are already installed.
#
set is_installed [::util::resources::is_installed_locally \
-resource_info $resource_info \
- -version_dir $version ]
+ -version_dir $version_dir ]
if {$is_installed} {
#
# Tell the users, where the resources are installed.
@@ -36,7 +42,7 @@
#
set writable [util::resources::can_install_locally \
-resource_info $resource_info \
- -version_dir $version]
+ -version_dir $version_dir]
if {!$writable} {
#
# If we cannot install locally, tell the user were we want to
Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v
diff -u -r1.189.2.130 -r1.189.2.131
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 12 Jul 2022 15:15:01 -0000 1.189.2.130
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 11 Aug 2022 13:49:45 -0000 1.189.2.131
@@ -4006,6 +4006,9 @@
@author Gustaf Neumann
} {
set installed 1
+ set version_dir [version_dir \
+ -version_dir $version_dir \
+ -resource_info $resource_info]
set resource_dir [dict get $resource_info resourceDir]
set downloadFiles {}
ns_log notice "check downloadURLs <[dict exists $resource_info downloadURLs]> // [lsort [dict keys $resource_info]]"
@@ -4050,6 +4053,10 @@
@author Gustaf Neumann
} {
set can_install 1
+ set version_dir [version_dir \
+ -version_dir $version_dir \
+ -resource_info $resource_info]
+
set resource_dir [dict get $resource_info resourceDir]
if {![ad_file isdirectory $resource_dir]} {
@@ -4074,6 +4081,21 @@
return $can_install
}
+ ad_proc -public ::util::resources::version_dir {
+ {-resource_info:required}
+ {-version_dir ""}
+ } {
+
+ Obtain the version_dir either form the provided string or from
+ the resource_info dict.
+
+ } {
+ if {$version_dir eq "" && [dict exists $resource_info versionDir]} {
+ set version_dir [dict get $resource_info versionDir]
+ }
+ return $version_dir
+ }
+
ad_proc -private ::util::resources::download_helper {
-url
} {
@@ -4126,6 +4148,10 @@
@author Gustaf Neumann
} {
set resource_dir [dict get $resource_info resourceDir]
+ set version_dir [version_dir \
+ -version_dir $version_dir \
+ -resource_info $resource_info]
+
set can_install [::util::resources::can_install_locally \
-resource_info $resource_info \
-version_dir $version_dir]