--- /tmp/zshwDZ3vR 2010-04-30 16:37:46.000000000 +0400 +++ /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb 2010-04-30 16:33:16.000000000 +0400 @@ -492,7 +492,11 @@ # xsystem def __system(x, *args) - system(*args) and return true + print "---> [!] Calling system(", shelljoin(*args), "), will throw: ", x, "\n" + ret = system(*args) + print "---> [!] system() returned ", ret, ", actual exit code is ", $? >> 8, "\n" + + ret and return true if x raise CommandFailedError, format('Command failed [exit code %d]: %s', $? >> 8, shelljoin(*args))