libkypackage(3)

libkypackage3

获取包列表信息

Usage

#include <libkypackages.h>

extern kdk_package_list* kdk_package_get_packagelist();

extern void kdk_package_free_packagelist(kdk_package_list *list);

extern char* kdk_package_get_version(const char *name);

extern int kdk_package_is_installed(const char *name, const char *version);

Link with -lkypackage.

Detailed Description

This library contains package list information.

Data structures

Structure kdk_package_list contains information related to a package list:

typedef struct {

unsigned int nums;
kdk_package_t **list;
} kdk_package_list;

There are other members not documented here, which are only meant for libkypackage internal use.

Structure kdk_package_t contains information related to a package specific information:

typedef struct _kdk_package_t {

char *name; // 包名
char *version; // 版本号
char *section; // 包类型
char *status; // 状态
unsigned long size_kb; // 包大小
struct _kdk_package_t **depends; // 依赖包
} kdk_package_t;

There are other members not documented here, which are only meant for libkypackage internal use.

Return value

The return value is generally specific to the individual function called.

Conforming to

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_package_get_packagelist(), kdk_package_free_packagelist(), kdk_package_get_version() and kdk_package_is_installed().

From libkysdk-system 3.0.1.4-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.