summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch')
-rw-r--r--meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
new file mode 100644
index 0000000000..bc5e111ee5
--- /dev/null
+++ b/meta/recipes-devtools/ossp-uuid/ossp-uuid/0004-fix-data-uuid-from-string.patch
@@ -0,0 +1,43 @@
1Description: Support dash-less args to from_string.
2Author: Tim Retout <diocles@debian.org>
3Bug-Debian: http://bugs.debian.org/635607
4
5The module Data::GUID depends on Data::UUID supporting this behaviour.
6
7----
8Upstream-Status: Inappropriate [not author]
9
10This patch is from debian ossp-uuid 1.6.2 integration.
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13
14--- a/perl/uuid_compat.pm
15+++ b/perl/uuid_compat.pm
16@@ -93,7 +93,9 @@
17 $uuid->import('str',
18 $str =~ /^0x/
19 ? join '-', unpack('x2 a8 a4 a4 a4 a12', $str)
20- : $str
21+ : $str =~ /-/
22+ ? $str
23+ : join '-', unpack('A8 A4 A4 A4 A12', $str)
24 );
25 return $uuid->export('bin');
26 }
27--- a/perl/uuid_compat.ts
28+++ b/perl/uuid_compat.ts
29@@ -28,7 +28,7 @@
30 ## uuid_compat.ts: Data::UUID Backward Compatibility Perl API (Perl test suite part)
31 ##
32
33-use Test::More tests => 14;
34+use Test::More tests => 16;
35
36 BEGIN {
37 use_ok('Data::UUID');
38@@ -53,3 +53,5 @@
39 ok($uuid8 = $ug->from_string("6ba7b811-9dad-11d1-80b4-00c04fd430c8"));
40 ok($ug->compare($uuid7, $uuid8) == 0);
41
42+ok($uuid9 = $ug->from_string("6ba7b8119dad11d180b400c04fd430c8"));
43+ok($ug->compare($uuid7, $uuid9) == 0);