|
ginnOS
The reference: libc, the libraries and the kernel
|
librat: the package index of the repository (index.conf). More...
Macros | |
| #define | INDEX_PACKAGES_MAX 65536 |
| the most packages in an index | |
| #define | PACKAGE_SIZE_MAX (UINT64_C(1) << 40) |
| the largest package file that an index can give | |
Functions | |
| int | rat_index_parse (const char *text, const char *arch, rat_index_t *index, rat_error_t *err) |
| read the text of index.conf and check every field. | |
| void | rat_remote_clear (rat_remote_t *remote) |
| release the strings of one package of an index | |
| void | rat_index_free (rat_index_t *index) |
| release the memory of an index (not the struct itself). | |
| const rat_remote_t * | rat_index_find (const rat_index_t *index, const char *name) |
| a package of the index by name. | |
| bool | rat_remote_matches (const rat_remote_t *remote, const char *word) |
| true if word is in the name or the description of the package, without a difference between capitals and small letters. | |
| int | rat_index_similar (const rat_index_t *index, const char *name, const char **names_out, int max) |
| the names in the index that are near a name that it does not have, for a "did you mean" message: one or two letters different, or a name that contains it. | |
librat: the package index of the repository (index.conf).
the index is a libconf file. the keys before the first section are about the whole index; each section is one package, with the fields of .RATINFO and the file, its size and its SHA-256:
generated = 2026-12-02 sequence = 7 arch = i686 [lua] name = lua version = 5.4.9 release = 1 arch = i686 file = lua-5.4.9-1-i686.rat size = 119010 sha256 = 3c9e... installed_size = 223507 description = The Lua programming language interpreter licence = MIT
the parser checks every field, because the index decides which file rat downloads and which SHA-256 it must have.
| #define INDEX_PACKAGES_MAX 65536 |
the most packages in an index
| #define PACKAGE_SIZE_MAX (UINT64_C(1) << 40) |
the largest package file that an index can give
| int rat_index_parse | ( | const char * | text, |
| const char * | arch, | ||
| rat_index_t * | index, | ||
| rat_error_t * | err ) |
read the text of index.conf and check every field.
the signature must be checked before.
| arch | the architecture that the index must be for. |
| void rat_remote_clear | ( | rat_remote_t * | remote | ) |
release the strings of one package of an index
| void rat_index_free | ( | rat_index_t * | index | ) |
release the memory of an index (not the struct itself).
| const rat_remote_t * rat_index_find | ( | const rat_index_t * | index, |
| const char * | name ) |
a package of the index by name.
| bool rat_remote_matches | ( | const rat_remote_t * | remote, |
| const char * | word ) |
true if word is in the name or the description of the package, without a difference between capitals and small letters.
| int rat_index_similar | ( | const rat_index_t * | index, |
| const char * | name, | ||
| const char ** | names_out, | ||
| int | max ) |
the names in the index that are near a name that it does not have, for a "did you mean" message: one or two letters different, or a name that contains it.
| names_out | gets pointers into the index. |