diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | php.req | 9 |
2 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,5 @@ +- do not emit PHP requires for package's own files + Version 2.4 - 24 September 2014, by Thierry Vignaud - emit pythonegg requires/provides back @@ -75,6 +75,15 @@ 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); +} + f: for $f (keys %req) { for $g (@files) { next f if ($g =~ /\Q$f\E$/); } print "pear($f)\n"; |