aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2016-10-16 12:43:49 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-10-16 13:57:04 +0200
commita31506d8123747d15346f7808e8c14bce91bcd9b (patch)
tree39fba96b1928da33cd594654fb94edce89f32098
parentb72750d25a5d7da84979abc0547dd31118651acc (diff)
downloadperl-URPM-a31506d8123747d15346f7808e8c14bce91bcd9b.tar
perl-URPM-a31506d8123747d15346f7808e8c14bce91bcd9b.tar.gz
perl-URPM-a31506d8123747d15346f7808e8c14bce91bcd9b.tar.bz2
perl-URPM-a31506d8123747d15346f7808e8c14bce91bcd9b.tar.xz
perl-URPM-a31506d8123747d15346f7808e8c14bce91bcd9b.zip
mga#15353 don't crash if re is wrong
-rw-r--r--NEWS2
-rw-r--r--URPM/Resolve.pm17
2 files changed, 12 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 96317f3..d076bfe 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- don't crash if /etc/urpmi/skip.list RE is wrong (mga#15353)
+
Version 5.06.1 - 14 October 2016
- fix reporting size on big packages (mga#19571)
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 641e006..38781cc 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);
+ }
+ }
+ };
+ $urpm->{debug_URPM}("reg ex problem: " . $@) if $@;
}
}