I hate it when I download a source archive, uncompress it, and find that instead of creating a package directory, with the contents of the archive, the archive was created with a bunch of files at the root directory. Suppose I have a downloads directory with lots of archives. After I uncompress this new archive, I now have a bunch of archive files and a bunch of project specific files all in the same directory. Yuck.
> cd downloads
> tar -xzf latestdownload.tar.gz
> # yuck, stupid package contents in my downloads directory.
Yeah, Yeah, I know I could have listed the package contents (tar -tzf ..) and found that I needed to create a directory first but I’m lazy. So the mess is there. Now to clean it up:
> tar -tzf latestdownload.tar.gz | xargs rm -rf
There. Files gone. You can do the same thing with unzip -t for zip archives.
I’m in the process of re-installing a pretty old machine with the latest Gentoo. I’ve got a shared NFS directory with portage and all my machines are using a packages directory. After one machine builds something, another machine can simply install the built package.
Here is a portion of the make.conf on each machine.
Well, this particular machine was installed with Glibc 2.3.x. I typed the following to do the upgrade:
emerge -auDvk system
About 1/3 of the way through the upgrade, tar suddenly stopped working:
tar: /lib/libc.so.6: version `GLIBC_2.4' not found (required by tar)
I realized that tar had been upgraded but the glibc was not yet upgraded. To fix the problem, I created a new version of tar on a different system:
USE="static" emerge -av tar # on another machine
scp :/bin/tar /bin/ # from the broken machine.
Off I go, things are working.