Forum OpenACS Development: Error upgrading from 5.10.0 to head

I'm getting the following error when trying to upgrade a site from 5.10.0 to the latest code on the oacs-5-10 branch.

Fresh installs from the head of oacs-5-10 work fine.

-----------
Failed to install ACS Tcl Library, version 5.10.1d24. The following error was generated:

invalid command name "apm_package_installed-acs-lang"
-----------

Collapse
Posted by Gustaf Neumann on
Don't do this. Upgrading from 5.10.0 to head is actually a downgrade. Development is taking place in the oacs-5-10 branch (as noted in [0]).

This policy has a long tradition, that after a new release in a branch (e.g. OpenACS 5.10.0 in branch oacs-5-10) the development continues in the same branch for one or two releases. Then, a large merge operation with HEAD will occur, and it will be noted on the page above, that development continues in e.g. HEAD. The last commit in oacs-core on HEAD was on Oct 25, 2020 [1], the last commit in oacs-core in the oacs-5-10 branch yesterday [2].

If you want to upgrade from 5.10.0 to the latest development, take the newest versions from oacs-5-10. Btw, the releases are tagged with openacs-*final (see e.g. [3])

All the best,
-g

[0] https://openacs.org/xowiki/openacs-todo
[1] https://github.com/openacs/openacs-core/tree/main
[2] https://github.com/openacs/openacs-core/tree/oacs-5-10
[3] https://github.com/openacs/openacs-core/tree/openacs-5-10-0-final

Collapse
Posted by Gustaf Neumann on
Oops, I misread your question, you did not want to upgrade the HEAD branch, but to the newest version of the oacs-5-10 branch (what I actually suggested)..... sorry.

I will look into this when possible.

Collapse
Posted by Keith Paskett on
The problem was that I did not have xotcl-core installed.

I hit the problem on a website that had been upgraded to 5.10.0 from 5.9.1, and didn't have xotcl-core installed.

Then when verifying the problem, I did a fresh install of 5.10.0 and attempted upgrading it to 5.10.1. But again, I failed to install xotcl-core on the 5.10.0 fresh install.

If I install the xotcl-core package on the 5.10.0 version, then the upgrade to 5.10.1 runs without errors.

Collapse
Posted by Gustaf Neumann on
Hi Keith,

many thanks for the diagnosis! I will try to remove the hidden dependency on xotcl-core!

all the best
-g

Collapse
Posted by Keith Paskett on
Here's additional detail from the error log.
-------
: invalid command name "apm_package_installed-acs-lang"
: while executing
: "apm_package_installed-acs-lang db_0or1row apm_package_installed_p {
: select 1 from apm_package_versions
: where package_key = :pa..."
: ("eval" body line 1)
: ::acs::misc_cache ::nx::Object->eval
: invoked from within
: "::acs::misc_cache eval apm_package_installed-acs-lang {
: db_0or1row apm_package_installed_p {
: select 1 from apm_package_versions
: ..."
: ("uplevel" body line 1)
: invoked from within
: "uplevel 1 [list $cache $operation {*}$args]"
: (procedure "acs::try_cache" line 6)
: invoked from within
: "acs::try_cache ::acs::misc_cache eval apm_package_installed-$package_key {
: db_0or1row apm_package_installed_p {
: select 1 from apm_..."
: (procedure "apm_package_installed_p" line 2)
: invoked from within
: "apm_package_installed_p acs-lang"
: (procedure "::nsf::procs::apm_load_catalog_files" line 4)
: invoked from within
: "apm_load_catalog_files -upgrade $package_key"
: ("::try" body line 5)
Collapse
Posted by Keith Paskett on
Seems to be an issue with the cache during an upgrade.

If I bypass the acs::try_cache in apm_installed_p and just make the database call, I can complete the upgrade.

Then replacing the acs::try_cache code and restarting, everything seems to work okay.

Collapse
Posted by Gustaf Neumann on
Hi Keith,

the issue should be sorted out by now. The dependency on xotcl-core was subtle and not easy to spot: it was a setting that redefinition of classes should not perform a full cleanup. Such a redefinition happens during upgrade and caused to issue. This is now fixed in the oacs-5-10 branch.

Here is, what I used for testing.

#
# Get a fresh installation of OpenACS 5.10.0 from cvs:
#
mkdir /local/usr/local/src/openacs-core-5.10.0/
cd /local/usr/local/src/openacs-core-5.10.0
cvs -d:pserver:mailto:anonymous@cvs.openacs.org:/cvsroot checkout -r openacs-5-10-0-final acs-core
mv openacs-4/* .
mkdir log
sudo chgrp -R nsadmin .
sudo chmod -R g+w  .

# # create/recreate the database # sudo -u postgres $PGBIN/dropdb -U nsadmin $DB sudo -u postgres $PGBIN/createdb -U nsadmin $DB

# # Start the server and create instance. # Restart the server and log in. # Make upgrade on file system to the newest version of oacs-5-10.

cvs -q up -r oacs-5-10 -Pd

# # In OpenACS, navigate to /acs-admin/install/ and upgrade from local file system # Mark all, click "install packages". # Restart finally the server

Maybe someone else can use this to reduce typing on upgrade attempts.