Logo Search packages:      
Sourcecode: packagekit version File versions  Download package

def yumBackend::DownloadCallback::updateProgress (   self,
  name,
  frac,
  fread,
  ftime 
)

 Update the progressbar (Overload in child class)
@param name: filename
@param frac: Progress fracment (0 -> 1)
@param fread: formated string containing BytesRead
@param ftime : formated string containing remaining or elapsed time

Definition at line 1237 of file yumBackend.py.

01237                                                   :
        '''
         Update the progressbar (Overload in child class)
        @param name: filename
        @param frac: Progress fracment (0 -> 1)
        @param fread: formated string containing BytesRead
        @param ftime : formated string containing remaining or elapsed time
        '''
        pct = int( frac*100 )
        if name != self.oldName: # If this a new package
            if self.oldName:
                self.base.sub_percentage(100)
            self.oldName = name
            if self.bump > 0.0: # Bump the total download percentage
                self.totalPct += self.bump
                self.lastPct = 0
                self.base.percentage(int(self.totalPct))
            if self.showNames:
                pkg = self._getPackage(name)
                if pkg: # show package to download
                    self.base._show_package(pkg,INFO_DOWNLOADING)
                else:
                    if name in MetaDataMap:
                        typ = MetaDataMap[name]
                    else:
                        typ = 'unknown'
                    self.base.metadata(typ,name)
            self.base.sub_percentage(0)        
        else:
            if self.lastPct != pct and pct != 0 and pct != 100:
                  self.lastPct = pct
                  # bump the sub persentage for this package
                  self.base.sub_percentage(pct)

class PackageKitCallback(RPMBaseCallback):


Generated by  Doxygen 1.6.0   Back to index