Forum OpenACS Q&A: Upgrading from 4.6 to 4.6.2

Collapse
Posted by Gilbert Price on
Hello,

Does anyone know if it is possible to upgrade from 4.6 to 4.6.2 directly? Or should the upgrade go from 4.6 to 4.6.1 then 4.6.2?

I am assuming the upgrade is fairly straightforward? Just drop the desired version files over the current files, restart and run APM to upgrade the packages?

Since I've never done this before (an OpenACS upgrade, that is) I thought I'd ask before I blow away my current content...

Thanks,

Collapse
Posted by Joel Aufrecht on
You should be able to upgrade directly from 4.6 to 4.6.2. Quick instructions are in the 4.6.2 tarball at openacs-4.6.2/packages/acs-core-docs/www/release-notes.html. Longer instructions, including backup/restore, are missing from the tarball (probably my cvs screwup) but can be found here (it's 4.5 to 4.6 but aside from version numbers everything is the same).
Collapse
Posted by Lachlan Myers on
I got the following errors doing a 4.6 to 4.6.2 upgrade when I tried to upgrade the ACS kernel
psql:upgrade-4.6.1-4.6.2.sql:237: ERROR:  view "acs_privilege_descendant_map_view" does not exist
psql:upgrade-4.6.1-4.6.2.sql:244: ERROR:  Attempt to insert rule "_RETacs_privilege_descendant_ma" failed: already exists
Any ideas?
Collapse
Posted by Lachlan Myers on
I found migration MUCH easier if I took the baby steps from 4.6 -> 4.6.1 -> 4.6.2

Reverting from the failed 4.6.2 upgrade was a little scary - the messages in Package Manager are informative, but going backwards did require a little faith.

Collapse
Posted by Jade Rubick on
Lachlan, I got the same error. I think it has to do something with truncation.

Here's the error I got:

psql:upgrade-4.6.1-4.6.2.sql:237: ERROR:  view "acs_privilege_descendant_map_view" does not exist
psql:upgrade-4.6.1-4.6.2.sql:244: ERROR:  Attempt to insert rule "_RETacs_privilege_descendant_ma" failed: already exists

    invoked from within
"db_source_sql_file -callback $callback $path/$file_path"
    (procedure "apm_package_install_data_model" line 32)
    invoked from within
"apm_package_install_data_model -callback $callback -data_model_files $data_model_files $spec_file_path"
    (procedure "apm_package_install" line 103)
    invoked from within
"apm_package_install  -enable=$enable_p  -install_path $install_path  -callback apm_ns_write_callback  -load_data_model  -data_model_files $data_model_..."
    ("foreach" body line 45)
    invoked from within
"foreach pkg_info $pkg_install_list {
    set spec_file [pkg_info_spec $pkg_info]
    if { [catch {
        array set version [apm_read_package_info_file $spe..."
    ("uplevel" body line 36)
    invoked from within
"uplevel {
          ad_page_contract {

    Installs the packages.

    @author Bryan Quinn (mailto:bquinn@arsdigita.com)
    @creation-date Mon Oct  9 00:22:31..."
    (procedure "code::tcl::/web/safe4all/packages/acs-admin/www/apm/packages..." line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
        $handler
      } ad_script_abort val {
        # do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
        rp_serve_abstract_file "$root/$path"
        set tcl_url2file([ad_conn url]) [ad_conn file]
        set tcl_url2path_info([ad_conn url]) [ad_conn path_inf...

When I tried the same thing by hand is psql:

# drop view acs_privilege_descendant_map_view;
NOTICE:  identifier "acs_privilege_descendant_map_view" will be truncated to "acs_privileg\
e_descendant_map_vi"
ERROR:  view "acs_privilege_descendant_map_view" does not exist

# create view acs_privilege_descendant_map_view
# as select distinct h1.privilege, h2.child_privilege as descendant
#    from acs_privilege_hierarchy_index h1, acs_privilege_hierarchy_index h2
#    where h2.tree_sortkey between h1.tree_sortkey and tree_right(h1.tree_sortkey\
)
  union
  select privilege, privilege
  from acs_privileges;

NOTICE:  identifier "acs_privilege_descendant_map_view" w\
ill be truncated to "acs_privilege_descendant_map_view"
ERROR:  Attempt to insert rule "_RETacs_privilege_descendant_ma" failed: already exists

I'm going to file this in the bugtracker. I'm going to try and do the code by hand to get my installation to a "real" 4.6.2 state.

Collapse
Posted by Jade Rubick on
Lachlan, here's a link to the solution to your problem:

https://openacs.org/bugtracker/openacs/com/acs-kernel/bug?bug%5fnumber=496

I had the same issue. The problem was you thought you were on 4.6.1 (and the APM did too), but the upgrade script 4.6-4.6.1 had not been run.