Package: pkg-php-tools
Version: 1.11
Severity: normal
Tags: patch
Control: affects -1 php-texy

Hi,

The “self.version” syntax [0] should be recognised. The attached patch
addresses the issue.

        0: https://getcomposer.org/doc/04-schema.md#replace

Regards

David
From 344b5ada19b72bb96a7b2c412df515a3bab457b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Pr=C3=A9vot?= <[email protected]>
Date: Thu, 12 Jun 2014 11:22:18 -0400
Subject: [PATCH] Composer: Handle self.version

https://getcomposer.org/doc/04-schema.md#replace
---
 lib/scripts/phppkginfo | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/scripts/phppkginfo b/lib/scripts/phppkginfo
index 5d8fd8b..86c8a62 100755
--- a/lib/scripts/phppkginfo
+++ b/lib/scripts/phppkginfo
@@ -443,6 +443,10 @@ function composerDebianVersion($pkg, $version, $link) {
 				return implode(' | ', $pkg_lower).', '.implode(' | ', $pkg_upper);
 		}
 	}
+	elseif ($version == 'self.version') {
+		array_walk($pkg, 'composerDebianVersionCompose', ' (= ${binary:Version})');
+		return implode(' | ', $pkg);
+	}
 	printLog('Unable to parse version ('.$version.')');
 	array_walk($pkg, 'composerDebianVersionCompose', " (ERROR:parsing ? $version)");
 	return implode(' | ', $pkg);
-- 
2.0.0

Attachment: signature.asc
Description: Digital signature

Reply via email to