Index: openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/packages-install.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 15 Feb 2003 23:58:33 -0000 1.6 +++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 25 Feb 2003 16:47:33 -0000 1.7 @@ -37,7 +37,7 @@ set dependency_results [apm_dependency_check -initial_install [apm_scan_packages -new [file join [acs_root_dir] packages]]] set dependencies_satisfied_p [lindex $dependency_results 0] set pkg_list [lindex $dependency_results 1] -apm_packages_full_install -callback apm_dummy_callback $pkg_list +apm_packages_full_install -callback apm_ns_write_callback $pkg_list # Complete the initial install. @@ -47,7 +47,7 @@ # Mount the main site cd [file join [acs_root_dir] packages acs-kernel sql [db_type]] - db_source_sql_file -callback apm_dummy_callback acs-install.sql + db_source_sql_file -callback apm_ns_write_callback acs-install.sql # Make sure the site-node cache is updated with the main site site_node::init_cache Index: openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl 30 Nov 2002 17:14:16 -0000 1.2 +++ openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl 25 Feb 2003 16:48:08 -0000 1.3 @@ -1,6 +1,6 @@ ad_library { - Utility routines need by the bootstrapping process. + Utility routines needed by the bootstrapping process. @creation-date 4 Apr 2001 @author Don Baccus (dhogaza@pacifier.com Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 17 Feb 2003 23:04:57 -0000 1.13 +++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 25 Feb 2003 16:48:08 -0000 1.14 @@ -140,6 +140,54 @@ return $type } +ad_proc -public apm_get_package_files { + {-package_key:required} + {-file_types {}} +} { +

+ Returns all files, or files of a certain types, belonging to an APM + package. Ignores files based on proc apm_include_file_p and determines file type + of files with proc apm_guess_file_type. Only returns file with no db type or a + db type matching that of the system. +

+ +

+ Goes directly to the filesystem to find + files instead of using a file listing in the package info file or the database. +

+ + @param package_key The key of the package to return file paths for + @param file_types The type of files to return. If not provided files of all types + recognized by the APM are returned. + + @return The paths, relative to the root dir of the package, of matching files. + + @author Peter Marklund + + @see apm_include_file_p + @see apm_guess_file_type + @see apm_guess_db_type +} { + set package_path [acs_package_root_dir $package_key] + set files [lsort [ad_find_all_files -check_file_func apm_include_file_p $package_path]] + + set matching_files [list] + foreach file $files { + set rel_path [string range $file [expr [string length $package_path] + 1] end] + set file_type [apm_guess_file_type $package_key $rel_path] + set file_db_type [apm_guess_db_type $package_key $rel_path] + + set type_match_p [expr [empty_string_p $file_types] || [lsearch $file_types $file_type] != -1] + set db_match_p [expr [empty_string_p $file_db_type] || [string equal $file_db_type [db_type]]] + + if { $type_match_p && $db_match_p } { + lappend matching_files $rel_path + } + } + + return $matching_files +} + ad_proc -private apm_parse_catalog_path { file_path } { Given the path of a file attempt to extract package_key, prefix, charset and locale @@ -275,9 +323,7 @@ return 0 } - set root_dir_len [string length [acs_root_dir]] - set rel_path [string range $__file [expr $root_dir_len + 1] end] - nsv_set apm_library_mtime $rel_path [file mtime $__file] + nsv_set apm_library_mtime [ad_make_relative_path $__file] [file mtime $__file] return 1 }