The following commit has been merged in the master branch: commit fbabf0288a7d185712310b6748e93ed8beb9e71f Author: Peter Palfrader <pe...@palfrader.org> Date: Sat Feb 7 22:15:55 2009 +0000
Do not fork out for touch(1) anymore Signed-off-by: Frank Lichtenheld <fr...@lichtenheld.de> diff --git a/bin/extract_files b/bin/extract_files index 3bfc559..b5753b2 100755 --- a/bin/extract_files +++ b/bin/extract_files @@ -130,6 +130,13 @@ sub add_log { $$log .= localtime().": @_\n"; } +sub touch { + my $filename = shift; + sysopen(H, $filename, O_WRONLY|O_NONBLOCK|O_CREAT) or return undef; + close(H); + return 1; +} + ################################################## # PACKAGE HANDLING (UNPACKING/CLEANUP) @@ -228,7 +235,7 @@ sub to_update { if ($config_data->{structure} == PKGPOOL) { my $dir = "$target/".pkg_pool_directory( $pkg_data ); if (!$force && -d $dir && -f "$dir/log") { - (system( "touch", "$dir/log" ) == 0) + touch("$dir/log") or do_warning( "touch of $dir/log failed" ); return 0; } else { @@ -302,7 +309,7 @@ sub extract_copyright_to_pkgpool { or add_log( $log, "symlink generation failed" ); } else { add_log( $log, "give up on $bin_pkg" ); - (system( "touch", "$tgt.ERROR" ) == 0) + touch("$tgt.ERROR") or add_log( $log, "even the touch of $tgt.ERROR failed :(" ); } } @@ -327,7 +334,7 @@ sub extract_copyright_to_pkgpool { } unless (-e $src_tgt) { add_log( $log, "give up" ); - (system( "touch", "$src_tgt.ERROR" ) == 0) or + touch("$src_tgt.ERROR") or add_log( $log, "even the touch of $src_tgt.ERROR failed :(" ); } } -- APT Archive Web-Frontend (Alioth repository) -- To UNSUBSCRIBE, email to debian-www-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org