aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@gmail.com>2019-03-03 13:59:31 +0100
committerGuillaume Rousse <guillomovitch@gmail.com>2019-03-03 14:21:19 +0100
commitbdba69516fe1a5a75daea9ec461eec79d62591a2 (patch)
tree99038a94fdcfb86d2e59a4e49f00067e7ab345a7
parent6ac8e62d56657bd5cec35f3bcd88212190288061 (diff)
downloadrpm-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-xphp.req9
1 files changed, 1 insertions, 8 deletions
diff --git a/php.req b/php.req
index 5f2f79d..2f67093 100755
--- a/php.req
+++ b/php.req
@@ -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$/); }