---
name: "libkypackage"
section: "3"
platform: "linux"
package: "libkysdk-system"
version: "3.0.1.4-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/libkypackage"
---

# libkypackage(3)

获取包列表信息

## NAME

kdk\_package\_get\_packagelist, kdk\_package\_free\_packagelist, kdk\_package\_get\_version, kdk\_package\_is\_installed  - 获取包列表信息

## SYNOPSIS

```
#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**().

## SEE ALSO

[**kdk\_package\_get\_packagelist**(3)](/man/kdk_package_get_packagelist/3.md), [**kdk\_package\_free\_packagelist**(3)](/man/kdk_package_free_packagelist/3.md), [**kdk\_package\_get\_version**(3)](/man/kdk_package_get_version/3.md) and [**kdk\_package\_is\_installed**(3)](/man/kdk_package_is_installed/3.md).
