On 01/20/2011 05:31 PM, Mike McLean wrote:
> On 01/20/2011 05:05 PM, Anthony Messina wrote:
>> > I'm continuing work a on a private Koji instance (Kerberos) and am now
>> > working on automating cleanup, etc.
>> >
>> > It is mentioned here
>> > http://lists.fedoraproject.org/pipermail/buildsys/2010-December/003415.html
>> > that "Koji leaves it to the administrator to clean out the scratch build
>> > directory."
>> >
>> > Is there anything special about cleaning up scratch builds or the
>> > work/{cli-build,cli-import,tasks} directories for that matter?
>> >
>> > Do I need to interact with the Koji database in any way to let koji know
>> > these files are gone? What I mean is, can I simply remove the files and
>> > directories without any Koji integration?
> The contents of work and scratch are not tracked in the database. The 
> mechanism I use is a simple cron job that simply looks at modification 
> times.
> 
> The main things you want to watch out for is deleting things too early. 
> Scratch builds aren't much use to anyone if you delete them before the 
> builder gets a chance to poke at them. The work directory is used as a 
> temporary holding zone by some tasks, so you don't want to delete stuff 
> out from under a running task. A reasonable time-based check is 
> sufficient to avoid this.
> 
> In my koji instance we keep content under work/ for two weeks and 
> content under scratch/ for one week.
> 
> Using tmpwatch is a another possibility. I believe it looks at access 
> times by default.

Thank you very much for your help.  With that assistance, I've scraped
together a "koji-maint" script & RPM that might be helpful for us
small-timers to automate Koji maintenance and mash repo creation:

http://messinet.com/rpms/browser/koji-maint

Feedback is welcome!  Again, thanks!  -A

-- 
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E

Attachment: signature.asc
Description: OpenPGP digital signature

--
buildsys mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Reply via email to