|
createrepo_c library 1.2.3
C library for metadata manipulation
|
Data Structures | |
| struct | cr_RepomdRecord |
| struct | cr_DistroTag |
| struct | cr_Repomd |
Module for generating repomd.xml.
Example:
| void cr_repomd_add_content_tag | ( | cr_Repomd * | repomd, |
| const char * | tag ) |
Add content tag.
| repomd | cr_Repomd object |
| tag | content tag |
| void cr_repomd_add_distro_tag | ( | cr_Repomd * | repomd, |
| const char * | cpeid, | ||
| const char * | tag ) |
Add distro tag.
| repomd | cr_Repomd object |
| cpeid | cpeid string (could be NULL) |
| tag | distro tag string |
| void cr_repomd_add_repo_tag | ( | cr_Repomd * | repomd, |
| const char * | tag ) |
Add repo tag.
| repomd | cr_Repomd object |
| tag | repo tag |
| void cr_repomd_detach_record | ( | cr_Repomd * | repomd, |
| cr_RepomdRecord * | rec ) |
| void cr_repomd_free | ( | cr_Repomd * | repomd | ) |
Frees cr_Repomd object and all its cr_RepomdRecord objects
| repomd | cr_Repomd object |
| cr_RepomdRecord * cr_repomd_get_record | ( | cr_Repomd * | repomd, |
| const char * | type ) |
Get repomd record from the repomd object.
| repomd | cr_Repomd object |
| type | Type of the record ("primary", "primary_db", ..) |
| cr_Repomd * cr_repomd_new | ( | ) |
Create new empty cr_Repomd object wich represents content of repomd.xml.
| int cr_repomd_record_compress_and_fill | ( | cr_RepomdRecord * | record, |
| cr_RepomdRecord * | compressed_record, | ||
| cr_ChecksumType | checksum_type, | ||
| cr_CompressionType | compression, | ||
| const char * | zck_dict_dir, | ||
| GError ** | err ) |
Almost analogous to cr_repomd_record_fill but suitable for groupfile. Record must be set with the path to existing non compressed groupfile. Compressed file will be created and compressed_record updated.
| record | cr_RepomdRecord initialized to an existing uncompressed file |
| compressed_record | empty cr_RepomdRecord object that will by filled |
| checksum_type | type of checksums |
| compression | type of compression |
| zck_dict_dir | Location of zchunk dictionaries (NULL if unused) |
| err | GError ** |
| cr_RepomdRecord * cr_repomd_record_copy | ( | const cr_RepomdRecord * | orig | ) |
Copy cr_RepomdRecord object.
| orig | cr_RepomdRecord object |
| int cr_repomd_record_fill | ( | cr_RepomdRecord * | record, |
| cr_ChecksumType | checksum_type, | ||
| GError ** | err ) |
Fill unfilled items in the cr_RepomdRecord (calculate checksums, get file size before/after compression, etc.). Note: If checksum_open, checksum_open_type and size_open are filed then their calculation will be skiped. This items could be filled directly on our own or use function for load them from a cr_ContentStat. If no open stats are supplied, then this function has to decompress the file for the open checksum calculation.
| record | cr_RepomdRecord object |
| checksum_type | type of checksum to use |
| err | GError ** |
| void cr_repomd_record_free | ( | cr_RepomdRecord * | record | ) |
Destroy cr_RepomdRecord object. NOTE: Do NOT use this function on objects attached to cr_Repomd (by cr_repomd_set_record).
| record | cr_RepomdRecord object |
| void cr_repomd_record_load_contentstat | ( | cr_RepomdRecord * | record, |
| cr_ContentStat * | stats ) |
Load the open stats (checksum_open, checksum_open_type and size_open) from the cr_ContentStat object.
| record | cr_RepomdRecord |
| stats | cr_ContentStat |
| void cr_repomd_record_load_zck_contentstat | ( | cr_RepomdRecord * | record, |
| cr_ContentStat * | stats ) |
Load the zchunk stats (zck_header_checksum, zck_header_checksum_type and zck_header_size) from the cr_ContentStat object.
| record | cr_RepomdRecord |
| stats | cr_ContentStat |
| cr_RepomdRecord * cr_repomd_record_new | ( | const char * | type, |
| const char * | path ) |
Creates (alloc) new cr_RepomdRecord object
| type | Type of record ("primary", "filelists", ..) |
| path | path to the compressed file |
| int cr_repomd_record_rename_file | ( | cr_RepomdRecord * | record, |
| GError ** | err ) |
Add a hash as prefix to the filename.
| record | cr_RepomdRecord of file to be renamed |
| err | GError ** |
| void cr_repomd_record_set_timestamp | ( | cr_RepomdRecord * | record, |
| gint64 | timestamp ) |
Set timestamp of the file. Needed to reproduce bit-by-bit identical metadata.
| record | cr_RepomdRecord of file to be renamed |
| timestamp | timestamp in number of seconds since 1970-01-01 |
| void cr_repomd_remove_record | ( | cr_Repomd * | repomd, |
| const char * | type ) |
Remove first record of the specified type
| repomd | cr_Repomd object |
| type | Type of the record ("primary", "primary_db", ..) |
| void cr_repomd_set_contenthash | ( | cr_Repomd * | repomd, |
| const char * | hash, | ||
| const char * | type ) |
Set a contenthash
| repomd | cr_Repomd object |
| hash | content hash |
| type | Type of hash function |
| void cr_repomd_set_record | ( | cr_Repomd * | repomd, |
| cr_RepomdRecord * | record ) |
Set cr_Repomd record into cr_Repomd object.
| repomd | cr_Repomd object |
| record | cr_RepomdRecord object |
| void cr_repomd_set_repoid | ( | cr_Repomd * | repomd, |
| const char * | repoid, | ||
| const char * | type ) |
Set a repoid - OBSOLETE, use cr_repomd_set_contenthash instead
| repomd | cr_Repomd object |
| repoid | RepoId |
| type | Type of hash function used to calculate repoid |
| void cr_repomd_set_revision | ( | cr_Repomd * | repomd, |
| const char * | revision ) |
Set custom revision string of repomd.
| repomd | cr_Repomd object |
| revision | revision string |