Reimporting deleted builds into Koji

Mike McLean mikem at redhat.com
Wed Dec 15 19:56:21 UTC 2010


On 12/15/2010 11:32 AM, Alan Franzoni wrote:
> Hello,
> it sometimes happens that the now working garbage collector deletes a
> build - mostly for an externally imported package - that we'd not
> really mean to delete.
>
> It seems impossible to import back that build from a src+binary rpm -
> koji says it's already there - and there seems no obvious way to
> change the state and revert the deletion.
>
> As a workaround we copied the packages back where koji expected them
> and changed the "state" column in the "build" database table back to 1
> (completed).
>
> Is there any better way to do it? Isn't there a "koji forget-build" command?

It's kind of a mess right now. Fixing it is on my todo list.

There's the resetBuild call, which was intended to allow a build to be 
rebuilt, but while rebuilding over such a reset build works, reimporting 
does not. On the rare occasion I've needed to do this I issued a 
resetBuild, manually set the build's state to 1 (complete) in the db, 
then reimported.

I should caution that the resetBuild call is somewhat dangerous as it 
has few safety checks and deletes data. This is why there is no cli 
handler for it (though it works fine via the 'call' handler). It is 
intended to be rarely used, it at all.


More information about the buildsys mailing list