Пример #1
1
 function cmdRepo()
 {
     $file = new File('/home/billy/1.tar.bz2', true);
     $target = new Dir('/home/billy/temp/1.unpack/includes', true);
     //Packer::unpack($file, $target);
     Packer::pack($target, new File(dirname(__FILE__) . '/2.tbz', true));
     return;
     $pm = new PM();
     $pm->startup();
     $rb = PM::getRollback();
     $rb->push('delete', dirname(__FILE__) . '/_files/source', dirname(__FILE__) . '/_files/target/includes/Controller.php');
     //$rb->push('delete', './_files/source', '_files/target/includes/Controller.php' );
     //$r = $rb->pop();
     $r = $rb->stepBack();
     print_r($r);
     return;
     $ps = PM::getPackageSequence();
     print_r($ps->get());
     print_r($ps->getAfter('news', '2.3'));
     //print_pre($ps->addPackage('news', '2.8'));
     print_pre($ps->removePackage('news', '2.8'));
     return;
     Autoload::addDir(Dir::get($this->root, true)->getDir('repo'));
     $rl = new RepositoryList($this->dataDir->getFile('source.list'));
     $r = $rl->search(explode(' ', 'qt package'));
     print_pre($r);
     $pm->shutdown();
 }