Di_system_packages

## Data Structures

struct | di_system_package
| Package - System. More...

## Functions

void | di_system_package_destroy (di_system_package *package)
di_packages * | di_system_packages_alloc (void)
di_packages_allocator * | di_system_packages_allocator_alloc (void)
bool | di_system_package_check_subarchitecture (di_package *package, const char *subarchitecture)
di_parser_info * | di_system_package_parser_info (void)
di_parser_info * | di_system_packages_parser_info (void)
di_parser_info * | di_system_packages_status_parser_info (void)
static di_package * | di_system_package_read_file (const char *file, di_packages *packages, di_packages_allocator *allocator)
static di_packages * | di_system_packages_read_file (const char *file, di_packages_allocator *allocator)
static di_packages * | di_system_packages_status_read_file (const char *file, di_packages_allocator *allocator)
static int | di_system_packages_write_file (di_packages *packages, const char *file)
static int | di_system_packages_status_write_file (di_packages *packages, const char *file)
di_slist * | di_system_packages_resolve_dependencies_array_permissive (di_packages *packages, di_package **array, di_packages_allocator *allocator)
void | di_system_packages_resolve_dependencies_mark_anna (di_packages *packages, const char *subarchitecture, const char *kernel)

## Variables

const di_parser_fieldinfo * | di_system_package_parser_fieldinfo []

## Detailed Description

## Function Documentation

## di_system_package_check_subarchitecture()

bool di_system_package_check_subarchitecture | ( | di_package * | package,
|  | const char * | subarchitecture )

{
char *begin, *end, *temp;
size_t len_subarchitecture = strlen (subarchitecture);
begin = ((di_system_package *) package)->subarchitecture;
if (!begin)
return true;
end = begin + strlen (begin);
while (begin < end)
{
begin += strspn (begin, " \t\n");
temp = begin;
temp += strcspn (temp, " \t\n");
if ((size_t) (temp - begin) == len_subarchitecture && strncmp (begin, subarchitecture, len_subarchitecture) == 0)
return true;
begin = temp;
}
return false;
}
di_system_package
Package - System.
Definition system/packages.h:39

## di_system_package_destroy()

void di_system_package_destroy | ( | di_system_package * | package | ) |

{
di_free (package->subarchitecture);
di_package_destroy (&package->p);
}
di_free
void di_free(void *mem)
Definition mem.c:60
di_system_package::subarchitecture
char * subarchitecture
Definition system/packages.h:42
di_system_package::p
di_package p
Definition system/packages.h:40

## di_system_package_parser_info()

di_parser_info * di_system_package_parser_info | ( | void |  | ) |

{
di_parser_info *info;
info = di_package_parser_info ();
di_parser_info_add (info, di_system_package_parser_fieldinfo);
return info;
}
di_package_parser_info
di_parser_info * di_package_parser_info(void)
Definition package_parser.c:233
di_parser_info
Parse info.
Definition parser.h:94

## di_system_package_read_file()

di_package * di_system_package_read_file | ( | const char * | file,
|  | di_packages * | packages,
|  | di_packages_allocator * | allocator )

inline static

Read a standard package control file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_package_special_read_file (file, packages, allocator, di_system_package_parser_info);
}
di_package_special_read_file
di_package * di_package_special_read_file(const char *file, di_packages *packages, di_packages_allocator *allocator, di_parser_info *(info)(void))

References di_package_special_read_file().

## di_system_packages_alloc()

di_packages * di_system_packages_alloc | ( | void |  | ) |

{
di_packages *ret;
ret = di_new0 (di_packages, 1);
ret->table = di_hash_table_new_full (di_rstring_hash, di_rstring_equal, NULL, internal_di_system_package_destroy_func);
return ret;
}
di_hash_table_new_full
di_hash_table * di_hash_table_new_full(di_hash_func hash_func, di_equal_func key_equal_func, di_destroy_notify key_destroy_func, di_destroy_notify value_destroy_func)
Definition hash.c:113
di_new0
#define di_new0(struct_type, n_structs)
Definition mem.h:79
di_packages
Packages file.
Definition packages.h:42
di_packages::table
di_hash_table * table
Definition packages.h:43

## di_system_packages_allocator_alloc()

di_packages_allocator * di_system_packages_allocator_alloc | ( | void |  | ) |

{
di_packages_allocator *ret;
ret = internal_di_packages_allocator_alloc ();
ret->package_mem_chunk = di_mem_chunk_new (sizeof (di_system_package), 16384);
return ret;
}
di_mem_chunk_new
di_mem_chunk * di_mem_chunk_new(di_ksize_t atom_size, di_ksize_t area_size)
Definition mem_chunk.c:87
internal_di_packages_allocator_alloc
di_packages_allocator * internal_di_packages_allocator_alloc(void)
Definition packages.c:62
di_packages_allocator
Packages file - Allocator.
Definition packages.h:53
di_packages_allocator::package_mem_chunk
di_mem_chunk * package_mem_chunk
Definition packages.h:54

## di_system_packages_parser_info()

di_parser_info * di_system_packages_parser_info | ( | void |  | ) |

{
di_parser_info *info;
info = di_packages_parser_info ();
di_parser_info_add (info, di_system_package_parser_fieldinfo);
return info;
}
di_packages_parser_info
di_parser_info * di_packages_parser_info(void)
Definition packages_parser.c:123

## di_system_packages_read_file()

di_packages * di_system_packages_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator )

inline static

Read a standard Packages file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_packages_special_read_file (file, allocator, di_system_packages_parser_info);
}
di_packages_special_read_file
di_packages * di_packages_special_read_file(const char *file, di_packages_allocator *allocator, di_parser_info *(info)(void))

References di_packages_special_read_file().

## di_system_packages_resolve_dependencies_array_permissive()

di_slist * di_system_packages_resolve_dependencies_array_permissive | ( | di_packages * | packages,
|  | di_package ** | array,
|  | di_packages_allocator * | allocator )

{
struct di_packages_resolve_dependencies_do_real_list_append_data data =
{
{ NULL, NULL },
allocator,
};
struct di_packages_resolve_dependencies_check s =
{
di_packages_resolve_dependencies_check_real,
di_packages_resolve_dependencies_check_virtual,
di_packages_resolve_dependencies_check_non_existant_permissive,
di_packages_resolve_dependencies_do_real_list_append,
0,
NULL,
&data,
};
return di_packages_resolve_dependencies_array_special (packages, array, &s, allocator);
}
di_packages_resolve_dependencies_check
Definition packages_internal.h:41
di_packages_resolve_dependencies_do_real_list_append_data
Definition packages_internal.h:72

## di_system_packages_resolve_dependencies_mark_anna()

void di_system_packages_resolve_dependencies_mark_anna | ( | di_packages * | packages,
|  | const char * | subarchitecture,
|  | const char * | kernel )

{
struct check sc =
{
subarchitecture,
kernel,
};
struct di_packages_resolve_dependencies_check s =
{
check_real_anna,
check_virtual_anna,
di_packages_resolve_dependencies_check_non_existant_permissive,
di_packages_resolve_dependencies_do_real_mark,
0,
&sc,
NULL,
};
return di_packages_resolve_dependencies_mark_special (packages, &s);
}
check
Definition system/packages.c:173

## di_system_packages_status_parser_info()

di_parser_info * di_system_packages_status_parser_info | ( | void |  | ) |

{
di_parser_info *info;
info = di_packages_status_parser_info ();
di_parser_info_add (info, di_system_package_parser_fieldinfo);
return info;
}
di_packages_status_parser_info
di_parser_info * di_packages_status_parser_info(void)
Definition packages_parser.c:151

## di_system_packages_status_read_file()

di_packages * di_system_packages_status_read_file | ( | const char * | file,
|  | di_packages_allocator * | allocator )

inline static

Read a standard status file

Parameters

  file | file to read
  allocator | the allocator for the packages structure

{
return di_packages_special_read_file (file, allocator, di_system_packages_status_parser_info);
}

References di_packages_special_read_file().

## di_system_packages_status_write_file()

int di_system_packages_status_write_file | ( | di_packages * | packages,
|  | const char * | file )

inline static

Write a standard status file

Parameters

  packages | the packages structure
  file | file to read

{
return di_packages_special_write_file (packages, file, di_system_packages_status_parser_info);
}
di_packages_special_write_file
int di_packages_special_write_file(di_packages *packages, const char *file, di_parser_info *(info)(void))

References di_packages_special_write_file().

## di_system_packages_write_file()

int di_system_packages_write_file | ( | di_packages * | packages,
|  | const char * | file )

inline static

Write a standard Packages file

Parameters

  packages | the packages structure
  file | file to read

{
return di_packages_special_write_file (packages, file, di_system_packages_parser_info);
}

References di_packages_special_write_file().

## Variable Documentation

## di_system_package_parser_fieldinfo

const di_parser_fieldinfo* di_system_package_parser_fieldinfo[]

extern

{
&internal_di_system_package_parser_field_installer_menu_item,
&internal_di_system_package_parser_field_subarchitecture,
&internal_di_system_package_parser_field_kernel_version,
NULL
};