diff options
author | Guillaume Rousse <guillomovitch@gmail.com> | 2019-03-03 13:59:31 +0100 |
---|---|---|
committer | Guillaume Rousse <guillomovitch@gmail.com> | 2019-03-03 14:21:19 +0100 |
commit | bdba69516fe1a5a75daea9ec461eec79d62591a2 (patch) | |
tree | 99038a94fdcfb86d2e59a4e49f00067e7ab345a7 | |
parent | 6ac8e62d56657bd5cec35f3bcd88212190288061 (diff) | |
download | rpm-setup-bdba69516fe1a5a75daea9ec461eec79d62591a2.tar rpm-setup-bdba69516fe1a5a75daea9ec461eec79d62591a2.tar.gz rpm-setup-bdba69516fe1a5a75daea9ec461eec79d62591a2.tar.bz2 rpm-setup-bdba69516fe1a5a75daea9ec461eec79d62591a2.tar.xz rpm-setup-bdba69516fe1a5a75daea9ec461eec79d62591a2.zip |
no need to cache php files list
Producing the list isn't expensive enough to justify caching the result,
especially if handled incorrectly
-rwxr-xr-x | php.req | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -75,14 +75,7 @@ foreach (@ARGV ? $ARGV : <> ) { } } -sub cat_ { my @l = map { my $F; open($F, '<', $_) ? <$F> : () } @_; wantarray() ? @l : join '', @l } - -my $cache = "$ENV{RPM_BUILD_ROOT}.php.req.file.cache"; -if (-f $cache) { - @files = cat_($cache); -} else { - qx(find $ENV{RPM_BUILD_ROOT} -name "*php"|grep -v /usr/share/doc |sed -e 's!$ENV{RPM_BUILD_ROOT}!!' > $cache); -} +@files = qx(find $ENV{RPM_BUILD_ROOT} -name "*php"|grep -v /usr/share/doc |sed -e 's!$ENV{RPM_BUILD_ROOT}!!'); f: for $f (keys %req) { for $g (@files) { next f if ($g =~ /\Q$f\E$/); } |