diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-11 14:00:36 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-10-11 14:00:36 +0000 |
commit | 1b88a427f63a9129b245749c4ea5759aa8e619d7 (patch) | |
tree | 43dd2ebb239b5cbd6c6de91e4bb889bfb5f8d93c | |
parent | c7b339174370bea59935912adc67907283a6ddd5 (diff) | |
download | urpmi-1b88a427f63a9129b245749c4ea5759aa8e619d7.tar urpmi-1b88a427f63a9129b245749c4ea5759aa8e619d7.tar.gz urpmi-1b88a427f63a9129b245749c4ea5759aa8e619d7.tar.bz2 urpmi-1b88a427f63a9129b245749c4ea5759aa8e619d7.tar.xz urpmi-1b88a427f63a9129b245749c4ea5759aa8e619d7.zip |
strict_match option on a media name means the whole media name, not only a whole word
-rw-r--r-- | urpm.pm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -849,8 +849,8 @@ sub select_media { unless ($media{$_}) { my $q = quotemeta; my (@found, @foundi); - my $regex = $options->{strict_match} ? qr/\b$q\b/ : qr/$q/; - my $regexi = $options->{strict_match} ? qr/\b$q\b/i : qr/$q/i; + my $regex = $options->{strict_match} ? qr/^$q$/ : qr/$q/; + my $regexi = $options->{strict_match} ? qr/^$q$/i : qr/$q/i; foreach my $medium (@{$urpm->{media}}) { $medium->{name} =~ $regex and push @found, $medium; $medium->{name} =~ $regexi and push @foundi, $medium; |