Forum .LRN Q&A: Packages disabled by default

Collapse
Posted by Ola Hansson on
I just installed a package (one of my own) from a local directory and found to my surprise that it would not work as advertised ... When I checked the apm it turned out the package was disabled (!) although I had chosen "install and enable" during installation.

After I had enabled the package it still wouln't work until I restarted the server, which I'd already done...(sigh).

Did someone change this intentionally, and If so, why?

BTW, I also found some _nice_ changes in the apm 😊 - like the ability to watch ALL files in a package, and the ability to remove a package without deleting its files - cool!

/Ola

Collapse
Posted by Peter Marklund on
Ola, I wasn't able to reproduce this problem. Make sure your kernel packages (acs-tcl, acs-admin et al) are up-to-date (you are on cvs head, right?). For OpenACS 4-6 and dotlrn 1.0 you may use the test servers as reference. I am recreating a dotLRN server now off of cvs head on PG to see if there are issues. Any errors in the log file?
Collapse
Posted by Peter Marklund on
Ola, concerning APM enhancements there have been a few lately, such as:
  • The APM will automatically suggest all dependencies of a package for installation. This means you don't need to know all the services needed by the applications you are interested, the APM takes care of such dependencies for you.
  • You no longer need to restart the server after installation. Tcl libraries and init files are sourced by the APM. One thing to watch out for here is that -init.tcl files will be sourced multiple times (once per Tcl interpreter) so they need to be able to deal with that.
  • The APM can auto mount packages at a certain URL (such as /notifications for the notifications package).
  • You can specify callbacks for your package. Available callback types are: after-install, after-instantiate, after-mount, before-unmount, before-uninstantiate, and before-uninstall. The APM UI will throw an error if the specified callback Tcl proc doesn't exist or doesn't have the right argument switches. I added the argument switch checking while writing this post as I realized that arguments required are nowhere documented and non-obvious.
Collapse
Posted by Ola Hansson on
Yes Peter, I'm on HEAD and PG 7.3.

I dropped the old db, did a new check-out of acs-core and was able to recreate the problem; it seems it occurs only when you install a package from a local directory, not when installing the "ordinary" way. I tried with another package, mp3-jukebox, so it does not appear to be a problem with my new package (knock on wood!) ...

In order to test this, I created an .apm file from the mp3-jukebox dir like so:

cvs co mp3-jukebox
tar -czvvf mp3-jukebox.apm mp3-jukebox/

As for the APM enhancements, they seem really nice indeed. Hopefully I'll have reasons to pound on the apm in the near future, and will let you know if I find glitches in it.

/Ola

Collapse
Posted by Simon Carstensen on
Peter,

I was experiencing the same problem and Ola's solution did the trick.

I was wondering, is this a bug in the APM (newly installed package are set as disabled and not enabled) or is it a bug in my package?

/Simon