local *F;
open F,$filename or confess "Open \"$filename\": $!";
my $r=<F>;
- close F or cluck "Close \"$filename\": $!";
+ close F or confess "Close \"$filename\": $!"; # Do not &cluck as it may be pipe result
return $r;
}
my($filename,@content)=@_;
local *F;
- open F,">".$filename or confess "rewrite \"$filename\": $!";
+ open F,($filename=~/^[|]/ ? "" : ">").$filename or confess "rewrite \"$filename\": $!";
print F @content;
- close F or cluck "close \"$filename\": $!";
+ close F or confess "close \"$filename\": $!"; # Do not &cluck as it may be pipe result
}
my %_rpmeval_cache;
File::Touch->new("atime_only"=>1)->touch("ChangeLog") if !$Options{"ChangeLog"};
_system qw(automake --add-missing),@copy_arg;
_system qw(autoconf);
+ _writefile "| patch configure",<<'CONFIGURE_SUBST_X_EOF';
+--- configure-orig Wed Aug 20 12:10:37 2003
++++ configure Wed Aug 20 13:22:51 2003
+@@ -21590,6 +21590,11 @@
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
++ for f in $ac_file_inputs; do
++ if test -x $f; then
++ chmod +x $ac_file
++ fi
++ done
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+CONFIGURE_SUBST_X_EOF
# Why it is left there after RedHat autoconf-2.53-8 ?
_remove "nocheck",\1,"autom4te-*.cache";