[pkg-php-pear] Bug#761373: [PATCH 1/2] Composer: Remove trailing dot in description

David Prévot taffit at debian.org
Sat Sep 13 19:11:44 UTC 2014


Reproduces the code from 7b585f8c, but adapted from PEAR to Composer.

Closes: #761373
---
 share/php/pkgtools/phpcomposer/command.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/share/php/pkgtools/phpcomposer/command.php b/share/php/pkgtools/phpcomposer/command.php
index 31a29cb..0d32065 100644
--- a/share/php/pkgtools/phpcomposer/command.php
+++ b/share/php/pkgtools/phpcomposer/command.php
@@ -65,7 +65,11 @@ class Command extends \Pkgtools\Base\Command {
         $p = new Source($this->getProperty('_sourcedirectory'));
         // Print substvars
         echo "phpcomposer:name="        . $p->name."\n";
-        echo 'phpcomposer:description=' . \Pkgtools\Base\Utils::substvar($p->description)."\n";
+        $description = \Pkgtools\Base\Utils::substvar($p->description);
+        if ($description[strlen($description)-1] == '.') {
+            $description = substr($description, 0, -1);
+        }
+        echo 'phpcomposer:description=' . $description."\n";
         $dependencies = $p->getDependencies()->asDeb();
         foreach ($dependencies as $level => $deps) {
             echo "phpcomposer:Debian-$level=" . implode($deps, ', ')."\n";
-- 
2.1.0



More information about the pkg-php-pear mailing list