星期三 十二月 10, 2008

chash: the sha1 hash of the compressed file.

While if you manually compress the file with gzip -n -9, you would find the sha1 value is still different with the one in the manifest file. By looking into ips/pkg's source code, it turns out that the head used in ips/pkg is a little different with the one gzip(1) generated,

-0000000 1f 8b 08 00 00 00 00 00 02 ff
+0000000 1f 8b 08 00 00 00 00 00 02 03

The last byte is to indicate the OS type, '03' stands for 'Unix', 'ff' means 'Unknown', refer to RFC1952. After you change the OS type to 'ff' in your manually compressed file, you would see the sha hash values are just the same.

星期三 三月 12, 2008

As I knew that IPS supports tagging on files (should be an attribute of 'file' action'?), and from the document I can tell, that tag is a key-value pair, e.g., arch=i386. And Indiana team may prefer to bundle the localization contents, such as messages and online helps, to base package. E.g., the french messages and docs of openoffice would not be shipped as individual packages, but in openoffice@2.3.1 package, so that you may set a filter to install them.

While I'm curious, can I specify the package patterns in a filter? Such as

(arc=i386 | arc=generic) &
    (packages=openoffice & locale=fr & (doc=true | message=true) |
     packages=all-installed & locale=fr & (doc=true | message=true) |
     packages=lang-french-support,ttf-french-fonts,...)


With this filter, I could install the docs and messages for openoffice and all existing packages (may already include oo), as well as the specified packages 'lang-french-support' and 'ttf-french-fonts'.

Certainly, lang-french-support and ttf-french-fonts should also have the locale=fr tag, while I may not want install all the fr l10n contents for un-installed packages.

And I assume that the sections or groups in IPS-Gui are actually filters, would the filters be able to be installed or updated by IPS updating, or enduser could import a filter?

I sent the above questions to pkg-discuss, while no response yet :(

This blog copyright 2009 by yongsun