Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.8
build
_service:gitpkg:0020-Fix-rich-dependency-calcul...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:gitpkg:0020-Fix-rich-dependency-calculation-when-dependency-name.patch of Package build
From e8ca660accddf9ec0e6be44e3ac3c5b1c4458c37 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Thu, 3 May 2018 07:01:00 +0100 Subject: [PATCH] Fix rich dependency calculation when dependency name has parentheses. This change fixes getnevr_rich() function to work correctly with dependencies containing parentheses. For example, this function was mistakingly returning "rubygem(xpath" when parsing the following rich dependency: "(rubygem(xpath) >= 2.0 with rubygem(xpath) < 3)" Signed-off-by: Oleg Girko <ol@infoserver.lv> --- Build/Rpm.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Build/Rpm.pm b/Build/Rpm.pm index 1469eac..6955df9 100644 --- a/Build/Rpm.pm +++ b/Build/Rpm.pm @@ -1189,14 +1189,18 @@ sub getnevr_rich { my ($d) = @_; my $n = ''; my $bl = 0; - while ($d =~ /^([^ ,\)]+)/) { + while ($d =~ /^([^ ,\(\)]+)/) { $n .= $1; - $d = substr($d, length($n)); + $d = substr($d, length($1)); if ($d =~ /^\(/) { $n .= '('; $bl++; $d = substr($d, 1); - } elsif ($d =~ /\)/) { + } elsif ($d =~ /^\)/) { + if ($bl > 0) { + $n .= ')'; + $d = substr($d, 1); + } last if $bl-- <= 0; } } -- 2.14.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor