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

def yum::YumBase::getPackageObject (   self,
  pkgtup 
)

retrieves a packageObject from a pkgtuple - if we need
   to pick and choose which one is best we better call out
   to some method from here to pick the best pkgobj if there are
   more than one response - right now it's more rudimentary.

Definition at line 1232 of file __init__.py.

01232                                       :
        """retrieves a packageObject from a pkgtuple - if we need
           to pick and choose which one is best we better call out
           to some method from here to pick the best pkgobj if there are
           more than one response - right now it's more rudimentary."""
           
        
        (n,a,e,v,r) = pkgtup
        
        # look it up in the self.localPackages first:
        for po in self.localPackages:
            if po.pkgtup == pkgtup:
                return po
                
        pkgs = self.pkgSack.packagesByTuple(pkgtup)

        if len(pkgs) == 0:
            raise Errors.DepError, 'Package tuple %s could not be found in packagesack' % str(pkgtup)
            return None
            
        if len(pkgs) > 1: # boy it'd be nice to do something smarter here FIXME
            result = pkgs[0]
        else:
            result = pkgs[0] # which should be the only
        
            # this is where we could do something to figure out which repository
            # is the best one to pull from
        
        return result

    def getInstalledPackageObject(self, pkgtup):


Generated by  Doxygen 1.6.0   Back to index