Mageia Bugzilla – Attachment 12658 Details for
Bug 28815
provides/conflicts/requires/obsoletes not parsed properly when they contain square brackets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch adding a test reproducing the problem
squarebracketstest.patch (text/plain), 1.25 KB, created by
Pascal Terjan
on 2021-04-20 21:32:02 CEST
(
hide
)
Description:
Patch adding a test reproducing the problem
Filename:
MIME Type:
Creator:
Pascal Terjan
Created:
2021-04-20 21:32:02 CEST
Size:
1.25 KB
patch
obsolete
>diff --git a/t/synthesis.t b/t/synthesis.t >index 8246b36..0de459b 100644 >--- a/t/synthesis.t >+++ b/t/synthesis.t >@@ -2,7 +2,7 @@ > > use strict ; > use warnings ; >-use Test::More tests => 95; >+use Test::More tests => 101; > use URPM; > > chdir 't' if -d 't'; >@@ -27,7 +27,18 @@ $s =~ s/-devel//g; > print $f $s; > close $f; > >-END { unlink $file1, $file2 } >+$s = <<'EOF'; >+@provides@python3-fonttools+ufo[== 4.18.2-4.mga9]@python3dist(fonttools[ufo])[== 4.18.2] >+@summary@Metapackage for python3-fonttools: ufo extras >+@info@python3-fonttools+ufo-4.18.2-4.mga9.noarch@0@221683@Development/Other >+EOF >+ >+my $file3 = 'synthesis.squarebrackets.cz'; >+open my $f, "| gzip -9 >$file3"; >+print $f $s; >+close $f; >+ >+END { unlink $file1, $file2, $file3 } > > my $a = URPM->new; > ok($a); >@@ -161,3 +172,15 @@ ok($requires[8] eq 'rpmlib(CompressedFileNames)'); > @provides = $pkg->provides_nosense; > ok(@provides == 1); > ok($provides[0] eq 'glibc-devel'); >+ >+my $b = URPM->new; >+$b->parse_synthesis($file3); >+$pkg = $b->{depslist}[0]; >+ok($pkg); >+is($pkg->name, 'python3-fonttools+ufo'); >+@provides = $pkg->provides; >+is(@provides, 2); >+is($provides[1], 'python3dist(fonttools[ufo])[== 4.18.2]'); >+@provides = $pkg->provides_nosense; >+is(@provides, 2); >+is($provides[1], 'python3dist(fonttools[ufo])');
diff --git a/t/synthesis.t b/t/synthesis.t index 8246b36..0de459b 100644 --- a/t/synthesis.t +++ b/t/synthesis.t @@ -2,7 +2,7 @@ use strict ; use warnings ; -use Test::More tests => 95; +use Test::More tests => 101; use URPM; chdir 't' if -d 't'; @@ -27,7 +27,18 @@ $s =~ s/-devel//g; print $f $s; close $f; -END { unlink $file1, $file2 } +$s = <<'EOF'; +@provides@python3-fonttools+ufo[== 4.18.2-4.mga9]@python3dist(fonttools[ufo])[== 4.18.2] +@summary@Metapackage for python3-fonttools: ufo extras +@info@python3-fonttools+ufo-4.18.2-4.mga9.noarch@0@221683@Development/Other +EOF + +my $file3 = 'synthesis.squarebrackets.cz'; +open my $f, "| gzip -9 >$file3"; +print $f $s; +close $f; + +END { unlink $file1, $file2, $file3 } my $a = URPM->new; ok($a); @@ -161,3 +172,15 @@ ok($requires[8] eq 'rpmlib(CompressedFileNames)'); @provides = $pkg->provides_nosense; ok(@provides == 1); ok($provides[0] eq 'glibc-devel'); + +my $b = URPM->new; +$b->parse_synthesis($file3); +$pkg = $b->{depslist}[0]; +ok($pkg); +is($pkg->name, 'python3-fonttools+ufo'); +@provides = $pkg->provides; +is(@provides, 2); +is($provides[1], 'python3dist(fonttools[ufo])[== 4.18.2]'); +@provides = $pkg->provides_nosense; +is(@provides, 2); +is($provides[1], 'python3dist(fonttools[ufo])');
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 28815
:
12658
|
12663