com web/rmtools: fix to license attaching: client/include/PeclExt.php

From: Date: Mon, 21 Oct 2013 12:16:51 +0000
Subject: com web/rmtools: fix to license attaching: client/include/PeclExt.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-19115@lists.php.net to get a copy of this message
Commit: 80d29dffc8e703d51b9eac12128982275e32cc4b Author: Anatol Belski <ab@php.net> Mon, 21 Oct 2013 14:16:51 +0200 Parents: b017d3375422ce0719789227431c3746edac10a2 Branches: master Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=80d29dffc8e703d51b9eac12128982275e32cc4b Log: fix to license attaching Changed paths: M client/include/PeclExt.php Diff: diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index 7ac4555..cfb488c 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -578,7 +578,8 @@ if (!function_exists('rmtools\combinations')) { if (is_array($glob)) { foreach ($glob as $fl) { $tgt_fl = $target . DIRECTORY_SEPARATOR - . strtoupper(basename($fl)) . "." . strtoupper($suffix); + . strtoupper(basename($fl)); + $tgt_fl = $suffix ? $tgt_fl . "." . strtoupper($suffix) : $tgt_fl; if (!copy($fl, $tgt_fl)) { throw new \Exception("The license file '$fl' " . "was found but couldn't be copied into '$tgt_fl'"); @@ -743,10 +744,10 @@ if (!function_exists('rmtools\combinations')) { /* care about extension license */ /* The ext license will be copied based on the info from package.xml, but let these lines stay */ - /*$files_to_zip = array_merge( + $files_to_zip = array_merge( $files_to_zip, - $this->prepareExtLicense($this->tmp_extract_path, $target, "php." . $this->name) - );*/ + $this->prepareExtLicense($this->tmp_extract_path, $target) + ); /* care about the files marked as "doc" in the package.xml */ $dirs = $this->getPackageXmlProperty("contents", "dir"); @@ -784,6 +785,10 @@ if (!function_exists('rmtools\combinations')) { . DIRECTORY_SEPARATOR . basename((string)$file["name"]); + if (file_exists($tgt_fl)) { + continue; + } + /* this could already done while checking license */ if (in_array($tgt_fl, $files_to_zip)) { continue;

« previous php.webmaster (#19115) next »