On 06/04/2014 06:06 PM, Pat Riehecky wrote:
I made a typo when I ran a 'koji add-pkg' and can't seem
to find a way
to remove the entry from the database.
I've never built anything against the entry, and never will.
The package removed from the relevant tag, but still shows up in some of
my searches (regex with a .*).
How can I make this go away?
Unfortunately koji errs on the paranoid side of data retention. There is
no api call to do this.
As you say, this is mostly a cosmetic thing (stray entry in certain
If you want to remove it, you'll need to do it at the db level. Since
you actually tagged the package, that makes things complicated since
that leaves history references even after untagging.
I see two options.
1) Rename the the package at the db level to the right thing
(but I guess you probably already added the correctly named package so
that won't work)
2) Delete the package at the db level. You'll need to delete the
references as well. I suggest you query them first to make sure you know
what you're losing. E.g.
koji=> select package.id, tag.name, tag_packages.active from
tag_packages join tag on tag_id=tag.id join package on
package.id=package_id where package.name in ('MYBADPACKAGE');
Once you are sure you know what you're deleting and still want to.
koji=> delete from tag_packages where package_id=ID_FOR_MYBADPACKAGE;
koji=> delete from package where id=ID_FOR_MYBADPACKAGE;
If you have *builds* for the package in question (even deleted ones) it
gets much harder. Still possible, but there will be more references. The
only other table that references package ids is the build_notifications