On Wed, Sep 23, 2009 at 11:45 AM, Xavier <shiningxc@gmail.com> wrote:
On Wed, Sep 23, 2009 at 10:40 AM, Thomas Bächler <thomas@archlinux.org> wrote:
Xavier schrieb:
Before, repo-rm on the last package would leave the last package in the database, which was quite odd. Having an empty file would be odd too, because tar/bsdtar would fail on it.
$ touch foo.db.tar.gz $ bsdtar -xf foo.db.tar.gz $ echo $? 0 $
I tried quite a while ago, I just remembered that at least one of the two failed :) It seems gnu tar still fails. And bsdtar could always have changed in the meantime, I don't know.
Anyway this seems to work for all combination (4) of gnutar/bsdtar, so it is still my preferred solution : tar cvzf test.tar.gz -T /dev/null tar xf test.tar.gz
I forgot to say that pacman would also likely fail on an empty file, because it also extracts the downloaded database using libarchive. Anyway, Dan already made a patch using the above line to produce an empty tar file :)