Index: openacs-4/packages/acs-admin/www/apm/package-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-delete.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-admin/www/apm/package-delete.tcl 17 May 2003 09:36:29 -0000 1.6
+++ openacs-4/packages/acs-admin/www/apm/package-delete.tcl 1 Jun 2003 18:31:08 -0000 1.7
@@ -14,6 +14,67 @@
set db_type [db_type]
+set dependent_packages_list [db_list dependency_p {
+select package_key
+ from apm_package_versions av
+ where av.enabled_p = 't'
+ and av.installed_p = 't'
+ and exists (select 1 from
+ apm_package_dependencies ad
+ where ad.version_id = av.version_id
+ and ad.service_uri = :package_key
+ and ad.dependency_type = 'requires'
+ )
+}]
+
+if { [llength $dependent_packages_list] > 0 } {
+ set dependency_warning_text "
+The following packages depend on package $package_key
that you are about to delete:
+
+
+
+ [join $dependent_packages_list "
+
"]
+
+ You are about to delete package $package_key
which is part of the OpenACS core
+
+ WARNING +
+ +$kernel_deletion_warning + +$dependency_warning_text + ++Proceeding with the deletion of the package may render the system in a broken state. +
+" +} else { + set warning_text "" +} + set file_list "" foreach file [apm_get_package_files -package_key $package_key -file_types data_model_drop] { append file_list "Deleting a package removes all record of it from the APM's database.