RPM-related structures and utilities.
More...
#include <stdbool.h>
#include <inttypes.h>
#include <json.h>
Go to the source code of this file.
|
enum | sr_package_role { SR_ROLE_UNKNOWN = 0,
SR_ROLE_AFFECTED
} |
|
|
struct sr_rpm_package * | sr_rpm_package_new (void) |
|
void | sr_rpm_package_init (struct sr_rpm_package *package) |
|
void | sr_rpm_package_free (struct sr_rpm_package *package, bool recursive) |
|
int | sr_rpm_package_cmp (struct sr_rpm_package *package1, struct sr_rpm_package *package2) |
|
int | sr_rpm_package_cmp_nvr (struct sr_rpm_package *package1, struct sr_rpm_package *package2) |
|
int | sr_rpm_package_cmp_nevra (struct sr_rpm_package *package1, struct sr_rpm_package *package2) |
|
struct sr_rpm_package * | sr_rpm_package_append (struct sr_rpm_package *dest, struct sr_rpm_package *item) |
|
int | sr_rpm_package_count (struct sr_rpm_package *packages) |
|
struct sr_rpm_package * | sr_rpm_package_sort (struct sr_rpm_package *packages) |
|
struct sr_rpm_package * | sr_rpm_package_uniq (struct sr_rpm_package *packages) |
|
struct sr_rpm_package * | sr_rpm_package_get_by_name (const char *name, char **error_message) |
|
struct sr_rpm_package * | sr_rpm_package_get_by_path (const char *path, char **error_message) |
|
char * | sr_rpm_package_to_json (struct sr_rpm_package *package, bool recursive) |
|
int | sr_rpm_package_from_json (struct sr_rpm_package **rpm_package, json_object *list, bool recursive, char **error_message) |
|
bool | sr_rpm_package_parse_nvr (const char *text, char **name, char **version, char **release) |
|
bool | sr_rpm_package_parse_nevra (const char *text, char **name, uint32_t *epoch, char **version, char **release, char **architecture) |
|
struct sr_rpm_consistency * | sr_rpm_consistency_new (void) |
|
void | sr_rpm_consistency_init (struct sr_rpm_consistency *consistency) |
|
void | sr_rpm_consistency_free (struct sr_rpm_consistency *consistency, bool recursive) |
|
int | sr_rpm_consistency_cmp (struct sr_rpm_consistency *consistency1, struct sr_rpm_consistency *consistency2) |
|
int | sr_rpm_consistency_cmp_recursive (struct sr_rpm_consistency *consistency1, struct sr_rpm_consistency *consistency2) |
|
struct sr_rpm_consistency * | sr_rpm_consistency_append (struct sr_rpm_consistency *dest, struct sr_rpm_consistency *item) |
|
RPM-related structures and utilities.
Definition in file rpm.h.
Appends 'item' at the end of the list 'dest'.
- Returns
- This function returns the 'dest' consistency info. If 'dest' is NULL, it returns the 'item' consistency info.
Appends 'item' at the end of the list 'dest'.
- Returns
- This function returns the 'dest' package. If 'dest' is NULL, it returns the 'item' package.
Compares two packages.
- Parameters
-
package1 | It must be non-NULL pointer. It's not modified by calling this function. |
package2 | It must be non-NULL pointer. It's not modified by calling this function. |
- Returns
- Returns 0 if the packages are same. Returns negative number if package1 is found to be 'less' than package2. Returns positive number if package1 is found to be 'greater' than package2.
Compares two packages by their name, epoch, version, release and architecture.
- Parameters
-
package1 | It must be non-NULL pointer. It's not modified by calling this function. |
package2 | It must be non-NULL pointer. It's not modified by calling this function. |
- Returns
- Returns 0 if the packages are same. Returns negative number if package1 is found to be 'less' than package2. Returns positive number if package1 is found to be 'greater' than package2.
Compares two packages by their name, version and release.
- Parameters
-
package1 | It must be non-NULL pointer. It's not modified by calling this function. |
package2 | It must be non-NULL pointer. It's not modified by calling this function. |
- Returns
- Returns 0 if the packages are same. Returns negative number if package1 is found to be 'less' than package2. Returns positive number if package1 is found to be 'greater' than package2.
Returns the number of packages in the list.