Module DistfilesCleaner :: Class DistfilesCleaner
[show private | hide private]
[frames | no frames]

Class DistfilesCleaner

Known Subclasses:
DistfilesCleanerNonInstalled, DistfilesCleanerSmallFiles

Abstract class

All the differents polices for cleaning the distfiles directories, should inherit from this class, and override the abstract methods (the one that have the pass keywords)
Method Summary
  perform(self)
Deletes the files that the policy dictates.
  select_files_to_delete(self, hash)
policy for the clean: this method leaves in the hash the entries that you want to delete.
  set_distdir(self, szDir)
sets the distdir directory to a custom value
  set_pretend(self, bValue)
sets the pretend (do nothing) flag
  __countdown(self, secs, doing)
borrowed from /usr/bin/emerge 1.264 (2004/02/08) shows a countdown message.
  __delete_filename(self, filename)
deletes a filename.
  __get_distfiles(self)
Returns a dictionary (i, value), with the filename to and its size.

Class Variable Summary
str distfile_path = '/usr/portage/distfiles'
int pretend = 0                                                                     

Method Details

perform(self)

Deletes the files that the policy dictates. if the self.pretend variable is True, it has to print the files.

select_files_to_delete(self, hash)

policy for the clean: this method leaves in the hash the entries that you want to delete. When the method is called the hash contains all the source files avalailable

Abstract

set_distdir(self, szDir)

sets the distdir directory to a custom value

set_pretend(self, bValue)

sets the pretend (do nothing) flag

__countdown(self, secs=5, doing='Starting')

borrowed from /usr/bin/emerge 1.264 (2004/02/08) shows a countdown message. called from perform

__delete_filename(self, filename)

deletes a filename. called by #perform()

__get_distfiles(self)

Returns a dictionary (i, value), with the filename to and its size. called from #perform(). protected

Class Variable Details

distfile_path

Type:
str
Value:
'/usr/portage/distfiles'                                               

pretend

Type:
int
Value:
0                                                                     

Generated by Epydoc 2.0 on Sat Apr 10 16:01:51 2004 http://epydoc.sf.net