Index: openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl 10 Sep 2002 22:21:59 -0000 1.2
+++ openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl 10 Mar 2003 19:59:31 -0000 1.3
@@ -9,7 +9,6 @@
{version_id:integer}
}
db_transaction {
- apm_filelist_update $version_id
apm_generate_tarball $version_id
} on_error {
ad_return_complaint "APM Generation Error" "The database returned the following error message:
Index: openacs-4/packages/acs-admin/www/apm/write-all-specs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/write-all-specs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/apm/write-all-specs.tcl 10 Sep 2002 22:21:59 -0000 1.4
+++ openacs-4/packages/acs-admin/www/apm/write-all-specs.tcl 10 Mar 2003 19:59:31 -0000 1.5
@@ -24,7 +24,6 @@
ns_log Debug "Generating package specificaiton for $package_key"
ns_write "
$pretty_name $version_name... "
if { [catch {
- apm_filelist_update $version_id
apm_package_install_spec $version_id
} error] } {
ns_write "error: $error\n"
Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 10 Mar 2003 19:19:14 -0000 1.17
+++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 10 Mar 2003 19:59:04 -0000 1.18
@@ -232,23 +232,6 @@
}
-ad_proc -public apm_file_add {
- {
- -file_id ""
- }
- version_id path file_type db_type
-} {
-
- Adds one file into the specified version.
- @return the id of the file.
-
-} {
- if { [empty_string_p $file_id] } {
- set file_id [db_null]
- }
- return [db_exec_plsql apm_file_add {}]
-}
-
ad_proc -private apm_files_load {
{-force_reload:boolean 0}
{-callback apm_dummy_callback}
@@ -320,64 +303,6 @@
}
}
-ad_proc -public apm_file_remove {path version_id} {
-
- Removes a files from a version.
-
-} {
- return [db_exec_plsql apm_file_remove {}]
-}
-
-ad_proc -public apm_version_from_file {file_id} {
-
- @return The version id of the specified file.
-} {
- return [db_string apm_version_id_from_file {
- select version_id from apm_package_files
- where file_id = :file_id
- } -default 0]
-}
-
-ad_proc apm_filelist_update {version_id} {
-
- Brings the .info list of files in sync with the directory structure.
-
-} {
- set package_key [db_string package_key_for_version_id {
- select package_key from apm_package_versions
- where version_id = :version_id
- }]
-
- # Add any new files.
- foreach file [lsort [ad_find_all_files [acs_package_root_dir $package_key]]] {
- set relative_path [ad_make_relative_path $file]
-
- # Now kill "packages" and the package_key from the path.
- set components [split $relative_path "/"]
-
- # DRB: we really don't want to include the CVS directories in the .info
- # file...
- if { [lsearch $components "CVS"] == -1 } {
- set relative_path [join [lrange $components 2 [llength $components]] "/"]
- set type [apm_guess_file_type $package_key $relative_path]
- set db_type [apm_guess_db_type $package_key $relative_path]
- apm_file_add $version_id $relative_path $type $db_type
- }
- }
-
- # Remove stale files.
- db_foreach apm_all_files {
- select f.file_id, f.path
- from apm_package_files f
- where f.version_id = :version_id
- order by path
- } {
- if { ![file exists "[acs_package_root_dir $package_key]/$path"] } {
- apm_file_remove $path $version_id
- }
- }
-}
-
ad_proc -public pkg_home {package_key} {
@return A server-root relative path to the directory for a package. Usually /packages/package-key
Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-tcl/tcl/apm-file-procs.xql 4 May 2001 06:04:28 -0000 1.3
+++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.xql 10 Mar 2003 19:59:04 -0000 1.4
@@ -50,49 +50,5 @@
select package_key from apm_package_version_info where version_id = :version_id
-
-
-
-
- select version_id from apm_package_files
- where file_id = :file_id
-
-
-
-
-
-
-
-
- select package_key from apm_package_versions
- where version_id = :version_id
-
-
-
-
-
-
-
-
- select f.file_id, f.path
- from apm_package_files f
- where f.version_id = :version_id
- order by path
-
-
-
-
-
-
-
-
- select path from apm_package_files
- where version_id = :version_id
- $type_sql $db_type_sql order by path
-
-
-
-
-
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.36 -r1.37
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 10 Mar 2003 19:19:14 -0000 1.36
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 10 Mar 2003 19:59:04 -0000 1.37
@@ -895,26 +895,6 @@
}
}
-ad_proc -private apm_package_install_files { {-callback apm_dummy_callback} files version_id } {
-
- Install all files related to the package.
-
-} {
- db_dml files_delete {
- delete from apm_package_files where version_id = :version_id
- }
-
- db_transaction {
- foreach item $files {
-
- set path [lindex $item 0]
- set file_type [lindex $item 1]
- set db_type [lindex $item 2]
- apm_file_add $version_id $path $file_type $db_type
- }
- }
-}
-
ad_proc -private apm_package_install_callbacks {
{-callback apm_dummy_callback}
callback_list
@@ -962,29 +942,12 @@
db_transaction {
ns_log Debug "APM: Determining path of .info file."
- set info_file_name "$package_key.info"
- # Make sure we have a .info file set up in the data model.
- if { [db_0or1row package_spec_path_select {
- select path
- from apm_package_files
- where version_id = :version_id
- and file_type = 'package_spec'
- and path = :info_file_name
- }] } {
- # The .info file was already there. The path to is is now in $path.
- } else {
- # Nothing there! We need to add a .info file.
- set path "$package_key.info"
- apm_file_add $version_id $path package_spec ""
- }
+ set path "[acs_package_root_dir $package_key]/$package_key.info"
+
ns_log Debug "APM: Writing APM .info file to the database."
- db_dml apm_spec_file_register {
- update apm_package_types
- set spec_file_path = :path
- where package_key = :package_key
- }
+ db_dml apm_spec_file_register {}
ns_log Debug "APM: Writing .info file."
- set path "$root/$package_key.info"
+
set file [open $path "w"]
puts -nonewline $file $spec
close $file
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql 23 Jan 2003 17:55:24 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql 10 Mar 2003 19:59:04 -0000 1.3
@@ -73,15 +73,6 @@
-
-
-
-
- delete from apm_package_files where version_id = :version_id
-
-
-
-
@@ -91,21 +82,7 @@
-
-
-
-
- select path
- from apm_package_files
- where version_id = :version_id
- and file_type = 'package_spec'
- and path = :info_file_name
-
-
-
-
-