lib/magento/Package.php
public function addDependencyPackage($name, $channel, $minVersion, $maxVersion, $files = array())
    {
        $parent = $this->_packageXml->dependencies;
        $parent = $this->_getNode('required', $parent);
        $parent = $parent->addChild('package');
        $parent->addChild('name', $name);
        $parent->addChild('channel', $channel);
        $parent->addChild('min', $minVersion);
        $parent->addChild('max', $maxVersion);
        if(count($files)) {
            $parent = $parent->addChild('files');
            foreach($files as $row) {
                if(!empty($row['target']) && !empty($row['path'])) {
                    $node = $parent->addChild("file");
                    $node["target"] = $row['target'];
                    $node["path"] =  $row['path'];

                }
            }
        }
        return $this;
    }
public function addDependencyPackage($name, $channel, $minVersion, $maxVersion, $files = array())
    {
        $parent = $this->_packageXml->dependencies;
        $parent = $this->_getNode('required', $parent);
        $parent = $parent->addChild('package');
        $parent->addChild('name', $name);
        $parent->addChild('channel', $channel);
        $parent->addChild('min', $minVersion);
        $parent->addChild('max', $maxVersion);
        if(count($files)) {
            $parent = $parent->addChild('files');
            foreach($files as $row) {
                if(!empty($row['target']) && !empty($row['path'])) {
                    $node = $parent->addChild("file");
                    $node["target"] = $row['target'];
                    $node["path"] =  $row['path'];

                }
            }
        }
        return $this;
    }
public function addDependencyPackage ( $ name , $ channel , $ minVersion , $ maxVersion , $ files = array ( ) ) { $ parent = $ this -> _packageXml -> dependencies ; $ parent = $ this -> _getNode ( 'required' , $ parent ) ; $ parent = $ parent -> addChild ( 'package' ) ; $ parent -> addChild ( 'name' , $ name ) ; $ parent -> addChild ( 'channel' , $ channel ) ; $ parent -> addChild ( 'min' , $ minVersion ) ; $ parent -> addChild ( 'max' , $ maxVersion ) ; if ( count ( $ files ) ) { $ parent = $ parent -> addChild ( 'files' ) ; foreach ( $ files as $ row ) { if ( ! empty ( $ row [ 'target' ] ) && ! empty ( $ row [ 'path' ] ) ) { $ node = $ parent -> addChild ( "file" ) ; $ node [ "target" ] = $ row [ 'target' ] ; $ node [ "path" ] = $ row [ 'path' ] ; } } } return $ this ; }
Add package to dependency packages.

@param string $package
@param string $channel
@param string $minVersion
@param string $maxVersion
@return Mage_Connect_Package
Add package to dependency packages .