[pacman-dev] Empty repo databases

Xavier shiningxc at gmail.com
Thu Sep 24 10:15:16 EDT 2009


On Wed, Sep 23, 2009 at 11:45 AM, Xavier <shiningxc at gmail.com> wrote:
> On Wed, Sep 23, 2009 at 10:40 AM, Thomas Bächler <thomas at 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 :)


More information about the pacman-dev mailing list