Removing jail that's part of existing build results in pgsql errors

John Marino marcuscom at marino.st
Fri Oct 21 09:02:31 EDT 2011


Hi,

I intentionally tried to remove a jail that was a component of a build.
 Tinderbox warned me about it, saying it would delete the build as well.
 This didn't happen, but rather foreign key constraint errors occurred
instead:


> banshee-root# ./tc listJails
> 2.10-ISO
> banshee-root# ./tc rmJail -j 2.10-ISO
> Removing this jail will also remove the following builds:
> 2.10-DragonFly
> Really remove jail 2.10-ISO? y
> ERROR: Failed to remove build 2.10-DragonFly as part of removing jail 2.10-ISO:
> ERROR: update or delete on table "builds" violates foreign key constraint "build_ports_queue_build_id_fkey" on table "build_ports_queue"
> DETAIL: Key (build_id)=(2) is still referenced from table "build_ports_queue".


It appears to me that this should also clear out existing queues of the
build in question, or use some kind of cascade action.

By the way, if you're wondering about the build and jail names, I'm
getting pretty close to porting Tinderbox to DragonFly BSD using pkgsrc
as the ports tree.  For those curious, the project code is hosted on github:

https://github.com/jrmarino/pkgsrc-tinderbox

I was planning to wait until I got everything working completely before
making any kind of announcement, but the bug reports come first.

Regards,
John


More information about the tinderbox-list mailing list