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

def yum::YumBase::verifyPkg (   self,
  fo,
  po,
  raiseError 
)

verifies the package is what we expect it to be
   raiseError  = defaults to 0 - if 1 then will raise
   a URLGrabError if the file does not check out.
   otherwise it returns false for a failure, true for success

Definition at line 497 of file __init__.py.

00497                                            :
        """verifies the package is what we expect it to be
           raiseError  = defaults to 0 - if 1 then will raise
           a URLGrabError if the file does not check out.
           otherwise it returns false for a failure, true for success"""

        if type(fo) is types.InstanceType:
            fo = fo.filename

        for (csumtype, csum, csumid) in po.checksums:
            if csumid:
                checksum = csum
                checksumType = csumtype
                break
        try:
            self.verifyChecksum(fo, checksumType, checksum)
        except URLGrabError, e:
            if raiseError:
                raise
            else:
                return 0

        ylp = YumLocalPackage(self.read_ts, fo)
        if ylp.pkgtup != po.pkgtup:
            if raiseError:
                raise URLGrabError(-1, 'Package does not match intended download')
            else:
                return 0
        
        return 1
        
        
    def verifyChecksum(self, fo, checksumType, csum):


Generated by  Doxygen 1.6.0   Back to index