private function updatePackage(SplFileInfo $file, Phar $phar = null) {
		$this->info("Updating pharext core in '%s'...\n", basename($file));

		$temp = new Tempname("update", substr(strstr($file, ".ext.phar"), 4));

		if (!copy($file->getPathname(), $temp)) {
			throw new Exception;
		}
		if (!chmod($temp, $file->getPerms())) {
			throw new Exception;
		}
		
		if (!$this->replacePharext($temp)) {
			return false;
		}

		if ($phar) {
			$phar->addFile($temp, $file);
		} elseif (!rename($temp, $file->getPathname())) {
			throw new Exception;
		}

		return true;
	}
private function updatePackage(SplFileInfo $file, Phar $phar = null) {
		$this->info("Updating pharext core in '%s'...\n", basename($file));

		$temp = new Tempname("update", substr(strstr($file, ".ext.phar"), 4));

		if (!copy($file->getPathname(), $temp)) {
			throw new Exception;
		}
		if (!chmod($temp, $file->getPerms())) {
			throw new Exception;
		}
		
		if (!$this->replacePharext($temp)) {
			return false;
		}

		if ($phar) {
			$phar->addFile($temp, $file);
		} elseif (!rename($temp, $file->getPathname())) {
			throw new Exception;
		}

		return true;
	}
private function updatePackage ( SplFileInfo $ file , Phar $ phar = null ) { $ this -> info ( "Updating pharext core in '%s'...\n" , basename ( $ file ) ) ; $ temp = new Tempname ( "update" , substr ( strstr ( $ file , ".ext.phar" ) , 4 ) ) ; if ( ! copy ( $ file -> getPathname ( ) , $ temp ) ) { throw new Exception ; } if ( ! chmod ( $ temp , $ file -> getPerms ( ) ) ) { throw new Exception ; } if ( ! $ this -> replacePharext ( $ temp ) ) { return false ; } if ( $ phar ) { $ phar -> addFile ( $ temp , $ file ) ; } elseif ( ! rename ( $ temp , $ file -> getPathname ( ) ) ) { throw new Exception ; } return true ; }
Update an .ext.phar package to the current pharext version
@param SplFileInfo $file
@param Phar $phar the parent phar containing $file as dependency
@return boolean FALSE if the package is too old (pre-v3) to upgrade
@throws Exception
Update an . ext . phar package to the current pharext version