Mageia Bugzilla – Attachment 5945 Details for
Bug 15353
drakrpm-update crashed because of wrong syntax in skip list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch to avoid the crash that print a warning message
regexp_problem.patch (text/plain), 748 bytes, created by
Angelo Naselli
on 2015-02-25 11:08:33 CET
(
hide
)
Description:
patch to avoid the crash that print a warning message
Filename:
MIME Type:
Creator:
Angelo Naselli
Created:
2015-02-25 11:08:33 CET
Size:
748 bytes
patch
obsolete
>diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm >index 2f580ae..1b56287 100644 >--- a/URPM/Resolve.pm >+++ b/URPM/Resolve.pm >@@ -1945,14 +1945,17 @@ sub compute_flags { > > #- now search packages which fullname match given regexps > if (@regex) { >- my $large_re_s = join("|", map { "(?:$_)" } @regex); >- my $re = qr/$large_re_s/; >+ eval { >+ my $large_re_s = join("|", map { "(?:$_)" } @regex); >+ my $re = qr/$large_re_s/; > >- foreach my $pkg (@{$urpm->{depslist}}) { >- if ($pkg->fullname =~ $re) { >- compute_flag($urpm, $pkg, %options); >- } >- } >+ foreach my $pkg (@{$urpm->{depslist}}) { >+ if ($pkg->fullname =~ $re) { >+ compute_flag($urpm, $pkg, %options); >+ } >+ } >+ }; >+ warn "reg ex problem: " . $@ if $@; > } > } >
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 2f580ae..1b56287 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1945,14 +1945,17 @@ sub compute_flags { #- now search packages which fullname match given regexps if (@regex) { - my $large_re_s = join("|", map { "(?:$_)" } @regex); - my $re = qr/$large_re_s/; + eval { + my $large_re_s = join("|", map { "(?:$_)" } @regex); + my $re = qr/$large_re_s/; - foreach my $pkg (@{$urpm->{depslist}}) { - if ($pkg->fullname =~ $re) { - compute_flag($urpm, $pkg, %options); - } - } + foreach my $pkg (@{$urpm->{depslist}}) { + if ($pkg->fullname =~ $re) { + compute_flag($urpm, $pkg, %options); + } + } + }; + warn "reg ex problem: " . $@ if $@; } }
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15353
: 5945