Forum OpenACS Q&A: Re: unable to delete a package

Collapse
Posted by Pavel Boghita on
this may be due to a known bug which has been rectified.
dropdb myservice
and starting all over again with the latest tarball has solved the problem at least for deleting presentations.
Collapse
Posted by Randy O'Meara on
Sorry, Paul, that nobody responded to your question.

The truth is...

The problem you ran into is pervasive. And, unfortunately, your solution is all too often the only solution to this problem. Well, that's not entirely true. You could resort to plsql to remove references and dependencies, but it's tedious, frustrating, error-prone, and just plain difficult.

In *most* cases, once you add content (actually, acs_objects and permissions), you're stuck with it until you drop/create the DB. There are several discussion threads in the forums that debate the rightness/wrongness of this "feature". The thing is, if you write your own packages, set up the model appropriately with cascaded deletes and triggers to remove explicit permissions and acs_objects.

As for the existing packages and core, maybe someday this "feature" will be fixed.

You can probably reproduce the error you saw by adding wimpy point content and trying to delete the wimpy point package again.

Collapse
Posted by Tilmann Singer on
Randy, this is not true for permissions anymore - they are now getting deleted automatically when you call acs_object.delete, so you don't have to do anything manually for that.

There might be lots of other dependencies though, and there are reasons for not adding on delete cascade on those, see previous discussions. But for a basic object with some perms attached it should work. Not sure if it's already in 4.6.3 though.

Collapse
Posted by Randy O'Meara on
Hooray!