$$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)
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 {
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 :(" );
}
}
}
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 :(" );
}
}