Index: openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl,v
diff -u -r1.6 -r1.6.2.1
--- openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl 10 Mar 2010 00:44:03 -0000 1.6
+++ openacs-4/packages/acs-admin/www/apm/version-dependencies.tcl 10 Apr 2010 23:00:30 -0000 1.6.2.1
@@ -27,7 +27,7 @@
doc_body_append "
[string totitle $dependency_type_prep] service $service_uri, version $service_version"
if { $dependency_type ne "provide" } {
- doc_body_append "(remove)\n"
+ doc_body_append "(remove)\n"
}
# If this package provides a service, show a list of all packages that require it,
Index: openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl 5 Jan 2010 01:34:54 -0000 1.4
+++ openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl 10 Apr 2010 23:00:30 -0000 1.4.2.1
@@ -7,22 +7,21 @@
{version_id:integer}
{dependency_id:integer}
dependency_type:notnull
+ package_key:notnull
}
db_transaction {
switch $dependency_type {
- provide {
+
+ provide - require {
apm_dependency_remove $dependency_id
+ }
+ embed - extend {
+ apm_unregister_disinherited_params $package_key $dependency_id
+ apm_dependency_remove $dependency_id
+ apm_build_one_package_relationships $package_key
}
- require {
- apm_interface_remove $dependency_id
- }
-
- extend {
- apm_interface_remove $dependency_id
- }
-
default {
ad_return complaint 1 "Dependency Entry Error: Depenendencies are either interfaces or requirements."
}
Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-admin/www/apm/version-parameters-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2.2.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-admin/www/apm/version-parameters-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-admin/www/apm/version-parameters.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-parameters.tcl,v
diff -u -r1.7 -r1.7.2.1
--- openacs-4/packages/acs-admin/www/apm/version-parameters.tcl 30 Mar 2010 22:06:51 -0000 1.7
+++ openacs-4/packages/acs-admin/www/apm/version-parameters.tcl 10 Apr 2010 23:00:30 -0000 1.7.2.1
@@ -63,10 +63,10 @@
}
}
+set parent_package_keys [lrange [apm_one_package_inherit_order $package_key] 0 end-1]
-
append body "[ad_table -Torderby $orderby \
- -bind [ad_tcl_vars_to_ns_set version_id package_key] \
+ -bind [ad_tcl_vars_to_ns_set version_id package_key parent_package_keys] \
-Textra_vars {version_id} \
-Tmissing_text "No parameters registered in this section." \
parameter_table "" $table_def]
Index: openacs-4/packages/acs-admin/www/apm/version-parameters.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-parameters.xql,v
diff -u -r1.1 -r1.1.24.1
--- openacs-4/packages/acs-admin/www/apm/version-parameters.xql 27 Apr 2001 01:41:12 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-parameters.xql 10 Apr 2010 23:00:30 -0000 1.1.24.1
@@ -11,5 +11,21 @@
+
+
+
+ select ap.parameter_name, coalesce(ap.description, 'No Description') as description,
+ ap.datatype, ap.default_value, ap.parameter_id, ap.scope,
+ coalesce(ap.section_name, 'No Section') as section_name
+ from apm_parameters ap
+ where package_key = :package_key
+ and not exists (select 1
+ from apm_parameters ap2
+ where ap.parameter_name = ap2.parameter_name
+ and ap2.package_key in ('[join $parent_package_keys ',']'))
+ $sql_clauses
+
+
+
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.105 -r1.105.2.1
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 1 Apr 2010 23:21:01 -0000 1.105
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 10 Apr 2010 23:00:30 -0000 1.105.2.1
@@ -987,6 +987,18 @@
return $version_id
}
+ad_proc apm_unregister_disinherited_params { package_key dependency_id } {
+
+ Remove parameters for package_key that have been disinherited (i.e., the
+ dependency that caused them to be inherited have been removed). Called only
+ by the APM and keep it that way, please.
+
+} {
+ foreach parameter_id [db_list get_parameter_ids {}] {
+ apm_parameter_unregister $parameter_id
+ }
+}
+
ad_proc apm_copy_param_to_descendents { new_package_key parameter_name } {
Copy a new parameter in a package to its descendents. Called when a package is
upgraded or a parameter added in the APM.
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.9 -r1.9.2.1
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql 31 Mar 2010 18:08:59 -0000 1.9
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.xql 10 Apr 2010 23:00:30 -0000 1.9.2.1
@@ -89,6 +89,19 @@
+
+
+ select ap.parameter_id
+ from apm_parameters ap
+ where ap.package_key = :package_key
+ and exists (select 1
+ from apm_parameters ap2, apm_package_dependencies apd
+ where ap2.package_key = apd.service_uri
+ and ap2.parameter_name = ap.parameter_name
+ and apd.dependency_id = :dependency_id)
+
+
+
select ap.*