libalpm
Arch Linux Package Manager Library
|
Go to the source code of this file.
Defines | |
#define | MAX_DELTA_RATIO 0.7 |
Functions | |
alpm_delta_t * | _alpm_delta_parse (alpm_handle_t *handle, const char *line) |
Parses the string representation of a alpm_delta_t object. | |
void | _alpm_delta_free (alpm_delta_t *delta) |
alpm_delta_t * | _alpm_delta_dup (const alpm_delta_t *delta) |
off_t | _alpm_shortest_delta_path (alpm_handle_t *handle, alpm_list_t *deltas, const char *to, alpm_list_t **path) |
Calculates the shortest path from one version to another. |
#define MAX_DELTA_RATIO 0.7 |
Definition at line 34 of file delta.h.
Referenced by alpm_pkg_unused_deltas().
alpm_delta_t* _alpm_delta_dup | ( | const alpm_delta_t * | delta | ) |
Definition at line 337 of file delta.c.
References CALLOC, _alpm_delta_t::delta, _alpm_delta_t::delta_md5, _alpm_delta_t::delta_size, _alpm_delta_t::download_size, _alpm_delta_t::from, STRDUP, and _alpm_delta_t::to.
Referenced by _alpm_pkg_dup().
void _alpm_delta_free | ( | alpm_delta_t * | delta | ) |
Definition at line 328 of file delta.c.
References _alpm_delta_t::delta, _alpm_delta_t::delta_md5, FREE, _alpm_delta_t::from, and _alpm_delta_t::to.
Referenced by _alpm_pkg_free().
alpm_delta_t* _alpm_delta_parse | ( | alpm_handle_t * | handle, |
const char * | line | ||
) |
Parses the string representation of a alpm_delta_t object.
This function assumes that the string is in the correct format. This format is as follows: $deltafile $deltamd5 $deltasize $oldfile $newfile
handle | the context handle |
line | the string to parse |
Definition at line 280 of file delta.c.
References _alpm_strtoofft(), CALLOC, _alpm_delta_t::delta, _alpm_delta_t::delta_md5, __alpm_handle_t::delta_regex, __alpm_handle_t::delta_regex_compiled, _alpm_delta_t::delta_size, _alpm_delta_t::from, STRNDUP, and _alpm_delta_t::to.
off_t _alpm_shortest_delta_path | ( | alpm_handle_t * | handle, |
alpm_list_t * | deltas, | ||
const char * | to, | ||
alpm_list_t ** | path | ||
) |
Calculates the shortest path from one version to another.
The shortest path is defined as the path with the smallest combined size, not the length of the path.
handle | the context handle |
deltas | the list of alpm_delta_t * objects that a file has |
to | the file to start the search at |
path | the pointer to a list location where alpm_delta_t * objects that have the smallest size are placed. NULL is set if there is no path possible with the files available. |
Definition at line 203 of file delta.c.
References _alpm_graph_free(), _alpm_log(), alpm_list_free(), alpm_list_free_inner(), and ALPM_LOG_DEBUG.