Forum OpenACS Development: upgrade and cvs woes

Collapse
Posted by Jeff Lu on

I have experienced some problems with upgrading from openacs-4.6.3 to openacs 5.0.4.

I have been working on a project using 4.6.3, later on we decided to upgrade to 5.0.4.

I use cvs to keep track of any changes made to the code.

I used the cvs import command to upgrade the existing code in the repository from 4.6.3, to 5.0.4.

One thing I noticed, is that some procs which are in acs 4.6.3 are changed/renamed to a different one on 5.0.4.

These are some of the procs that I found that were in 4.6.3 and were renamed in 5.0.4:

  • acslang:
    • lang-init, changed to acs-lang-init
    • lang-procs, changed to lang-message-procs
  • acs-templating:
    • 0-procs, changed to 0-acs-templating-procs

When you upgrade using cvs import, the older files mentioned above are kept, since they do not conflict with the newer version because their names are different.

One problem this may cause is that it can override some procs, especially in the case of lang-procs vs lang-message-procs. lang-procs gets sourced later than lang-message-procs so it overrides procs which are of the same name.

Hence I got the error "no value given for parameter "key" to "_" ..." I fixed this when I used cvs remove on lang-procs, and lang-init.

Currently my approach to solve this problem is to diff each package and look for procs which are not supposed to be there, and cvs remove them. Is there any better way to approach this?

TIA!!!!

Collapse
2: Re: upgrade and cvs woes (response to 1)
Posted by Andrei Popov on
I think you can look at the output of cvs update and it highlights files that were removed in the respository, you could then delete them.  Check cvs(1) man page for details.
Collapse
3: Re: upgrade and cvs woes (response to 1)
Posted by Jeff Lu on

Thanks Andrei,

Let me further explain what I did.

I used an openacs4.6.3 tarball, untarred it, created a cvs repository on our dev server and imported it in the repository like so:

cvs import -m "importing 4.6.3" somename OpenACS openacs-4-6-3-final

I made some modifications to some code, and created my packages.

After that they decided about upgrading to 5.0.4.

To do that, I got the 5.0.4 tarball, untarred it, and imported it like so:

cvs import -m "importing 5.0.4" somename OpenACS openacs-5-0-4-final

Since I've used cvs import to upgrade it to 5, it will not remove the files that were not present in 5.0.

I am referring to the lang-procs, lang-init and the 0-procs I've mentioned earlier.

From the steps I took, cvs update will not tag some files that weren't present on 5.0 ( but were there on 4.6.3 ) as Removed since I did not remove any file from the stock acs 4.6.3 when I imported 5.0.4.

Is that how cvs import should really behave? Any idea to an alternative solution? Thanks!!

Collapse
4: Re: upgrade and cvs woes (response to 1)
Posted by Michael Steigman on
The same exact thing happened to me. I inquired on IRC and Joel Aufrecht was kind enough to give me a few pointers that got me going in the right direction. Based on what I've learned (and hopefully others will correct me if I'm wrong), you're best option is to do a merge after importing the new sources: do a checkout using the double j syntax, the first -j being before the import and the second -j being after. That will give you a checkout with the obsoleted files marked for removal. Commit from the root of that checkout and the obsoleted files will be removed. I found tagging the tree before and after the import helpful. Andrew Grumet wrote up some CVS documentation that might be of further help. It's called "Advanced CVS for .LRN Development" and is under the dotlrn project documentation on openacs.org.
Collapse
5: Re: upgrade and cvs woes (response to 1)
Posted by Jeff Lu on
Thanks Michael... Im off to read Andrew's document...!
Collapse
6: Re: upgrade and cvs woes (response to 1)
Posted by Torben Brosten on
Have you seen the upgrading link on the front page? It includes the procedure for upgrading from 4.6.3 to 5.0.x[1].

1. https://openacs.org/doc/openacs-HEAD/upgrade-openacs.html#upgrade-4.6.3-to-5

Collapse
7: Re: upgrade and cvs woes (response to 1)
Posted by Torben Brosten on
This thread[2] on other 4.6.3 to 5.0 upgrading experiences may be helpful, too.

cheers,

Torben

2. https://openacs.org/forums/message-view?message_id=152200

Collapse
8: Re: upgrade and cvs woes (response to 1)
Posted by Jeff Lu on
Thanks Torben, That link really proved useful.