Fedora Core Customizer

This is a new project to write a new software to enhance and customize Fedora Core X systems.

Friday, August 05, 2005

Trying out with understanding .HDR format...

The first thing to simulate YUM is to understand the format in which it downloads the headers of any RPM package. As YUM clearly specifies that HDR are the headers of any RPM and it uses RPM API to access the information, we need to first learn to parse a .HDR file.

The most intuitive feeling which arises is, do the first bytes of RPM files match with HDR files? No, they don't. But it is not the case that there is no relation. If we ignore some of the bytes in both files, we find that the bytes are exactly same.

Doing a statistical analysis of a RPM and a HDR, (kernel-2.6.12-1.1398_FC4), I found that ignoring the first 440 bytes of the RPM, the HDR is exactly same with the corresponding bytes in the RPM. Thus, there is certainly a relation. It must certainly have been mentioned in the RPM API. I am still reading and trying.

Also, the YUM sourcecode is of help. Still trying to find a file which actually downloads the header from the server and parses it.

References:

http://www.rpm.org/
www.mialug.org/downloads/static/documentation/max-rpm.pdf
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=350432

0 Comments:

Post a Comment

<< Home