Bug 825701 - find2perl does not translate ? glob properly
Summary: find2perl does not translate ? glob properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org/rt3/Public/Bug/Di...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-28 09:01 UTC by Petr Pisar
Modified: 2012-06-30 08:33 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 825713 (view as bug list)
Environment:
Last Closed: 2012-06-17 22:27:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2012-05-28 09:01:57 UTC
$ find2perl -name 'a?b'
[...]
# Traverse desired filesystems
File::Find::find({wanted => \&wanted}, '.');
exit;
sub wanted {
    /^a.?b\z/s
    && print("$name\n");
}

The regular expression is wrong. Correct one is /^a.b\z/s.

Reported to upstream as <https://rt.perl.org/rt3/Public/Bug/Display.html?id=113054>. Patch is available there:

--- find2perl.orig 2012-03-06 19:36:39.000000000 +0000
+++ find2perl 2012-05-23 12:21:04.976166972 +0100
@@ -648,7 +648,8 @@
sub fileglob_to_re ($) {
my $x = shift;
$x =~ s#([./^\$()+])#\\$1#g;
- $x =~ s#([?*])#.$1#g;
+ $x =~ s#\*#.*#g;
+ $x =~ s#\?#.#g;
"^$x\\z";
}

All Fedoras are affected.

Comment 1 Fedora Update System 2012-05-30 15:51:43 UTC
perl-5.14.2-212.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/perl-5.14.2-212.fc17

Comment 2 Fedora Update System 2012-05-31 06:17:16 UTC
perl-5.14.2-198.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/perl-5.14.2-198.fc16

Comment 3 Fedora Update System 2012-06-01 17:13:25 UTC
Package perl-5.14.2-212.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-5.14.2-212.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-8739/perl-5.14.2-212.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-06-17 22:27:49 UTC
perl-5.14.2-212.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2012-06-30 08:33:54 UTC
perl-5.14.2-198.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.