|
To create a new version of the package, type a new version number and
update the version URL accordingly. Leave the version name and URL alone to
Index: openacs-4/packages/acs-admin/www/apm/version-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-edit.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/apm/version-edit.xql 27 Apr 2001 01:41:12 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-edit.xql 9 May 2001 22:32:25 -0000 1.2
@@ -7,7 +7,7 @@
select version_id, package_key, package_uri, pretty_name, version_name, version_uri,
summary, description_format, description, release_date, vendor, vendor_uri,
enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p, activation_date, tarball_length,
- deactivation_date, distribution_uri, distribution_date
+ deactivation_date, distribution_uri, distribution_date, singleton_p, initial_install_p
from apm_package_version_info where version_id = :version_id
Index: openacs-4/packages/acs-admin/www/apm/version-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-admin/www/apm/version-view.tcl 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-admin/www/apm/version-view.tcl 9 May 2001 22:32:25 -0000 1.3
@@ -9,7 +9,7 @@
db_1row apm_all_version_info {
select version_id, package_key, package_uri, pretty_name, version_name, version_uri,
- summary, description_format, description,
+ summary, description_format, description, singleton_p, initial_install_p,
to_char(release_date, 'Month DD, YYYY') as release_date , vendor, vendor_uri,
enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p,
to_char(activation_date, 'Month DD, YYYY') as activation_date,
@@ -152,6 +152,8 @@
Package Name: | $pretty_name |
Version: | $version_name |
+OpenACS Core: | $initial_install_p |
+Singleton: | $singleton_p |
Status: | $status |
Data Model: | $data_model_status |
"
Index: openacs-4/packages/acs-admin/www/apm/version-view.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-view.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/apm/version-view.xql 27 Apr 2001 01:41:12 -0000 1.1
+++ openacs-4/packages/acs-admin/www/apm/version-view.xql 9 May 2001 22:32:25 -0000 1.2
@@ -5,7 +5,7 @@
select version_id, package_key, package_uri, pretty_name, version_name, version_uri,
- summary, description_format, description,
+ summary, description_format, description, singleton_p, initial_install_p,
to_char(release_date, 'Month DD, YYYY') as release_date , vendor, vendor_uri,
enabled_p, installed_p, tagged_p, imported_p, data_model_loaded_p,
to_char(activation_date, 'Month DD, YYYY') as activation_date,
Index: openacs-4/packages/acs-admin/www/users/one-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/one-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/users/one-oracle.xql 29 Apr 2001 00:47:48 -0000 1.1
+++ openacs-4/packages/acs-admin/www/users/one-oracle.xql 9 May 2001 22:32:25 -0000 1.2
@@ -3,6 +3,27 @@
oracle8.1.6
+
+
+ select first_names, last_name, email, nvl(screen_name,'< none set up >') as screen_name, creation_date, creation_ip, last_visit, member_state, email_verified_p
+from cc_users
+where user_id = :user_id
+
+
+
+
+
+
+ select live_revision as revision_id, nvl(title,'view this portrait') portrait_title
+from acs_rels a, cr_items c, cr_revisions cr
+where a.object_id_two = c.item_id
+and c.live_revision = cr.revision_id
+and a.object_id_one = :user_id
+and a.rel_type = 'user_portrait_rel'
+
+
+
+
select at.pretty_name, at.pretty_plural, a.creation_date, acs_object.name(a.object_id) object_name
Index: openacs-4/packages/acs-api-browser/acs-api-browser.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/acs-api-browser.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-api-browser/acs-api-browser.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-api-browser/acs-api-browser.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS API Browser
ACS API Browsers
t
+ t
Index: openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 18 Apr 2001 02:00:59 -0000 1.4
+++ openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 9 May 2001 22:32:25 -0000 1.5
@@ -5,6 +5,7 @@
OpenACS Bootstrap Installer
OpenACS Bootstrap Installers
t
+ t
Index: openacs-4/packages/acs-bootstrap-installer/installer/auto-install.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/auto-install.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-bootstrap-installer/installer/auto-install.tcl 12 Apr 2001 16:58:18 -0000 1.1
+++ openacs-4/packages/acs-bootstrap-installer/installer/auto-install.tcl 9 May 2001 22:32:25 -0000 1.2
@@ -84,7 +84,7 @@
ns_write " Installing packages.
"
# Attempt to install all packages.
-set dependency_results [apm_dependency_check [apm_scan_packages -new [acs_root_dir]/packages]]
+set dependency_results [apm_dependency_check -initial_install [apm_scan_packages -new [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_ns_write_callback $pkg_list
Index: openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/installer/Attic/install-data-model.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl 12 Apr 2001 16:58:18 -0000 1.1
+++ openacs-4/packages/acs-bootstrap-installer/installer/install-data-model.tcl 9 May 2001 22:32:25 -0000 1.2
@@ -63,7 +63,7 @@
apm_version_enable -callback apm_ns_write_callback [apm_package_install -callback apm_ns_write_callback "[file join [acs_root_dir] packages acs-kernel acs-kernel.info]"]
# Preload all the .info files so the next page is snappy.
-apm_dependency_check [apm_scan_packages -new [file join [acs_root_dir] packages]]
+apm_dependency_check -initial_install [apm_scan_packages -new [file join [acs_root_dir] packages]]
ns_write "
[install_next_button "packages-install"]
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.1 -r1.2
--- openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 12 Apr 2001 16:58:18 -0000 1.1
+++ openacs-4/packages/acs-bootstrap-installer/installer/packages-install.tcl 9 May 2001 22:32:25 -0000 1.2
@@ -24,7 +24,7 @@
"
# Attempt to install all packages.
-set dependency_results [apm_dependency_check [apm_scan_packages -new [file join [acs_root_dir] packages]]]
+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_ns_write_callback $pkg_list
Index: openacs-4/packages/acs-content-repository/acs-content-repository.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-content-repository/acs-content-repository.info 3 May 2001 04:00:49 -0000 1.4
+++ openacs-4/packages/acs-content-repository/acs-content-repository.info 9 May 2001 22:32:25 -0000 1.5
@@ -5,6 +5,7 @@
ACS Content Repository
ACS Content Repository Services
t
+ t
Index: openacs-4/packages/acs-core-docs/acs-core-docs.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/acs-core-docs.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-core-docs/acs-core-docs.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-core-docs/acs-core-docs.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS Core Documents
ACS Core Documents
t
+ t
Index: openacs-4/packages/acs-kernel/acs-kernel.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-kernel/acs-kernel.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-kernel/acs-kernel.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS Kernel
ACS Kernel Services
t
+ t
Index: openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql 5 May 2001 17:39:19 -0000 1.3
+++ openacs-4/packages/acs-kernel/sql/oracle/apm-create.sql 9 May 2001 22:32:25 -0000 1.4
@@ -32,6 +32,9 @@
check (package_type in ('apm_application', 'apm_service')),
spec_file_path varchar2(1500),
spec_file_mtime integer,
+ initial_install_p char(1) default 'f' not null
+ constraint apm_packages_init_install_p_ck
+ check (initial_install_p in ('t', 'f')),
singleton_p char(1) default 'f' not null
constraint apm_packages_site_avail_p_ck
check (singleton_p in ('t', 'f'))
@@ -69,6 +72,10 @@
restricted to the acs-admin/ subsite.
';
+comment on column apm_package_types.initial_install_p is '
+ Indicates if the package should be installed during initial installation,
+ in other words whether or not this package is part of the OpenACS core.
+';
begin
-- Create a new object type for packages.
@@ -131,6 +138,14 @@
pretty_plural => 'Singletons'
);
+ attr_id := acs_attribute.create_attribute(
+ object_type => 'apm_package',
+ attribute_name => 'initial_install_p',
+ datatype => 'boolean',
+ pretty_name => 'Initial Install',
+ pretty_plural => 'Initial Installs'
+ );
+
end;
/
show errors;
@@ -482,11 +497,11 @@
-- DCW - 2001-05-04, converted tarball storage to use content repository.
create or replace view apm_package_version_info as
- select v.package_key, t.package_uri, t.pretty_name, v.version_id, v.version_name,
+ select v.package_key, t.package_uri, t.pretty_name, t.singleton_p, t.initial_install_p,
+ v.version_id, v.version_name,
v.version_uri, v.summary, v.description_format, v.description, v.release_date,
v.vendor, v.vendor_uri, v.enabled_p, v.installed_p, v.tagged_p, v.imported_p, v.data_model_loaded_p,
v.activation_date, v.deactivation_date,
- -- dbms_lob.getlength(distribution_tarball) tarball_length,
nvl(v.content_length,0) as tarball_length,
distribution_uri, distribution_date
from apm_package_types t, apm_package_versions v
@@ -886,6 +901,8 @@
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
package_type in apm_package_types.package_type%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -904,6 +921,8 @@
default null,
package_type in apm_package_types.package_type%TYPE
default null,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default null,
singleton_p in apm_package_types.singleton_p%TYPE
default null,
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -927,6 +946,8 @@
pretty_name in apm_package_types.pretty_name%TYPE,
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -947,6 +968,8 @@
pretty_name in apm_package_types.pretty_name%TYPE,
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1065,6 +1088,10 @@
package_id in apm_packages.package_id%TYPE
);
+ function initial_install_p (
+ package_key in apm_packages.package_key%TYPE
+ ) return integer;
+
function singleton_p (
package_key in apm_packages.package_key%TYPE
) return integer;
@@ -1237,6 +1264,7 @@
pretty_plural in acs_object_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
package_type in apm_package_types.package_type%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE,
singleton_p in apm_package_types.singleton_p%TYPE,
spec_file_path in apm_package_types.spec_file_path%TYPE default null,
spec_file_mtime in apm_package_types.spec_file_mtime%TYPE default null
@@ -1252,6 +1280,8 @@
default null,
package_type in apm_package_types.package_type%TYPE
default null,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default null,
singleton_p in apm_package_types.singleton_p%TYPE
default null,
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1348,6 +1378,8 @@
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
package_type in apm_package_types.package_type%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1363,6 +1395,7 @@
pretty_plural => register_package.pretty_plural,
package_uri => register_package.package_uri,
package_type => register_package.package_type,
+ initial_install_p => register_package.initial_install_p,
singleton_p => register_package.singleton_p,
spec_file_path => register_package.spec_file_path,
spec_file_mtime => spec_file_mtime
@@ -1379,6 +1412,8 @@
default null,
package_type in apm_package_types.package_type%TYPE
default null,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default null,
singleton_p in apm_package_types.singleton_p%TYPE
default null,
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1395,6 +1430,7 @@
pretty_plural => update_package.pretty_plural,
package_uri => update_package.package_uri,
package_type => update_package.package_type,
+ initial_install_p => update_package.initial_install_p,
singleton_p => update_package.singleton_p,
spec_file_path => update_package.spec_file_path,
spec_file_mtime => update_package.spec_file_mtime
@@ -1431,6 +1467,8 @@
pretty_name in apm_package_types.pretty_name%TYPE,
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1446,6 +1484,7 @@
pretty_plural => register_application.pretty_plural,
package_uri => register_application.package_uri,
package_type => 'apm_application',
+ initial_install_p => register_application.initial_install_p,
singleton_p => register_application.singleton_p,
spec_file_path => register_application.spec_file_path,
spec_file_mtime => register_application.spec_file_mtime
@@ -1469,6 +1508,8 @@
pretty_name in apm_package_types.pretty_name%TYPE,
pretty_plural in apm_package_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default 'f',
singleton_p in apm_package_types.singleton_p%TYPE
default 'f',
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -1484,6 +1525,7 @@
pretty_plural => register_service.pretty_plural,
package_uri => register_service.package_uri,
package_type => 'apm_service',
+ initial_install_p => register_service.initial_install_p,
singleton_p => register_service.singleton_p,
spec_file_path => register_service.spec_file_path,
spec_file_mtime => register_service.spec_file_mtime
@@ -1848,6 +1890,24 @@
);
end delete;
+ function initial_install_p (
+ package_key in apm_packages.package_key%TYPE
+ ) return integer
+ is
+ v_initial_install_p integer;
+ begin
+ select 1 into v_initial_install_p
+ from apm_package_types
+ where package_key = initial_install_p.package_key
+ and initial_install_p = 't';
+ return v_initial_install_p;
+
+ exception
+ when NO_DATA_FOUND
+ then
+ return 0;
+ end initial_install_p;
+
function singleton_p (
package_key in apm_packages.package_key%TYPE
) return integer
@@ -2424,6 +2484,7 @@
pretty_plural in acs_object_types.pretty_plural%TYPE,
package_uri in apm_package_types.package_uri%TYPE,
package_type in apm_package_types.package_type%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE,
singleton_p in apm_package_types.singleton_p%TYPE,
spec_file_path in apm_package_types.spec_file_path%TYPE default null,
spec_file_mtime in apm_package_types.spec_file_mtime%TYPE default null
@@ -2432,11 +2493,11 @@
begin
insert into apm_package_types
(package_key, pretty_name, pretty_plural, package_uri, package_type,
- spec_file_path, spec_file_mtime, singleton_p)
+ spec_file_path, spec_file_mtime, initial_install_p, singleton_p)
values
(create_type.package_key, create_type.pretty_name, create_type.pretty_plural,
create_type.package_uri, create_type.package_type, create_type.spec_file_path,
- create_type.spec_file_mtime, create_type.singleton_p);
+ create_type.spec_file_mtime, create_type.initial_install_p, create_type.singleton_p);
end create_type;
function update_type(
@@ -2449,6 +2510,8 @@
default null,
package_type in apm_package_types.package_type%TYPE
default null,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default null,
singleton_p in apm_package_types.singleton_p%TYPE
default null,
spec_file_path in apm_package_types.spec_file_path%TYPE
@@ -2465,6 +2528,7 @@
package_type = nvl(update_type.package_type, package_type),
spec_file_path = nvl(update_type.spec_file_path, spec_file_path),
spec_file_mtime = nvl(update_type.spec_file_mtime, spec_file_mtime),
+ initial_install_p = nvl(update_type.initial_install_p, initial_install_p),
singleton_p = nvl(update_type.singleton_p, singleton_p)
where package_key = update_type.package_key;
return update_type.package_key;
Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 5 May 2001 17:39:19 -0000 1.16
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 9 May 2001 22:32:25 -0000 1.17
@@ -32,6 +32,7 @@
check (package_type in ('apm_application', 'apm_service')),
spec_file_path varchar(1500),
spec_file_mtime integer,
+ initial_install_p boolean default 'f' not null,
singleton_p boolean default 'f' not null
);
@@ -61,6 +62,11 @@
the information in the database appropriately.
';
+comment on column apm_package_types.initial_install_p is '
+ Indicates if the package should be installed during initial installation,
+ in other words whether or not this package is part of the OpenACS core.
+';
+
comment on column apm_package_types.singleton_p is '
Indicates if the package can be used for subsites. If this is set to
''t'', the package can be enabled for any subsite. Otherwise, it is
@@ -167,6 +173,22 @@
attr_id := acs_attribute__create_attribute (
''apm_package'',
+ ''initial_install_p'',
+ ''boolean'',
+ ''Initial Install'',
+ ''Initial Installs'',
+ null,
+ null,
+ null,
+ 1,
+ 1,
+ null,
+ ''type_specific'',
+ ''f''
+ );
+
+ attr_id := acs_attribute__create_attribute (
+ ''apm_package'',
''singleton_p'',
''boolean'',
''Singleton'',
@@ -649,11 +671,11 @@
-- DCW - 2001-05-04, converted tarball storage to use content repository.
create view apm_package_version_info as
- select v.package_key, t.package_uri, t.pretty_name, v.version_id, v.version_name,
+ select v.package_key, t.package_uri, t.pretty_name, t.singleton_p, t.initial_install_p,
+ v.version_id, v.version_name,
v.version_uri, v.summary, v.description_format, v.description, v.release_date,
v.vendor, v.vendor_uri, v.enabled_p, v.installed_p, v.tagged_p, v.imported_p, v.data_model_loaded_p,
v.activation_date, v.deactivation_date,
--- dbms_lob.getlength(distribution_tarball) tarball_length,
coalesce(v.content_length,0) as tarball_length,
distribution_uri, distribution_date
from apm_package_types t, apm_package_versions v
@@ -1166,490 +1188,26 @@
drop function inline_7 ();
-
--- show errors
-
--- Public Programmer level API.
--- create or replace package apm
--- as
--- procedure register_package (
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in apm_package_types.pretty_name%TYPE,
--- pretty_plural in apm_package_types.pretty_plural%TYPE,
--- package_uri in apm_package_types.package_uri%TYPE,
--- package_type in apm_package_types.package_type%TYPE,
--- singleton_p in apm_package_types.singleton_p%TYPE
--- default 'f',
--- spec_file_path in apm_package_types.spec_file_path%TYPE
--- default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
--- default null
--- );
---
--- function update_package (
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in apm_package_types.pretty_name%TYPE
--- default null,
--- pretty_plural in apm_package_types.pretty_plural%TYPE
--- default null,
--- package_uri in apm_package_types.package_uri%TYPE
--- default null,
--- package_type in apm_package_types.package_type%TYPE
--- default null,
--- singleton_p in apm_package_types.singleton_p%TYPE
--- default null,
--- spec_file_path in apm_package_types.spec_file_path%TYPE
--- default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
--- default null
--- ) return apm_package_types.package_type%TYPE;
---
--- procedure unregister_package (
--- package_key in apm_package_types.package_key%TYPE,
--- cascade_p in char default 't'
--- );
---
--- function register_p (
--- package_key in apm_package_types.package_key%TYPE
--- ) return integer;
---
--- -- Informs the APM that this application is available for use.
--- procedure register_application (
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in apm_package_types.pretty_name%TYPE,
--- pretty_plural in apm_package_types.pretty_plural%TYPE,
--- package_uri in apm_package_types.package_uri%TYPE,
--- singleton_p in apm_package_types.singleton_p%TYPE
--- default 'f',
--- spec_file_path in apm_package_types.spec_file_path%TYPE
--- default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
--- default null
--- );
---
--- -- Remove the application from the system.
--- procedure unregister_application (
--- package_key in apm_package_types.package_key%TYPE,
--- -- Delete all objects associated with this application.
--- cascade_p in char default 'f'
--- );
---
--- procedure register_service (
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in apm_package_types.pretty_name%TYPE,
--- pretty_plural in apm_package_types.pretty_plural%TYPE,
--- package_uri in apm_package_types.package_uri%TYPE,
--- singleton_p in apm_package_types.singleton_p%TYPE
--- default 'f',
--- spec_file_path in apm_package_types.spec_file_path%TYPE
--- default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
--- default null
--- );
---
--- -- Remove the service from the system.
--- procedure unregister_service (
--- package_key in apm_package_types.package_key%TYPE,
--- -- Delete all objects associated with this service.
--- cascade_p in char default 'f'
--- );
---
--- -- Indicate to APM that a parameter is available to the system.
--- function register_parameter (
--- parameter_id in apm_parameters.parameter_id%TYPE
--- default null,
--- package_key in apm_parameters.package_key%TYPE,
--- parameter_name in apm_parameters.parameter_name%TYPE,
--- description in apm_parameters.description%TYPE
--- default null,
--- datatype in apm_parameters.datatype%TYPE
--- default 'string',
--- default_value in apm_parameters.default_value%TYPE
--- default null,
--- section_name in apm_parameters.section_name%TYPE
--- default null,
--- min_n_values in apm_parameters.min_n_values%TYPE
--- default 1,
--- max_n_values in apm_parameters.max_n_values%TYPE
--- default 1
--- ) return apm_parameters.parameter_id%TYPE;
---
--- function update_parameter (
--- parameter_id in apm_parameters.parameter_id%TYPE,
--- parameter_name in apm_parameters.parameter_name%TYPE
--- default null,
--- description in apm_parameters.description%TYPE
--- default null,
--- datatype in apm_parameters.datatype%TYPE
--- default 'string',
--- default_value in apm_parameters.default_value%TYPE
--- default null,
--- section_name in apm_parameters.section_name%TYPE
--- default null,
--- min_n_values in apm_parameters.min_n_values%TYPE
--- default 1,
--- max_n_values in apm_parameters.max_n_values%TYPE
--- default 1
--- ) return apm_parameters.parameter_name%TYPE;
---
--- function parameter_p(
--- package_key in apm_package_types.package_key%TYPE,
--- parameter_name in apm_parameters.parameter_name%TYPE
--- ) return integer;
---
--- -- Remove any uses of this parameter.
--- procedure unregister_parameter (
--- parameter_id in apm_parameters.parameter_id%TYPE
--- default null
--- );
---
--- -- Return the value of this parameter for a specific package and parameter.
--- function get_value (
--- parameter_id in apm_parameter_values.parameter_id%TYPE,
--- package_id in apm_packages.package_id%TYPE
--- ) return apm_parameter_values.attr_value%TYPE;
---
--- function get_value (
--- package_id in apm_packages.package_id%TYPE,
--- parameter_name in apm_parameters.parameter_name%TYPE
--- ) return apm_parameter_values.attr_value%TYPE;
---
--- -- Sets a value for a parameter for a package instance.
--- procedure set_value (
--- parameter_id in apm_parameter_values.parameter_id%TYPE,
--- package_id in apm_packages.package_id%TYPE,
--- attr_value in apm_parameter_values.attr_value%TYPE
--- );
---
--- procedure set_value (
--- package_id in apm_packages.package_id%TYPE,
--- parameter_name in apm_parameters.parameter_name%TYPE,
--- attr_value in apm_parameter_values.attr_value%TYPE
--- );
---
---
--- end apm;
-
--- show errors
-
--- create or replace package apm_package
--- as
---
--- function new (
--- package_id in apm_packages.package_id%TYPE
--- default null,
--- instance_name in apm_packages.instance_name%TYPE
--- default null,
--- package_key in apm_packages.package_key%TYPE,
--- object_type in acs_objects.object_type%TYPE
--- default 'apm_package',
--- creation_date in acs_objects.creation_date%TYPE
--- default sysdate,
--- creation_user in acs_objects.creation_user%TYPE
--- default null,
--- creation_ip in acs_objects.creation_ip%TYPE
--- default null,
--- context_id in acs_objects.context_id%TYPE
--- default null
--- ) return apm_packages.package_id%TYPE;
---
--- procedure delete (
--- package_id in apm_packages.package_id%TYPE
--- );
---
--- function singleton_p (
--- package_key in apm_packages.package_key%TYPE
--- ) return integer;
---
--- function num_instances (
--- package_key in apm_package_types.package_key%TYPE
--- ) return integer;
---
--- function name (
--- package_id in apm_packages.package_id%TYPE
--- ) return varchar2;
---
--- -- Enable a package to be utilized by a subsite.
--- procedure enable (
--- package_id in apm_packages.package_id%TYPE
--- );
---
--- procedure disable (
--- package_id in apm_packages.package_id%TYPE
--- );
---
--- function highest_version (
--- package_key in apm_package_types.package_key%TYPE
--- ) return apm_package_versions.version_id%TYPE;
---
--- end apm_package;
-
--- show errors
-
--- create or replace package apm_package_version
--- as
--- function new (
--- version_id in apm_package_versions.version_id%TYPE
--- default null,
--- package_key in apm_package_versions.package_key%TYPE,
--- version_name in apm_package_versions.version_name%TYPE
--- default null,
--- version_uri in apm_package_versions.version_uri%TYPE,
--- summary in apm_package_versions.summary%TYPE,
--- description_format in apm_package_versions.description_format%TYPE,
--- description in apm_package_versions.description%TYPE,
--- release_date in apm_package_versions.release_date%TYPE,
--- vendor in apm_package_versions.vendor%TYPE,
--- vendor_uri in apm_package_versions.vendor_uri%TYPE,
--- installed_p in apm_package_versions.installed_p%TYPE
--- default 'f',
--- data_model_loaded_p in apm_package_versions.data_model_loaded_p%TYPE
--- default 'f'
--- ) return apm_package_versions.version_id%TYPE;
---
--- procedure delete (
--- version_id in apm_packages.package_id%TYPE
--- );
---
--- procedure enable (
--- version_id in apm_package_versions.version_id%TYPE
--- );
---
--- procedure disable (
--- version_id in apm_package_versions.version_id%TYPE
--- );
---
--- function edit (
--- new_version_id in apm_package_versions.version_id%TYPE
--- default null,
--- version_id in apm_package_versions.version_id%TYPE,
--- version_name in apm_package_versions.version_name%TYPE
--- default null,
--- version_uri in apm_package_versions.version_uri%TYPE,
--- summary in apm_package_versions.summary%TYPE,
--- description_format in apm_package_versions.description_format%TYPE,
--- description in apm_package_versions.description%TYPE,
--- release_date in apm_package_versions.release_date%TYPE,
--- vendor in apm_package_versions.vendor%TYPE,
--- vendor_uri in apm_package_versions.vendor_uri%TYPE,
--- installed_p in apm_package_versions.installed_p%TYPE
--- default 'f',
--- data_model_loaded_p in apm_package_versions.data_model_loaded_p%TYPE
--- default 'f'
--- ) return apm_package_versions.version_id%TYPE;
---
--- -- Add a file to the indicated version.
--- function add_file(
--- file_id in apm_package_files.file_id%TYPE
--- default null,
--- version_id in apm_package_versions.version_id%TYPE,
--- path in apm_package_files.path%TYPE,
--- file_type in apm_package_file_types.file_type_key%TYPE
--- ) return apm_package_files.file_id%TYPE;
---
--- -- Remove a file from the indicated version.
--- procedure remove_file(
--- version_id in apm_package_versions.version_id%TYPE,
--- path in apm_package_files.path%TYPE
--- );
---
--- -- Add an interface provided by this version.
--- function add_interface(
--- interface_id in apm_package_dependencies.dependency_id%TYPE
--- default null,
--- version_id in apm_package_versions.version_id%TYPE,
--- interface_uri in apm_package_dependencies.service_uri%TYPE,
--- interface_version in apm_package_dependencies.service_version%TYPE
--- ) return apm_package_dependencies.dependency_id%TYPE;
---
--- procedure remove_interface(
--- interface_id in apm_package_dependencies.dependency_id%TYPE
--- );
---
--- procedure remove_interface(
--- interface_uri in apm_package_dependencies.service_uri%TYPE,
--- interface_version in apm_package_dependencies.service_version%TYPE,
--- version_id in apm_package_versions.version_id%TYPE
--- );
---
--- -- Add a requirement for this version. A requirement is some interface that this
--- -- version depends on.
--- function add_dependency(
--- dependency_id in apm_package_dependencies.dependency_id%TYPE
--- default null,
--- version_id in apm_package_versions.version_id%TYPE,
--- dependency_uri in apm_package_dependencies.service_uri%TYPE,
--- dependency_version in apm_package_dependencies.service_version%TYPE
--- ) return apm_package_dependencies.dependency_id%TYPE;
---
--- procedure remove_dependency(
--- dependency_id in apm_package_dependencies.dependency_id%TYPE
--- );
---
--- procedure remove_dependency(
--- dependency_uri in apm_package_dependencies.service_uri%TYPE,
--- dependency_version in apm_package_dependencies.service_version%TYPE,
--- version_id in apm_package_versions.version_id%TYPE
--- );
---
--- -- Given a version_name (e.g. 3.2a), return
--- -- something that can be lexicographically sorted.
--- function sortable_version_name (
--- version_name in apm_package_versions.version_name%TYPE
--- ) return varchar2;
---
--- -- Given two version names, return 1 if one > two, -1 if two > one, 0 otherwise.
--- -- Deprecate?
--- function version_name_greater(
--- version_name_one in apm_package_versions.version_name%TYPE,
--- version_name_two in apm_package_versions.version_name%TYPE
--- ) return integer;
---
--- function upgrade_p(
--- path in apm_package_files.path%TYPE,
--- initial_version_name in apm_package_versions.version_name%TYPE,
--- final_version_name in apm_package_versions.version_name%TYPE
--- ) return integer;
---
--- procedure upgrade(
--- version_id in apm_package_versions.version_id%TYPE
--- );
---
--- end apm_package_version;
-
--- show errors
-
--- create or replace package apm_package_type
--- as
--- procedure create_type(
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in acs_object_types.pretty_name%TYPE,
--- pretty_plural in acs_object_types.pretty_plural%TYPE,
--- package_uri in apm_package_types.package_uri%TYPE,
--- package_type in apm_package_types.package_type%TYPE,
--- singleton_p in apm_package_types.singleton_p%TYPE,
--- spec_file_path in apm_package_types.spec_file_path%TYPE default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE default null
--- );
---
--- function update_type (
--- package_key in apm_package_types.package_key%TYPE,
--- pretty_name in acs_object_types.pretty_name%TYPE
--- default null,
--- pretty_plural in acs_object_types.pretty_plural%TYPE
--- default null,
--- package_uri in apm_package_types.package_uri%TYPE
--- default null,
--- package_type in apm_package_types.package_type%TYPE
--- default null,
--- singleton_p in apm_package_types.singleton_p%TYPE
--- default null,
--- spec_file_path in apm_package_types.spec_file_path%TYPE
--- default null,
--- spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
--- default null
--- ) return apm_package_types.package_type%TYPE;
---
--- procedure drop_type (
--- package_key in apm_package_types.package_key%TYPE,
--- cascade_p in char default 'f'
--- );
---
--- function num_parameters (
--- package_key in apm_package_types.package_key%TYPE
--- ) return integer;
---
--- end apm_package_type;
-
--- show errors
-
-
-
--- Private APM System API for managing parameter values.
--- create or replace package apm_parameter_value
--- as
--- function new (
--- value_id in apm_parameter_values.value_id%TYPE default null,
--- package_id in apm_packages.package_id%TYPE,
--- parameter_id in apm_parameter_values.parameter_id%TYPE,
--- attr_value in apm_parameter_values.attr_value%TYPE
--- ) return apm_parameter_values.value_id%TYPE;
---
--- procedure delete (
--- value_id in apm_parameter_values.value_id%TYPE default null
--- );
--- end apm_parameter_value;
--- /
--- show errors
---
--- create or replace package apm_application
--- as
---
--- function new (
--- application_id in acs_objects.object_id%TYPE default null,
--- instance_name in apm_packages.instance_name%TYPE
--- default null,
--- package_key in apm_package_types.package_key%TYPE,
--- object_type in acs_objects.object_type%TYPE
--- default 'apm_application',
--- creation_date in acs_objects.creation_date%TYPE default sysdate,
--- creation_user in acs_objects.creation_user%TYPE default null,
--- creation_ip in acs_objects.creation_ip%TYPE default null,
--- context_id in acs_objects.context_id%TYPE default null
--- ) return acs_objects.object_id%TYPE;
---
--- procedure delete (
--- application_id in acs_objects.object_id%TYPE
--- );
---
--- end;
-
--- show errors
-
-
--- create or replace package apm_service
--- as
---
--- function new (
--- service_id in acs_objects.object_id%TYPE default null,
--- instance_name in apm_packages.instance_name%TYPE
--- default null,
--- package_key in apm_package_types.package_key%TYPE,
--- object_type in acs_objects.object_type%TYPE default 'apm_service',
--- creation_date in acs_objects.creation_date%TYPE default sysdate,
--- creation_user in acs_objects.creation_user%TYPE default null,
--- creation_ip in acs_objects.creation_ip%TYPE default null,
--- context_id in acs_objects.context_id%TYPE default null
--- ) return acs_objects.object_id%TYPE;
---
--- procedure delete (
--- service_id in acs_objects.object_id%TYPE
--- );
---
--- end;
-
--- show errors
-
--- create or replace package body apm
--- procedure register_package
-create function apm__register_package (varchar,varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm__register_package (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns integer as '
declare
package_key alias for $1;
pretty_name alias for $2;
pretty_plural alias for $3;
package_uri alias for $4;
package_type alias for $5;
- singleton_p alias for $6; -- default ''f''
- spec_file_path alias for $7; -- default null
- spec_file_mtime alias for $8; -- default null
+ initial_install_p alias for $6; -- default ''f''
+ singleton_p alias for $7; -- default ''f''
+ spec_file_path alias for $8; -- default null
+ spec_file_mtime alias for $9; -- default null
begin
PERFORM apm_package_type__create_type(
package_key,
pretty_name,
pretty_plural,
package_uri,
package_type,
+ initial_install_p,
singleton_p,
spec_file_path,
spec_file_mtime
@@ -1660,17 +1218,18 @@
-- function update_package
-create function apm__update_package (varchar,varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm__update_package (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns varchar as '
declare
package_key alias for $1;
pretty_name alias for $2; -- default null
pretty_plural alias for $3; -- default null
package_uri alias for $4; -- default null
package_type alias for $5; -- default null
- singleton_p alias for $6; -- default null
- spec_file_path alias for $7; -- default null
- spec_file_mtime alias for $8; -- default null
+ initial_install_p alias for $6; -- default null
+ singleton_p alias for $7; -- default null
+ spec_file_path alias for $8; -- default null
+ spec_file_mtime alias for $9; -- default null
begin
return apm_package_type__update_type(
@@ -1679,6 +1238,7 @@
pretty_plural,
package_uri,
package_type,
+ initial_install_p,
singleton_p,
spec_file_path,
spec_file_mtime
@@ -1720,23 +1280,25 @@
-- procedure register_application
-create function apm__register_application (varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm__register_application (varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns integer as '
declare
package_key alias for $1;
pretty_name alias for $2;
pretty_plural alias for $3;
package_uri alias for $4;
- singleton_p alias for $5; -- default ''f''
- spec_file_path alias for $6; -- default null
- spec_file_mtime alias for $7; -- default null
+ initial_install_p alias for $5; -- default ''f''
+ singleton_p alias for $6; -- default ''f''
+ spec_file_path alias for $7; -- default null
+ spec_file_mtime alias for $8; -- default null
begin
PERFORM apm__register_package(
package_key,
pretty_name,
pretty_plural,
package_uri,
''apm_application'',
+ initial_install_p,
singleton_p,
spec_file_path,
spec_file_mtime
@@ -1763,23 +1325,25 @@
-- procedure register_service
-create function apm__register_service (varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm__register_service (varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns integer as '
declare
package_key alias for $1;
pretty_name alias for $2;
pretty_plural alias for $3;
package_uri alias for $4;
- singleton_p alias for $5; -- default ''f''
- spec_file_path alias for $6; -- default null
- spec_file_mtime alias for $7; -- default null
+ initial_install_p alias for $5; -- default ''f''
+ singleton_p alias for $6; -- default ''f''
+ spec_file_path alias for $7; -- default null
+ spec_file_mtime alias for $8; -- default null
begin
PERFORM apm__register_package(
package_key,
pretty_name,
pretty_plural,
package_uri,
''apm_service'',
+ initial_install_p,
singleton_p,
spec_file_path,
spec_file_mtime
@@ -2175,6 +1739,23 @@
return 0;
end;' language 'plpgsql';
+create function apm_package__initial_install_p (varchar) returns integer as '
+declare
+ initial_install_p__package_key alias for $1;
+ v_initial_install_p integer;
+begin
+ select 1 into v_initial_install_p
+ from apm_package_types
+ where package_key = initial_install_p__package_key
+ and initial_install_p = ''t'';
+
+ if NOT FOUND then
+ return 0;
+ else
+ return v_initial_install_p;
+ end if;
+end;' language 'plpgsql';
+
create function apm_package__singleton_p (varchar) returns integer as '
declare
singleton_p__package_key alias for $1;
@@ -2796,42 +2377,44 @@
-- create or replace package body apm_package_type
-- procedure create_type
-create function apm_package_type__create_type (varchar,varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm_package_type__create_type (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns integer as '
declare
create_type__package_key alias for $1;
create_type__pretty_name alias for $2;
create_type__pretty_plural alias for $3;
create_type__package_uri alias for $4;
create_type__package_type alias for $5;
- create_type__singleton_p alias for $6;
- create_type__spec_file_path alias for $7; -- default null
- create_type__spec_file_mtime alias for $8; -- default null
+ create_type__initial_install_p alias for $6;
+ create_type__singleton_p alias for $7;
+ create_type__spec_file_path alias for $8; -- default null
+ create_type__spec_file_mtime alias for $9; -- default null
begin
insert into apm_package_types
(package_key, pretty_name, pretty_plural, package_uri, package_type,
- spec_file_path, spec_file_mtime, singleton_p)
+ spec_file_path, spec_file_mtime, initial_install_p, singleton_p)
values
(create_type__package_key, create_type__pretty_name, create_type__pretty_plural,
create_type__package_uri, create_type__package_type, create_type__spec_file_path,
- create_type__spec_file_mtime, create_type__singleton_p);
+ create_type__spec_file_mtime, create_type__initial_install_p, create_type__singleton_p);
return 0;
end;' language 'plpgsql';
-- function update_type
-create function apm_package_type__update_type (varchar,varchar,varchar,varchar,varchar,boolean,varchar,integer)
+create function apm_package_type__update_type (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer)
returns varchar as '
declare
update_type__package_key alias for $1;
update_type__pretty_name alias for $2; -- default null
update_type__pretty_plural alias for $3; -- default null
update_type__package_uri alias for $4; -- default null
update_type__package_type alias for $5; -- default null
- update_type__singleton_p alias for $6; -- default null
- update_type__spec_file_path alias for $7; -- default null
- update_type__spec_file_mtime alias for $8; -- default null
+ update_type__initial_install_p alias for $6; -- default null
+ update_type__singleton_p alias for $7; -- default null
+ update_type__spec_file_path alias for $8; -- default null
+ update_type__spec_file_mtime alias for $9; -- default null
begin
UPDATE apm_package_types SET
pretty_name = coalesce(update_type__pretty_name, pretty_name),
@@ -2841,6 +2424,7 @@
spec_file_path = coalesce(update_type__spec_file_path, spec_file_path),
spec_file_mtime = coalesce(update_type__spec_file_mtime, spec_file_mtime),
singleton_p = coalesce(update_type__singleton_p, singleton_p)
+ initial_install_p = coalesce(update_type__initial_install_p, initial_install_p)
where package_key = update_type__package_key;
return update_type__package_key;
Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql 14 Mar 2001 04:39:10 -0000 1.1
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql 9 May 2001 22:32:25 -0000 1.2
@@ -62,4 +62,61 @@
select inline_0 ();
drop function inline_0 ();
+drop function apm__register_package (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm__update_package (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm__unregister_package (varchar,boolean);
+drop function apm__register_p (varchar);
+drop function apm__register_application (varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm__unregister_application (varchar,boolean);
+drop function apm__register_service (varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm__unregister_service (varchar,boolean);
+drop function apm__register_parameter (integer,varchar,varchar,varchar,varchar,varchar,varchar,integer,integer);
+drop function apm__update_parameter (integer,varchar,varchar,varchar,varchar,varchar,integer,integer);
+drop function apm__parameter_p (varchar,varchar);
+drop function apm__unregister_parameter (integer);
+drop function apm__id_for_name (varchar,varchar);
+drop function apm__get_value (integer,integer);
+drop function apm__get_value (integer,varchar);
+drop function apm__set_value (integer,integer,varchar);
+drop function apm__set_value (integer,varchar,varchar);
+drop function apm_package__initialize_parameters (integer,varchar);
+drop function apm_package__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer);
+drop function apm_package__delete (integer);
+drop function apm_package__initial_install_p (varchar);
+drop function apm_package__singleton_p (varchar);
+drop function apm_package__num_instances (varchar);
+drop function apm_package__name (integer);
+drop function apm_package__enable (integer);
+drop function apm_package__disable (integer);
+drop function apm_package__highest_version (varchar);
+drop function apm_package_version__new (integer,varchar,varchar,varchar,varchar,varchar,varchar,timestamp,varchar,varchar,boolean,boolean);
+drop function apm_package_version__delete (integer);
+drop function apm_package_version__enable (integer);
+drop function apm_package_version__disable (integer);
+drop function apm_package_version__copy (integer,integer,varchar,varchar);
+drop function apm_package_version__edit (integer,integer,varchar,varchar,varchar,varchar,varchar,timestamp,varchar,varchar,boolean,boolean);
+drop function apm_package_version__add_file (integer,integer,varchar,varchar, varchar);
+drop function apm_package_version__remove_file (integer,varchar);
+drop function apm_package_version__add_interface (integer,integer,varchar,varchar);
+drop function apm_package_version__remove_interface (integer);
+drop function apm_package_version__remove_interface (varchar,varchar,integer);
+drop function apm_package_version__add_dependency (integer,integer,varchar,varchar);
+drop function apm_package_version__remove_dependency (integer);
+drop function apm_package_version__remove_dependency (varchar,varchar,integer);
+drop function apm_package_version__sortable_version_name (varchar);
+drop function apm_package_version__version_name_greater (varchar,varchar);
+drop function apm_package_version__upgrade_p (varchar,varchar,varchar);
+drop function apm_package_version__upgrade (integer);
+drop function apm_package_type__create_type (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm_package_type__update_type (varchar,varchar,varchar,varchar,varchar,boolean,boolean,varchar,integer);
+drop function apm_package_type__drop_type (varchar,boolean);
+drop function apm_package_type__num_parameters (varchar);
+drop function apm_parameter_value__new (integer,integer,integer,varchar);
+drop function apm_parameter_value__delete (integer);
+drop function apm_application__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer);
+drop function apm_application__delete (integer);
+drop function apm_service__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer);
+drop function apm_service__delete (integer);
+
\t
+
Index: openacs-4/packages/acs-mail/acs-mail.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/acs-mail.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-mail/acs-mail.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-mail/acs-mail.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS Mail
ACS Mail Services
t
+ t
Index: openacs-4/packages/acs-messaging/acs-messaging.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/acs-messaging.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-messaging/acs-messaging.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-messaging/acs-messaging.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS Messaging
ACS Messaging Services
t
+ t
Index: openacs-4/packages/acs-notification/acs-notification.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-notification/Attic/acs-notification.info,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-notification/acs-notification.info 5 Apr 2001 18:23:38 -0000 1.2
+++ openacs-4/packages/acs-notification/acs-notification.info 9 May 2001 22:32:25 -0000 1.3
@@ -5,6 +5,7 @@
ACS Notification
ACS Notifications
t
+ t
Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-subsite/acs-subsite.info 6 May 2001 21:39:13 -0000 1.8
+++ openacs-4/packages/acs-subsite/acs-subsite.info 9 May 2001 22:32:25 -0000 1.9
@@ -5,6 +5,7 @@
ACS Subsite
ACS Subsite Services
f
+ t
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.9 -r1.10
--- openacs-4/packages/acs-tcl/acs-tcl.info 26 Apr 2001 05:38:54 -0000 1.9
+++ openacs-4/packages/acs-tcl/acs-tcl.info 9 May 2001 22:32:25 -0000 1.10
@@ -5,6 +5,7 @@
ACS Tcl
ACS Tcl Libraries
t
+ t
Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-oracle.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl 6 May 2001 22:34:31 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs-oracle.tcl 9 May 2001 22:32:25 -0000 1.3
@@ -46,7 +46,7 @@
}
}
-ad_proc -private db_exec { type db statement_name sql args } {
+ad_proc -private db_exec { type db statement_name pre_sql args } {
A helper procedure to execute a SQL statement, potentially binding
depending on the value of the $bind variable in the calling environment
Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-postgresql.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 9 May 2001 05:15:58 -0000 1.13
+++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 9 May 2001 22:32:25 -0000 1.14
@@ -498,9 +498,7 @@
ad_proc db_get_pgbin { } {
- Returns the database name from the first database pool. It assumes the
- datasource is properly formatted since we've already verified that we
- can connect to the pool.
+ Returns the pgbin parameter from the driver section of the first database pool.
} {
@@ -509,6 +507,52 @@
return [ns_config ns/db/driver/$driver pgbin]
}
+ad_proc db_get_username { } {
+
+ Returns the username parameter from the driver section of the first database pool.
+
+} {
+
+ set pool [lindex [nsv_get db_available_pools .] 0]
+ return [ns_config ns/db/pool/$pool User]
+}
+
+ad_proc db_get_password { } {
+
+ Returns the username parameter from the driver section of the first database pool.
+
+} {
+
+ set pool [lindex [nsv_get db_available_pools .] 0]
+ return [ns_config ns/db/pool/$pool Password]
+}
+
+ad_proc db_get_port { } {
+
+ Returns the port number from the first database pool. It assumes the
+ datasource is properly formatted since we've already verified that we
+ can connect to the pool.
+ It returns an empty string for an empty port value.
+
+} {
+
+ set pool [lindex [nsv_get db_available_pools .] 0]
+ set datasource [ns_config ns/db/pool/$pool DataSource]
+ set last_colon_pos [string last ":" $datasource]
+ if { $last_colon_pos == -1 } {
+ ns_log Error "datasource contains no \":\"? datasource = $datasource"
+ return ""
+ }
+ set first_colon_pos [string first ":" $datasource]
+
+ if { $first_colon_pos == $last_colon_pos || [expr $last_colon_pos - $first_colon_pos] == 1 } {
+ # No port specified
+ return ""
+ }
+
+ return [string range $datasource [expr $first_colon_pos + 1] [expr $last_colon_pos - 1] ]
+}
+
ad_proc db_get_database { } {
Returns the database name from the first database pool. It assumes the
@@ -526,19 +570,27 @@
}
return [string range $datasource [expr $last_colon_pos + 1] end]
}
-
+
ad_proc db_source_sql_file { {-callback apm_ns_write_callback} file } {
-
- Sources a SQL file (in SQL*Plus format).
-
+
+ Sources a SQL file (in psql format).
+
} {
-
+
set file_name [file tail $file]
+
+ set pguser [db_get_username]
+
+ set pgport [db_get_port]
+ if { ![string equal $pgport ""] } {
+ set pgport "--port $pgport"
+ }
+
cd [file dirname $file]
- set fp [open "|[file join [db_get_pgbin] psql] -f $file_name [db_get_database]" "r"]
+ set fp [open "|[file join [db_get_pgbin] psql] $pgport -U $pguser -f $file_name [db_get_database]" "r"]
while { [gets $fp line] >= 0 } {
- # Don't bother writing out lines which are purely whitespace.
+ # Don't bother writing out lines which are purely whitespace.
if { ![string is space $line] } {
apm_callback_and_log $callback "[ad_quotehtml $line]\n"
}
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql 28 Apr 2001 17:35:30 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs-oracle.xql 9 May 2001 22:32:25 -0000 1.3
@@ -114,6 +114,7 @@
package_uri => :package_uri,
pretty_name => :pretty_name,
pretty_plural => :pretty_plural,
+ initial_install_p => :initial_install_p,
singleton_p => :singleton_p,
spec_file_path => :spec_file_path,
spec_file_mtime => :spec_file_mtime
@@ -133,6 +134,7 @@
package_uri => :package_uri,
pretty_name => :pretty_name,
pretty_plural => :pretty_plural,
+ initial_install_p => :initial_install_p,
singleton_p => :singleton_p,
spec_file_path => :spec_file_path,
spec_file_mtime => :spec_file_mtime
@@ -166,7 +168,7 @@
-
+
declare
Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 28 Apr 2001 17:35:30 -0000 1.7
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs-postgresql.xql 9 May 2001 22:32:25 -0000 1.8
@@ -92,6 +92,7 @@
:pretty_name,
:pretty_plural,
:package_uri,
+ :initial_install_p,
:singleton_p,
:spec_file_path,
:spec_file_mtime
@@ -109,6 +110,7 @@
:pretty_name,
:pretty_plural,
:package_uri,
+ :initial_install_p,
:singleton_p,
:spec_file_path,
:spec_file_mtime
@@ -140,7 +142,7 @@
-
+
declare
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.9 -r1.10
--- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 29 Apr 2001 19:24:12 -0000 1.9
+++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 9 May 2001 22:32:25 -0000 1.10
@@ -41,14 +41,6 @@
# At this point, we should have a directory that is equivalent to a package_key.
if { [apm_package_installed_p $package_key] } {
-
- # Load up the queries (OpenACS Query Dispatcher - ben)
- # DRB: shouldn't be done here ... this routine just scans for uninstalled
- # packages and shouldn't have any side effects of this sort. Bootstrap.tcl
- # already loads queries for installed packages and the APM installer should
- # be doing this when the user asks to install a package ...
- # apm_package_install_queries $package_key
-
if {$new_p} {
continue
}
@@ -201,13 +193,20 @@
return [lindex $pkg_info 5]
}
+# DRB: This routine does more than check dependencies, it also parses spec files,
+# something that really should be done separately, at least for bootstrap installation.
+# I'm leaving it alone for now, though, and kludging it further by passing in a
+# boolean to determine whether to process all spec files or just those needed for
+# initial bootstrap installation.
ad_proc -private apm_dependency_check {
{-callback apm_dummy_callback}
+ {-initial_install:boolean}
spec_files
} {
Check dependencies of all the packages provided.
@param spec_files A list of spec files to be processed.
+ @param initial_install Only process spec files with the initial install attribute.
@return A list whose first element indicates whether dependencies were satisfied (1 if so, 0 otherwise).\
The second element is the package info list with the packages ordered according to dependencies.\
Packages that can be installed come first. Any packages that failed the dependency check come last.
@@ -224,7 +223,9 @@
foreach spec_file $spec_files {
if { [catch {
array set package [apm_read_package_info_file $spec_file]
- lappend install_pend [pkg_info_new $package(package.key) $spec_file $package(provides) $package(requires) ""]
+ if { [string equal $package(initial-install-p) "t"] || !$initial_install_p } {
+ lappend install_pend [pkg_info_new $package(package.key) $spec_file $package(provides) $package(requires) ""]
+ }
} errmsg]} {
# Failed to parse the specificaton file.
apm_callback_and_log $callback "$spec_file could not be parsed correctly. It is not being installed.
@@ -323,6 +324,7 @@
set package_type $version(package.type)
set package_name $version(package-name)
set pretty_plural $version(pretty-plural)
+ set initial_install_p $version(initial-install-p)
set singleton_p $version(singleton-p)
set version_name $version(name)
set version_uri $version(url)
@@ -336,7 +338,7 @@
set relative_path [join [lreplace $split_path 0 [lsearch -exact $package_key $split_path]] /]
# Register the package if it is not already registered.
if { ![apm_package_registered_p $package_key] } {
- apm_package_register $package_key $package_name $pretty_plural $package_uri $package_type $singleton_p $relative_path
+ apm_package_register $package_key $package_name $pretty_plural $package_uri $package_type $initial_install_p $singleton_p $relative_path
}
# If an older version already exists in apm_package_versions, update it;
@@ -881,7 +883,7 @@
ad_proc -public apm_package_register {
- package_key pretty_name pretty_plural package_uri package_type singleton_p {spec_file_path ""} {spec_file_mtime ""}
+ package_key pretty_name pretty_plural package_uri package_type initial_install_p singleton_p {spec_file_path ""} {spec_file_mtime ""}
} {
Register the package in the system.
} {
@@ -902,6 +904,7 @@
package_uri => :package_uri,
pretty_name => :pretty_name,
pretty_plural => :pretty_plural,
+ initial_install_p => :initial_install_p,
singleton_p => :singleton_p,
spec_file_path => :spec_file_path,
spec_file_mtime => :spec_file_mtime
@@ -916,6 +919,7 @@
package_uri => :package_uri,
pretty_name => :pretty_name,
pretty_plural => :pretty_plural,
+ initial_install_p => :initial_install_p,
singleton_p => :singleton_p,
spec_file_path => :spec_file_path,
spec_file_mtime => :spec_file_mtime
@@ -995,7 +999,7 @@
} {
# Instantiate and mount the package.
if { [catch {
- db_exec_plsql package_instantiate_mount {
+ db_exec_plsql package_instantiate_and_mount {
declare
main_site_id site_nodes.node_id%TYPE;
instance_id apm_packages.package_id%TYPE;
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 29 Apr 2001 02:15:11 -0000 1.3
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 9 May 2001 22:32:25 -0000 1.4
@@ -79,7 +79,7 @@
set spec ""
db_1row package_version_select {
select t.package_key, t.package_uri, t.pretty_name, t.pretty_plural, t.package_type,
- t.singleton_p, v.*
+ t.initial_install_p, t.singleton_p, v.*
from apm_package_versions v, apm_package_types t
where v.version_id = :version_id
and v.package_key = t.package_key
@@ -91,6 +91,7 @@
[ad_quotehtml $pretty_name]
[ad_quotehtml $pretty_plural]
+ $initial_install_p
$singleton_p
@@ -228,6 +229,7 @@
package.url ,
package.type
pretty-plural
+ initial-install-p
singleton-p
name (the version name, e.g., 3.3a1 ,
url (the version URL),
@@ -286,6 +288,7 @@
set properties(package.url) [apm_required_attribute_value $package url]
set properties(package.type) [apm_attribute_value -default "apm_application" $package type]
set properties(package-name) [apm_tag_value $package package-name]
+ set properties(initial-install-p) [apm_tag_value -default "f" $package initial-install-p]
set properties(singleton-p) [apm_tag_value -default "f" $package singleton-p]
set properties(pretty-plural) [apm_tag_value -default "$properties(package-name)s" $package pretty-plural]
Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 27 Apr 2001 01:41:12 -0000 1.2
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.xql 9 May 2001 22:32:25 -0000 1.3
@@ -5,7 +5,7 @@
select t.package_key, t.package_uri, t.pretty_name, t.pretty_plural, t.package_type,
- t.singleton_p, v.*
+ t.initial_install_p, t.singleton_p, v.*
from apm_package_versions v, apm_package_types t
where v.version_id = :version_id
and v.package_key = t.package_key
Index: openacs-4/packages/acs-templating/acs-templating.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/acs-templating.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-templating/acs-templating.info 27 Apr 2001 02:27:09 -0000 1.3
+++ openacs-4/packages/acs-templating/acs-templating.info 9 May 2001 22:32:25 -0000 1.4
@@ -5,6 +5,7 @@
ACS Templating
ACS Templating Services
t
+ t
Index: openacs-4/packages/page/page.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/page/page.info,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/page/page.info 13 Apr 2001 18:51:15 -0000 1.3
+++ openacs-4/packages/page/page.info 9 May 2001 22:32:25 -0000 1.4
@@ -5,6 +5,7 @@
Page
Pages
f
+ t
Index: openacs-4/packages/skin/skin.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/skin/skin.info,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/skin/skin.info 13 Mar 2001 22:59:27 -0000 1.1
+++ openacs-4/packages/skin/skin.info 9 May 2001 22:32:25 -0000 1.2
@@ -5,6 +5,7 @@
Skin
Skins
t
+ t
|