|
|
|
|
@ -219,6 +219,27 @@ char *yon_packages_get_description(enum YON_PACKAGES_DB_TYPE type, const char *p
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
config_str yon_packages_get_depends(enum YON_PACKAGES_DB_TYPE type, const char *package, int *size){
|
|
|
|
|
(*size)=0;
|
|
|
|
|
if (yon_char_is_empty(package)) return NULL;
|
|
|
|
|
config_str depends = NULL;
|
|
|
|
|
|
|
|
|
|
alpm_list_t *databases = _yon_packages_get_db_list(type);
|
|
|
|
|
alpm_list_t *iter = NULL, *pkg_iter = NULL;
|
|
|
|
|
for (iter = databases; iter; iter=iter->next){
|
|
|
|
|
alpm_pkg_t *pkg = alpm_db_get_pkg(iter->data,package);
|
|
|
|
|
if (!pkg) continue;
|
|
|
|
|
alpm_list_t *list = alpm_pkg_compute_requiredby(pkg);
|
|
|
|
|
for (pkg_iter = list; pkg_iter; pkg_iter=pkg_iter->next){
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(depends,size,pkg_iter->data);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return depends;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_packages_update(){
|
|
|
|
|
if (packages_struct.packages_handle) alpm_release(packages_struct.packages_handle);
|
|
|
|
|
_yon_packages_get_db();
|
|
|
|
|
|