Home
The Toolkit for Online Communities
17367 Community Members, 0 members online, 2283 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Is this a bug: right after creating pkg in APM, key is not known but should be : One Message

Forum OpenACS Development: Re: Is this a bug: right after creating pkg in APM, key is not known but should be

Uh, did you guys actually try this?

1. The package version is set up and marked enabled and installed.

2. You go to the "install packages" acs-admin page, and the package does not show up.

3. Apparently it is half-installed/half-not installed.

4. The reason is that no apm_package_type is created for the package, so it's in a semi-zombie state (this is why you can't install it, and if it allowed you to install it, it would scream because the version already exists!)

Jim, you can test this by going to psql and giving this command:

select * from apm_package_versions where package_key = 'your-package-key';

and then

select * from apm_package_types where package_key = 'your-package-key'.

Torben, please remove your misleading change to the HTML page.

It would require a rewriting of the entire APM to get rid of this "install package upon creation" bit, because add depedencies, parameters, etc are all driven by the package version's params etc as stored in the database (not the XML info file).

So the right thing to do is to make the new package fully installed, as gross as that is, and I will do so this weekend, by making an entry in apm_package_types for the new package when it is created.

so even after restart there's something wrong? (I did notice my subsite-inheriting package doesn't have parameters, could that have something to do with this?)
I just tested, both rows exist (but this is after restart)
Restart doesn't affect the contents of the DB, Jim.
OK, I'm testing this, because without me doing anything other than restart, both rows you mentioned are present for my new package. I'll let you know what happens on this thread.

Does the apm_package_type mean (for now) service or app?

no apm_package_type is created for the package
Yes it is, just tested in 5.5. I'll be posting a log. Here is the log: http://jam.sessionsnet.org/files/download/package-error-log.txt?file_id=5669
the above log is generated when I click the button on the site map that actually creates the package instance and mounts it.
You're right, it is. What wasn't being generated was the cache entry for the new package_key, an nsv that I added to implement "extends" and "embeds". I rearranged things in 5.6 a bit to improve the semantics and that leads to the nsv being used in a couple of places where it wasn't used before, and I missed this instance.
cool... I don't necessarily mind restarting, but if there's a simple fix that can be backported to 5.5.0 that would make it easier to work... would be appreciated.