Tue, 15 Jul 2008 22:18:03 -0400
Give extraction stderr more context, and suppress normal cpio stderr junk.
cpio will write a useless "N blocks" message to stderr without --quiet, so
use that.
When we show extraction's stderr to the user, first write a line explaining
what it is, and also don't forget to strip the trailing newline, since
.warning() writes its own.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><title>dtrx: Intelligent archive extraction</title> <link rel="stylesheet" href="common.css"> </head> <body> <h1>dtrx: Intelligent archive extraction</h1> <h2>Introduction</h2> <p><span class="pname">dtrx</span> stands for “Do The Right Extraction.” It's a tool for Unix-like systems that takes all the hassle out of extracting archives. Here's an example of how you use it:</p> <pre>$ dtrx linux-2.6.10.tar.bz2</pre> <p>That's basically the same thing as:</p> <pre>$ tar -jxf linux-2.6.10.tar.bz2</pre> <p>But there's more to it than that. You know those really annoying files that don't put everything in a dedicated directory, and have the permissions all wrong?</p> <pre>$ tar -zvxf random-tarball.tar.gz foo bar data/ data/text $ cd data/ cd: permission denied: data</pre> <p><span class="pname">dtrx</span> takes care of all those problems for you, too:</p> <pre>$ dtrx random-tarball.tar.gz $ cd random-tarball/data $ cat text This all works properly.</pre> <p><span class="pname">dtrx</span> is simple and powerful. Just use the same command for all your archive files, and they'll never frustrate you again.</p> <h2>Features</h2> <ul> <li><strong>Handles many archive types</strong>: You only need to remember one simple command to extract <span class="pname">tar</span>, <span class="pname">zip</span>, <span class="pname">cpio</span>, <span class="pname">deb</span>, <span class="pname">rpm</span>, <span class="pname">gem</span>, <span class="pname">7z</span>, <span class="pname">cab</span>, <span class="pname">gz</span>, <span class="pname">bz2</span>, <span class="pname">lzma</span>, and many kinds of <span class="pname">exe</span> files, including Microsoft Cabinet archives, InstallShield archives, and self-extracting <span class="pname">zip</span> files. If they have any extra compression, like <span class="pname">tar.bz2</span>, <span class="pname">dtrx</span> will take care of that for you, too.</li> <li><strong>Keeps everything organized</strong>: <span class="pname">dtrx</span> will make sure that archives are extracted into their own dedicated directories.</li> <li><strong>Sane permissions</strong>: <span class="pname">dtrx</span> makes sure you can read and write all the files you just extracted, while leaving the rest of the permissions intact.</li> <li><strong>Recursive extraction</strong>: <span class="pname">dtrx</span> can find archives inside the archive and extract those too.</li> </ul> <h2>Download</h2> <p><a href="dtrx-6.1.tar.gz">Download <span class="pname">dtrx</span> 6.1</a>. The SHA1 checksum for this file is <tt>2cd7c5e1ca2e83a942e5af58dceb0700063ce03d</tt>. New features in this release include:</p> <ul> <li>Add support for InstallShield archives, using the <span class="pname">unshield</span> command.</li> <li>The wording of many of the interactive prompts has been adjusted to be clearer and provide more information to the user immediately.</li> <li><span class="pname">dtrx</span> 6.1 does a better job protecting against race conditions when extracting a single file.</li> <li>If you used the -f option, and extracted an archive that only contained one file or directory, <span class="pname">dtrx</span> 6.0 would still prompt you to ask how it should be extracted. <span class="pname">dtrx</span> 6.1 fixes this, extracting the contents to the current directory as -f requires.</li> <li>Recursive extraction would not work well in <span class="pname">dtrx</span> 6.0 when the contents of the original archive were a single file. This has been fixed in <span class="pname">dtrx</span> 6.1.</li> </ul> <p>If you would like to try the latest development version—or maybe do some work on it yourself—you can check out the project's <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a> repository. A <a href="http://www.brettcsmith.org/2007/dtrx/dtrx/">web repository</a> is available, or you can just run:</p> <pre>$ hg clone http://www.brettcsmith.org/2007/dtrx/dtrx</pre> <h2>Requirements</h2> <p>If you have Python 2.4 or greater, this should work out of the box. If you're stuck on Python 2.3, you can use this if you install the <a href="http://www.lysator.liu.se/~astrand/popen5/">subprocess module</a>. You'll need the usual tools for the archive types you want to extract: for example, if you're extracting <span class="pname">zip</span> files, you'll need <span class="pname">zipinfo</span> and <span class="pname">unzip</span>. See the INSTALL file included with <span class="pname">dtrx</span> for a complete list of necessary utilities.</p> <h2>Installation</h2> <p>You can just put <span class="pname">scripts/dtrx</span> wherever is convenient for you, but if you want to install the program system-wide, you can also run the following command as root or equivalent:</p> <pre>python setup.py install</pre> <p>See the included <tt>INSTALL</tt> file for more information.</p> </body> </html>