LiPkgInfo

LiPkgInfo — Control metadata for IPK packages

Functions

#define LI_TYPE_PKG_INFO
const gchar * li_package_kind_to_string ()
LiPackageKind li_package_kind_from_string ()
LiPkgInfo * li_pkg_info_new ()
void li_pkg_info_load_file ()
void li_pkg_info_load_data ()
gboolean li_pkg_info_save_to_file ()
gboolean li_pkg_info_save_changes ()
const gchar * li_pkg_info_get_version ()
void li_pkg_info_set_version ()
const gchar * li_pkg_info_get_name ()
void li_pkg_info_set_name ()
const gchar * li_pkg_info_get_appname ()
void li_pkg_info_set_appname ()
const gchar * li_pkg_info_get_runtime_dependency ()
void li_pkg_info_set_runtime_dependency ()
const gchar * li_pkg_info_get_dependencies ()
void li_pkg_info_set_dependencies ()
const gchar * li_pkg_info_get_sdk_dependencies ()
void li_pkg_info_set_sdk_dependencies ()
const gchar * li_pkg_info_get_build_dependencies ()
void li_pkg_info_set_build_dependencies ()
const gchar * li_pkg_info_get_id ()
void li_pkg_info_set_id ()
const gchar * li_pkg_info_get_checksum_sha256 ()
void li_pkg_info_set_checksum_sha256 ()
LiPackageKind li_pkg_info_get_kind ()
void li_pkg_info_set_kind ()
const gchar * li_pkg_info_get_component_kind ()
void li_pkg_info_set_component_kind ()
void li_pkg_info_set_flags ()
void li_pkg_info_add_flag ()
gboolean li_pkg_info_has_flag ()
LiPackageFlags li_pkg_info_get_flags ()
void li_pkg_info_set_version_relation ()
LiVersionFlags li_pkg_info_get_version_relation ()
const gchar * li_pkg_info_get_architecture ()
void li_pkg_info_set_architecture ()
gboolean li_pkg_info_matches_current_arch ()
const gchar * li_pkg_info_get_repo_location ()
void li_pkg_info_set_repo_location ()
gchar * li_pkg_info_get_name_relation_string ()
gboolean li_pkg_info_satisfies_requirement ()
const gchar * li_pkg_info_get_abi_break_versions ()
void li_pkg_info_set_abi_break_versions ()

Types and Values

Object Hierarchy

    GObject
    ╰── LiPkgInfo

Description

Functions

LI_TYPE_PKG_INFO

#define LI_TYPE_PKG_INFO (li_pkg_info_get_type ())


li_package_kind_to_string ()

const gchar *
li_package_kind_to_string (LiPackageKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the LiPackageKind.

 

Returns

string version of kind


li_package_kind_from_string ()

LiPackageKind
li_package_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

Parameters

kind_str

the string.

 

Returns

a LiPackageKind or LI_PACKAGE_KIND_UNKNOWN for unknown


li_pkg_info_new ()

LiPkgInfo *
li_pkg_info_new (void);

Creates a new LiPkgInfo.

Returns

a LiPkgInfo.

[transfer full]


li_pkg_info_load_file ()

void
li_pkg_info_load_file (LiPkgInfo *pki,
                       GFile *file,
                       GError **error);

li_pkg_info_load_data ()

void
li_pkg_info_load_data (LiPkgInfo *pki,
                       const gchar *data);

li_pkg_info_save_to_file ()

gboolean
li_pkg_info_save_to_file (LiPkgInfo *pki,
                          const gchar *filename);

li_pkg_info_save_changes ()

gboolean
li_pkg_info_save_changes (LiPkgInfo *pki);

Save changes to the control file of the installed package which matches the id of this LiPkgInfo. This does only override an existing file.


li_pkg_info_get_version ()

const gchar *
li_pkg_info_get_version (LiPkgInfo *pki);

Get the version for this package, if specified.


li_pkg_info_set_version ()

void
li_pkg_info_set_version (LiPkgInfo *pki,
                         const gchar *version);

Set the version of this package

Parameters

version

A version string

 

li_pkg_info_get_name ()

const gchar *
li_pkg_info_get_name (LiPkgInfo *pki);

li_pkg_info_set_name ()

void
li_pkg_info_set_name (LiPkgInfo *pki,
                      const gchar *name);

li_pkg_info_get_appname ()

const gchar *
li_pkg_info_get_appname (LiPkgInfo *pki);

Get a human-friendly full name of this software.


li_pkg_info_set_appname ()

void
li_pkg_info_set_appname (LiPkgInfo *pki,
                         const gchar *app_name);

li_pkg_info_get_runtime_dependency ()

const gchar *
li_pkg_info_get_runtime_dependency (LiPkgInfo *pki);

li_pkg_info_set_runtime_dependency ()

void
li_pkg_info_set_runtime_dependency (LiPkgInfo *pki,
                                    const gchar *uuid);

li_pkg_info_get_dependencies ()

const gchar *
li_pkg_info_get_dependencies (LiPkgInfo *pki);

li_pkg_info_set_dependencies ()

void
li_pkg_info_set_dependencies (LiPkgInfo *pki,
                              const gchar *deps_string);

li_pkg_info_get_sdk_dependencies ()

const gchar *
li_pkg_info_get_sdk_dependencies (LiPkgInfo *pki);

Dependencies used by the development version of this package. This is only useful for IPK source packages.


li_pkg_info_set_sdk_dependencies ()

void
li_pkg_info_set_sdk_dependencies (LiPkgInfo *pki,
                                  const gchar *deps_string);

Set dependencies used by the development version of this package. This is only useful for IPK source packages.


li_pkg_info_get_build_dependencies ()

const gchar *
li_pkg_info_get_build_dependencies (LiPkgInfo *pki);

Dependencies needed to build this package.

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_build_dependencies ()

void
li_pkg_info_set_build_dependencies (LiPkgInfo *pki,
                                    const gchar *deps_string);

Set dependencies needed to build this package.

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_get_id ()

const gchar *
li_pkg_info_get_id (LiPkgInfo *pki);

li_pkg_info_set_id ()

void
li_pkg_info_set_id (LiPkgInfo *pki,
                    const gchar *id);

li_pkg_info_get_checksum_sha256 ()

const gchar *
li_pkg_info_get_checksum_sha256 (LiPkgInfo *pki);

The SHA256 checksum of the package referenced by this package-info. This is usually used in package-indices.

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_checksum_sha256 ()

void
li_pkg_info_set_checksum_sha256 (LiPkgInfo *pki,
                                 const gchar *hash);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_get_kind ()

LiPackageKind
li_pkg_info_get_kind (LiPkgInfo *pki);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_kind ()

void
li_pkg_info_set_kind (LiPkgInfo *pki,
                      LiPackageKind kind);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_get_component_kind ()

const gchar *
li_pkg_info_get_component_kind (LiPkgInfo *pki);

The AppStream component kind of the software component this package contains. You can use as_component_kind_from_string() to convert it into its enum representation.

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_component_kind ()

void
li_pkg_info_set_component_kind (LiPkgInfo *pki,
                                const gchar *kind);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_flags ()

void
li_pkg_info_set_flags (LiPkgInfo *pki,
                       LiPackageFlags flags);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_add_flag ()

void
li_pkg_info_add_flag (LiPkgInfo *pki,
                      LiPackageFlags flag);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_has_flag ()

gboolean
li_pkg_info_has_flag (LiPkgInfo *pki,
                      LiPackageFlags flag);

Parameters

pki

An instance of LiPkgInfo

 

flag

LiPackageFlag to check for.

 

Returns

TRUE if the flag is assigned.


li_pkg_info_get_flags ()

LiPackageFlags
li_pkg_info_get_flags (LiPkgInfo *pki);

Parameters

pki

An instance of LiPkgInfo

 

li_pkg_info_set_version_relation ()

void
li_pkg_info_set_version_relation (LiPkgInfo *pki,
                                  LiVersionFlags vrel);

li_pkg_info_get_version_relation ()

LiVersionFlags
li_pkg_info_get_version_relation (LiPkgInfo *pki);

li_pkg_info_get_architecture ()

const gchar *
li_pkg_info_get_architecture (LiPkgInfo *pki);

Get the architecture this package was built for.


li_pkg_info_set_architecture ()

void
li_pkg_info_set_architecture (LiPkgInfo *pki,
                              const gchar *arch);

li_pkg_info_matches_current_arch ()

gboolean
li_pkg_info_matches_current_arch (LiPkgInfo *pki);

Returns

TRUE if package is suitable for the current system architecture


li_pkg_info_get_repo_location ()

const gchar *
li_pkg_info_get_repo_location (LiPkgInfo *pki);

Get the location of this package in the pool of a repository.


li_pkg_info_set_repo_location ()

void
li_pkg_info_set_repo_location (LiPkgInfo *pki,
                               const gchar *location);

li_pkg_info_get_name_relation_string ()

gchar *
li_pkg_info_get_name_relation_string (LiPkgInfo *pki);

Get the package name and relation as string, e.g. "foobar >= 2.1"

Returns

The name/relation string, free with g_free()


li_pkg_info_satisfies_requirement ()

gboolean
li_pkg_info_satisfies_requirement (LiPkgInfo *pki,
                                   LiPkgInfo *req);

Check if the current package pki matches the requirements defined by LiPkgInfo req .

Returns

TRUE if package satisfies requirements.


li_pkg_info_get_abi_break_versions ()

const gchar *
li_pkg_info_get_abi_break_versions (LiPkgInfo *pki);

li_pkg_info_set_abi_break_versions ()

void
li_pkg_info_set_abi_break_versions (LiPkgInfo *pki,
                                    const gchar *versions);

Types and Values

struct LiPkgInfoClass

struct LiPkgInfoClass {
	GObjectClass parent_class;
};


enum LiVersionFlags

Flags defining version requirements on other LiPkgInfo instances.

Members

LI_VERSION_UNKNOWN

The relation is unknown

 

LI_VERSION_EQUAL

Versions should be equal

 

LI_VERSION_LOWER

The other version must be lower

 

LI_VERSION_HIGHER

The other version must be higher

 

enum LiPackageFlags

Flags defining version requirements on other LiPkgInfo instances.

Members

LI_PACKAGE_FLAG_NONE

No package flag is set

 

LI_PACKAGE_FLAG_APPLICATION

This package needs a runtime

 

LI_PACKAGE_FLAG_AUTOMATIC

This package has been installed automatically

 

LI_PACKAGE_FLAG_FADED

Remove this package automatically, if it is no longer in use

 

LI_PACKAGE_FLAG_AVAILABLE

Package is available in a repository

 

LI_PACKAGE_FLAG_INSTALLED

Package is installed

 

enum LiPackageKind

Type of the Limba package

Members

LI_PACKAGE_KIND_UNKNOWN

Unknown package type

 

LI_PACKAGE_KIND_COMMON

Standard Limba package

 

LI_PACKAGE_KIND_DEVEL

Development package (SDK)

 

LiPkgInfo

typedef struct _LiPkgInfo LiPkgInfo;