[pacman-dev] [PATCH] Add support for the xz archive format

Xavier shiningxc at gmail.com
Wed May 13 04:00:55 EDT 2009


On Wed, May 13, 2009 at 8:23 AM, Pierre Schmitz <pierre at archlinux.de> wrote:
> Am Mittwoch, 13. Mai 2009 08:21:11 schrieb Pierre Schmitz:
>> This simple patch adds support for the xz archive format to makepkg and
>> repo- add.
>> Xz can be used as source, package and package db file type.
>
> I did not test this patch at all, but it should work. You'll need xz-utils and
> recompile libarchive.
>
> I did not check acman itself, but it should support it out-of-the-box, right?
>
> Next step will be adding support for xz in our devtools.
>

We may have a problem with the xdelta code, but maybe not.

For being useful, xdelta needs to decompress package first before
computing a diff, so it needs to support and recognize the compression
used for packages.
http://code.google.com/p/xdelta/wiki/ExternalCompression
It supports gzip and bzip2 but apparently not xz.

When applying a xdelta diff, we had a second problem that xdelta
didn't apply the same gzip timestamp, so we handle the recompression
of a package generated by xdelta manually.
http://projects.archlinux.org/?p=pacman.git;a=blob;f=lib/libalpm/sync.c;h=1dbd93d56713538dc9973aad24d52ddb48d41f49;hb=HEAD#l664

However, since xdelta probably does not recognize xz, probably the -R
argument for disabling external recompression has no effect, and in
this case, the current pacman code should be fine.

To sum up the problems I expect :
* xdelta will be inefficient with xz packages since it does not recognize it
* when it recognizes it, the sync.c code will need to be updated.


More information about the pacman-dev mailing list