Forum OpenACS Development: How to change a package to non-singleton?

What is the proper way to convert an existing OpenACS package from singleton_p true to singleton_p false, and handle any necessary upgrade steps?
Collapse
Posted by Andrew Piskorski on
In "packages/acs-kernel/sql/*/apm-create.sql", this is the comment on column apm_package_types.singleton_p:
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 restricted to the acs-admin/ subsite.
My immediate thought was, "Huh?". What the heck does that mean? What do subsites have to do with the singleton-ness of a package? And the "acs-admin" subsite, what? I've sure used non-singleton packages in other places - like the Main sub-site at "/", for instance.

That comment has been in there since ACS 4.2, actually, but I never happened to look at it before. And I've missed some stuff anyway, since I haven't been paying any attention to low level details like this in OpenACS since ACS 4.2, so could someone fill me in: What should that comment really say? What are the true ramifications of singleton_p in OpenACS?

Collapse
Posted by Don Baccus on
The comment should say "you can only mount it once".  It has nothing to do with subsites.  I guess whoever the aD person was who wrote it was thinking that typically multi-mounted packages would be under different subsites, but there's no such restriction.

As for changing singleton_p false, just edit the .info file.  Upgrading would involve whacking the value in apm_package_types.  To make upgrading work properly you need to bump the version number by editing the .info file and by adding upgrade-old-new.sql files that correspond to the old and new version number.

Mind my asking which package you're changing?

Collapse
4: static-pages (response to 1)
Posted by Andrew Piskorski on
No, of course I don't mind.  :)  Static Pages.

Btw, Paul H. told me about your plans to release 4.6 Monday.  Don't
worry, I'll make sure static-pages is in a releaseable state by then,
so you can include my recent improvements in the release if you want.
If on the other hand you don't want them in the tarball, just let me
know and I can put a tag on the versions before my recent changes.
(Also, I'm going to be out of town from Friday afternoon to late
Saturday night, EST.)

Collapse
Posted by Don Baccus on
Oh, yes, it makes sense to be able to mount this under different subsites ...

Please make it work earlier than Monday so I can do a little testing over the weekend, if you don't mind?

Collapse
Posted by Andrew Piskorski on
Don, I believe it's been basically working since Thursday night, but I still need to add more stuff to the upgrade scripts, make some additional enhancements (needs to properly support MIME types other than text/html), and do more testing.  (In particular, I haven't test3ed the Site Wide Search integration stuff at all yet.)  I'll be doing more work on it this afternoon.