Cannot delete a branch whose recipe build is referenced by a sourcepackagerelease

Bug #624815 reported by Aaron Bentley
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Aaron Bentley

Bug Description

Deleting a branch requires deleting or NULLing every reference to it. This means deleting recipes, and therefore, deleting recipe builds. However, deleting recipe builds doesn't NULL the reference from a sourcepackagerelease to the sourcepackagerecipebuild.

The result is an oops like: OOPS-1699EC1641
  IntegrityError: update or delete on table "sourcepackagerecipebuild" violates foreign key constraint "sourcepackagerelease_sourcepackage_recipe_build_fkey" on table "sourcepackagerelease" DETAIL: Key (id)=(1353) is still referenced from table "sourcepackagerelease".

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote :

A potential workaround would be to delete the PPA the release was published in

Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 624815] Re: Cannot delete a branch whose recipe build is referenced by a sourcepackagerelease

On Fri, 27 Aug 2010 05:49:36 you wrote:
> A potential workaround would be to delete the PPA the release was
> published in

That seems somewhat extreme. What other options are there?

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/26/2010 04:07 PM, Tim Penhey wrote:
> On Fri, 27 Aug 2010 05:49:36 you wrote:
>> A potential workaround would be to delete the PPA the release was
>> published in
>
> That seems somewhat extreme. What other options are there?

I don't know of any other workarounds at present. I guess if there was
some way to delete a sourcepackagerelease, that would work.

Or you could run an SQL query to NULL the appropriate sourcepackagerelease.

Obviously, a non-workaround solution is desirable.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx2zLoACgkQ0F+nu1YWqI2fRwCfZ3tc4HwbJoJKFFiWLUN08DV7
HUIAn0J6xrbqGLUfXDgZY2IdxwSH+2dO
=cZgL
-----END PGP SIGNATURE-----

Ursula Junque (ursinha)
description: updated
Aaron Bentley (abentley)
Changed in launchpad-code:
assignee: nobody → Aaron Bentley (abentley)
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in launchpad-code:
milestone: none → 10.10
tags: added: qa-needstesting
Changed in launchpad-code:
status: Triaged → Fix Committed
Aaron Bentley (abentley)
tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.