Remove a package with no builds

Nathan Blackham kemotaha at gmail.com
Tue Jul 6 22:48:09 UTC 2010


Mike, Thanks for the comments.  I haven't deleted them yet, as I have
been busy so your comments are helpful.

Quick Question in line

On Tue, Jul 6, 2010 at 9:47 AM, Mike McLean <mikem at redhat.com> wrote:
...
> On 07/01/2010 09:40 PM, Eric Zhong wrote:
...
>> delete build :
>> ==========
>>
>> delete from tag_listing where build_id in (select id from build where
>> pkg_id = (select id from package where name = 'serefpolicy') and
>> version = '2.4.6' and release = '203.el5.ns5.se.09');
>
>> delete from rpmsigs where rpm_id in (select id from rpminfo where
>> build_id in (select id from build where pkg_id = (select id from
>> package where name = 'serefpolicy') and version = '2.4.6' and release
>> = '203.el5.ns5.se.09'));
>
>> delete from buildroot_listing where rpm_id in (select id from rpminfo
>> where build_id in (select id from build where pkg_id = (select id from
>> package where name = 'serefpolicy') and version = '2.4.6' and release
>> = '203.el5.ns5.se.09'));
>
>> delete from rpminfo where build_id in (select id from build where
>> pkg_id = (select id from package where name = 'serefpolicy') and
>> version = '2.4.6' and release = '203.el5.ns5.se.09');
>
>> delete from build where pkg_id = (select id from package where name =
>> 'serefpolicy') and version = '2.4.6' and release =
>> '203.el5.ns5.se.09';
>
> This is an even more destructive set of commands. What these commands
> attempt to do is delete a build without a trace even if it is currently
> referenced.
>
> Koji already has the capability to (sanely) delete a build. It doesn't
> have its own direct cli subcommand, but you can run it like so:
>
> # brew call deleteBuild  fake-1.0-6
>

isn't brew the previous buildsystem that redhat was using.  Is there a
way to call this through koji, or do I need to install brew?  Just for
future note.  I don't need this now.


> There are three things that will keep this from going through:
> - build currently tagged
> - build was used in a buildroot of another (non-deleted) build
> - build was used in some other buildroot recently
> If a build has such references, then you probably shouldn't be deleting it.
>
> If there are no such references, then this command will delete the build
> from disk, delete any signature data for it, and mark the build deleted.
> It will still have a small presence in the db as historical data (tag
> history, deleted build entry, etc)


Thanks,
Nathan


More information about the buildsys mailing list