goal.h   goal.h 
#ifndef HY_GOAL_H #ifndef HY_GOAL_H
#define HY_GOAL_H #define HY_GOAL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* libsolv */ // hawkey
#include "solv/queue.h"
#include "solv/transaction.h"
/* hawkey */
#include "package.h"
#include "packagelist.h"
#include "sack.h"
#include "types.h" #include "types.h"
enum _hy_goal_op_flags { enum _hy_goal_op_flags {
HY_CHECK_INSTALLED = 1, HY_CHECK_INSTALLED = 1 << 0,
HY_CLEAN_DEPS = 1 << 1
}; };
enum _hy_goal_go_flags { enum _hy_goal_run_flags {
HY_ALLOW_UNINSTALL = 1 HY_ALLOW_UNINSTALL = 1
}; };
#define HY_REASON_DEP 1
#define HY_REASON_USER 2
HyGoal hy_goal_create(HySack sack); HyGoal hy_goal_create(HySack sack);
void hy_goal_free(HyGoal goal); void hy_goal_free(HyGoal goal);
int hy_goal_distupgrade_all(HyGoal goal);
int hy_goal_downgrade_to(HyGoal goal, HyPackage new_pkg); int hy_goal_downgrade_to(HyGoal goal, HyPackage new_pkg);
int hy_goal_erase(HyGoal goal, HyPackage pkg); int hy_goal_erase(HyGoal goal, HyPackage pkg);
int hy_goal_erase_query(HyGoal goal, HyQuery query); int hy_goal_erase_flags(HyGoal goal, HyPackage pkg, int flags);
/**
* Erase packages specified by the Selector.
*
* @returns 0 on success, HY_E_SELECTOR for an invalid Selector.
*/
int hy_goal_erase_selector(HyGoal goal, HySelector sltr);
int hy_goal_erase_selector_flags(HyGoal goal, HySelector sltr, int flags);
int hy_goal_install(HyGoal goal, HyPackage new_pkg); int hy_goal_install(HyGoal goal, HyPackage new_pkg);
int hy_goal_install_query(HyGoal goal, HyQuery query); int hy_goal_install_selector(HyGoal goal, HySelector sltr);
int hy_goal_upgrade_all(HyGoal goal); int hy_goal_upgrade_all(HyGoal goal);
int hy_goal_upgrade_to(HyGoal goal, HyPackage new_pkg); int hy_goal_upgrade_to(HyGoal goal, HyPackage new_pkg);
int hy_goal_upgrade_to_flags(HyGoal goal, HyPackage new_pkg, int flags); int hy_goal_upgrade_to_flags(HyGoal goal, HyPackage new_pkg, int flags);
int hy_goal_upgrade_query(HyGoal goal, HyQuery query); int hy_goal_upgrade_selector(HyGoal goal, HySelector sltr);
int hy_goal_go(HyGoal goal); int hy_goal_upgrade_to_selector(HyGoal goal, HySelector sltr);
int hy_goal_go_flags(HyGoal goal, int flags); int hy_goal_userinstalled(HyGoal goal, HyPackage pkg);
int hy_goal_run(HyGoal goal);
int hy_goal_run_flags(HyGoal goal, int flags);
int hy_goal_run_all(HyGoal goal, hy_solution_callback cb, void *cb_data);
int hy_goal_run_all_flags(HyGoal goal, hy_solution_callback cb, void *cb_da
ta,
int flags);
/* problems */ /* problems */
int hy_goal_count_problems(HyGoal goal); int hy_goal_count_problems(HyGoal goal);
char *hy_goal_describe_problem(HyGoal goal, unsigned i); char *hy_goal_describe_problem(HyGoal goal, unsigned i);
int hy_goal_log_decisions(HyGoal goal);
/* result processing */ /* result processing */
HyPackageList hy_goal_list_erasures(HyGoal goal); HyPackageList hy_goal_list_erasures(HyGoal goal);
HyPackageList hy_goal_list_installs(HyGoal goal); HyPackageList hy_goal_list_installs(HyGoal goal);
HyPackageList hy_goal_list_reinstalls(HyGoal goal);
HyPackageList hy_goal_list_upgrades(HyGoal goal); HyPackageList hy_goal_list_upgrades(HyGoal goal);
HyPackageList hy_goal_list_downgrades(HyGoal goal); HyPackageList hy_goal_list_downgrades(HyGoal goal);
HyPackage hy_goal_package_obsoletes(HyGoal goal, HyPackage pkg); HyPackage hy_goal_package_obsoletes(HyGoal goal, HyPackage pkg);
int hy_goal_get_reason(HyGoal goal, HyPackage pkg);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 11 change blocks. 
15 lines changed or deleted 30 lines changed or added


 package.h   package.h 
#ifndef HY_PACKAGE_H #ifndef HY_PACKAGE_H
#define HY_PACKAGE_H #define HY_PACKAGE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* libsolv */ // hawkey
#include "solv/pool.h"
#include "solv/solvable.h"
/* hawkey */
#include "types.h" #include "types.h"
#define HY_CHKSUM_MD5 REPOKEY_TYPE_MD5
#define HY_CHKSUM_SHA1 REPOKEY_TYPE_SHA1
#define HY_CHKSUM_SHA256 REPOKEY_TYPE_SHA256
/* public */ /* public */
void hy_package_free(HyPackage pkg); void hy_package_free(HyPackage pkg);
HyPackage hy_package_link(HyPackage pkg); HyPackage hy_package_link(HyPackage pkg);
int hy_package_identical(HyPackage pkg1, HyPackage pkg2);
int hy_package_cmp(HyPackage pkg1, HyPackage pkg2); int hy_package_cmp(HyPackage pkg1, HyPackage pkg2);
int hy_package_evr_cmp(HyPackage pkg1, HyPackage pkg2); int hy_package_evr_cmp(HyPackage pkg1, HyPackage pkg2);
char *hy_package_get_location(HyPackage pkg); char *hy_package_get_location(HyPackage pkg);
char *hy_package_get_nvra(HyPackage pkg); char *hy_package_get_nevra(HyPackage pkg);
char *hy_package_get_sourcerpm(HyPackage pkg);
char *hy_package_get_version(HyPackage pkg);
char *hy_package_get_release(HyPackage pkg);
const char *hy_package_get_name(HyPackage pkg); const char *hy_package_get_name(HyPackage pkg);
const char *hy_package_get_arch(HyPackage pkg); const char *hy_package_get_arch(HyPackage pkg);
const unsigned char *hy_package_get_chksum(HyPackage pkg, int *type); const unsigned char *hy_package_get_chksum(HyPackage pkg, int *type);
const char *hy_package_get_description(HyPackage pkg);
const char *hy_package_get_evr(HyPackage pkg); const char *hy_package_get_evr(HyPackage pkg);
const char *hy_package_get_license(HyPackage pkg);
const unsigned char *hy_package_get_hdr_chksum(HyPackage pkg, int *type); const unsigned char *hy_package_get_hdr_chksum(HyPackage pkg, int *type);
const char *hy_package_get_packager(HyPackage pkg);
const char *hy_package_get_reponame(HyPackage pkg); const char *hy_package_get_reponame(HyPackage pkg);
const char *hy_package_get_summary(HyPackage pkg); const char *hy_package_get_summary(HyPackage pkg);
int hy_package_get_medianr(HyPackage pkg); const char *hy_package_get_url(HyPackage pkg);
int hy_package_get_rpmdbid(HyPackage pkg); unsigned long long hy_package_get_epoch(HyPackage pkg);
int hy_package_get_size(HyPackage pkg); unsigned long long hy_package_get_medianr(HyPackage pkg);
unsigned long long hy_package_get_rpmdbid(HyPackage pkg);
unsigned long long hy_package_get_size(HyPackage pkg);
unsigned long long hy_package_get_buildtime(HyPackage pkg);
unsigned long long hy_package_get_installtime(HyPackage pkg);
HyReldepList hy_package_get_obsoletes(HyPackage pkg);
HyReldepList hy_package_get_requires(HyPackage pkg);
HyPackageDelta hy_package_get_delta_from_evr(HyPackage pkg, const char *fro m_evr); HyPackageDelta hy_package_get_delta_from_evr(HyPackage pkg, const char *fro m_evr);
const char *hy_packagedelta_get_location(HyPackageDelta delta); const char *hy_packagedelta_get_location(HyPackageDelta delta);
void hy_packagedelta_free(HyPackageDelta delta); void hy_packagedelta_free(HyPackageDelta delta);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 9 change blocks. 
13 lines changed or deleted 21 lines changed or added


 packagelist.h   packagelist.h 
#ifndef HY_PACKAGELIST_H #ifndef HY_PACKAGELIST_H
#define HY_PACKAGELIST_H #define HY_PACKAGELIST_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* libsolv */ // hawkey
#include "solv/queue.h"
/* hawkey */
#include "package.h"
#include "sack.h"
#include "types.h" #include "types.h"
HyPackageList hy_packagelist_create(void); HyPackageList hy_packagelist_create(void);
HyPackageList hy_packagelist_of_obsoletes(HySack sack, HyPackage pkg);
void hy_packagelist_free(HyPackageList plist); void hy_packagelist_free(HyPackageList plist);
int hy_packagelist_count(HyPackageList plist); int hy_packagelist_count(HyPackageList plist);
HyPackage hy_packagelist_get(HyPackageList plist, int index); HyPackage hy_packagelist_get(HyPackageList plist, int index);
HyPackage hy_packagelist_get_clone(HyPackageList plist, int index); HyPackage hy_packagelist_get_clone(HyPackageList plist, int index);
int hy_packagelist_has(HyPackageList plist, HyPackage pkg);
void hy_packagelist_push(HyPackageList plist, HyPackage pkg); void hy_packagelist_push(HyPackageList plist, HyPackage pkg);
#define FOR_PACKAGELIST(pkg, pkglist, i) \ #define FOR_PACKAGELIST(pkg, pkglist, i) \
for (i = 0; (pkg = hy_packagelist_get(pkglist, i++)) != NULL; ) for (i = 0; (pkg = hy_packagelist_get(pkglist, i)) != NULL; ++i)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_PACKAGELIST_H */ #endif /* HY_PACKAGELIST_H */
 End of changes. 4 change blocks. 
8 lines changed or deleted 3 lines changed or added


 query.h   query.h 
#ifndef HY_QUERY_H #ifndef HY_QUERY_H
#define HY_QUERY_H #define HY_QUERY_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* hawkey */ /* hawkey */
#include "packagelist.h"
#include "sack.h"
#include "types.h" #include "types.h"
enum _hy_comparison_type_e {
/* part 1: flags that mix with all types */
HY_ICASE = 1 << 0,
HY_NOT = 1 << 1,
HY_COMPARISON_FLAG_MASK = HY_ICASE | HY_NOT,
/* part 2: comparison types that mix with each other */
HY_EQ = (1 << 8),
HY_LT = (1 << 9),
HY_GT = (1 << 10),
/* part 3: comparison types that only make sense for strings */
HY_SUBSTR = (1 << 11),
HY_GLOB = (1 << 12),
/* part 4: frequently used combinations */
HY_NEQ = HY_EQ | HY_NOT,
};
enum _hy_key_name_e {
HY_PKG_NAME,
HY_PKG_ARCH,
HY_PKG_EVR,
HY_PKG_SUMMARY,
HY_PKG_FILE,
HY_PKG_REPO,
HY_PKG_PROVIDES,
HY_PKG_LATEST,
HY_PKG_DOWNGRADES,
HY_PKG_UPGRADES,
HY_PKG_OBSOLETING
};
HyQuery hy_query_create(HySack sack); HyQuery hy_query_create(HySack sack);
void hy_query_free(HyQuery q); void hy_query_free(HyQuery q);
void hy_query_clear(HyQuery q); void hy_query_clear(HyQuery q);
void hy_query_filter(HyQuery q, int keyname, int filter_type, const char *m HyQuery hy_query_clone(HyQuery q);
atch); int hy_query_filter(HyQuery q, int keyname, int cmp_type, const char *match
void hy_query_filter_in(HyQuery q, int keyname, int filter_type, );
int hy_query_filter_empty(HyQuery q);
int hy_query_filter_in(HyQuery q, int keyname, int cmp_type,
const char **matches); const char **matches);
void hy_query_filter_provides(HyQuery q, int filter_type, const char *name, int hy_query_filter_num(HyQuery q, int keyname, int cmp_type,
const char *evr); int match);
int hy_query_filter_num_in(HyQuery q, int keyname, int cmp_type, int nmatch
es,
const int *matches);
int hy_query_filter_package_in(HyQuery q, int keyname, int cmp_type,
const HyPackageSet pset);
int hy_query_filter_reldep(HyQuery q, int keyname, const HyReldep reldep);
int hy_query_filter_reldep_in(HyQuery q, int keyname,
const HyReldepList reldeplist);
int hy_query_filter_provides(HyQuery q, int cmp_type, const char *name,
const char *evr);
int hy_query_filter_requires(HyQuery q, int cmp_type, const char *name,
const char *evr);
/** /**
* Filter packages that are named same as an installed package but lower ve rsion. * Filter packages that are named same as an installed package but lower ve rsion.
* *
* NOTE: this does not guerantee packages filtered in this way are installa ble. * NOTE: this does not guerantee packages filtered in this way are installa ble.
*/ */
void hy_query_filter_downgrades(HyQuery q, int val); void hy_query_filter_downgrades(HyQuery q, int val);
/** /**
* Filter packages that are named same as an installed package but higher v ersion. * Filter packages that are named same as an installed package but higher v ersion.
* *
* NOTE: this does not guerantee packages filtered in this way are installa ble. * NOTE: this does not guerantee packages filtered in this way are installa ble.
*/ */
void hy_query_filter_upgrades(HyQuery q, int val); void hy_query_filter_upgrades(HyQuery q, int val);
void hy_query_filter_latest(HyQuery q, int val); void hy_query_filter_latest(HyQuery q, int val);
void hy_query_filter_obsoleting(HyQuery q, int val);
HyPackageList hy_query_run(HyQuery q); HyPackageList hy_query_run(HyQuery q);
HyPackageSet hy_query_run_set(HyQuery q);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_QUERY_H */ #endif /* HY_QUERY_H */
 End of changes. 6 change blocks. 
41 lines changed or deleted 21 lines changed or added


 repo.h   repo.h 
#ifndef HY_REPO_H #ifndef HY_REPO_H
#define HY_REPO_H #define HY_REPO_H
#include "types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
// hawkey
#include "types.h"
enum _hy_repo_param_e { enum _hy_repo_param_e {
HY_REPO_NAME, HY_REPO_NAME,
HY_REPO_MD_FN, HY_REPO_MD_FN,
HY_REPO_PRESTO_FN, HY_REPO_PRESTO_FN,
HY_REPO_PRIMARY_FN, HY_REPO_PRIMARY_FN,
HY_REPO_FILELISTS_FN HY_REPO_FILELISTS_FN
}; };
HyRepo hy_repo_create(void); HyRepo hy_repo_create(const char *name);
void hy_repo_set_string(HyRepo repo, enum _hy_repo_param_e which, const cha void hy_repo_set_string(HyRepo repo, int which, const char *str_val);
r *str_val); const char *hy_repo_get_string(HyRepo repo, int which);
const char *hy_repo_get_string(HyRepo repo, enum _hy_repo_param_e which);
void hy_repo_free(HyRepo repo); void hy_repo_free(HyRepo repo);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_REPO_H */ #endif /* HY_REPO_H */
 End of changes. 3 change blocks. 
6 lines changed or deleted 6 lines changed or added


 sack.h   sack.h 
#ifndef HY_SACK_H #ifndef HY_SACK_H
#define HY_SACK_H #define HY_SACK_H
/* libsolv */
#include "solv/pool.h"
/* hawkey */
#include "repo.h"
#include "package.h"
#include "types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define HY_SYSTEM_REPO_NAME "@System" // hawkey
#define HY_SYSTEM_RPMDB "/var/lib/rpm/Packages" #include "types.h"
#define HY_CMDLINE_REPO_NAME "@commandline"
#define HY_EXT_FILENAMES "-filenames" enum _hy_sack_repo_load_flags {
#define HY_EXT_PRESTO "-presto" HY_BUILD_CACHE = 1 << 0,
HY_LOAD_FILELISTS = 1 << 1,
HY_LOAD_PRESTO = 1 << 2
};
HySack hy_sack_create(const char *cache_path, const char *arch); HySack hy_sack_create(const char *cache_path, const char *arch);
void hy_sack_free(HySack sack); void hy_sack_free(HySack sack);
const char *hy_sack_get_cache_path(HySack sack);
char *hy_sack_give_cache_fn(HySack sack, const char *reponame, const char * ext); char *hy_sack_give_cache_fn(HySack sack, const char *reponame, const char * ext);
const char **hy_sack_list_arches(HySack sack);
void hy_sack_set_installonly(HySack sack, const char **installonly); void hy_sack_set_installonly(HySack sack, const char **installonly);
void hy_sack_create_cmdline_repo(HySack sack); void hy_sack_create_cmdline_repo(HySack sack);
HyPackage hy_sack_add_cmdline_rpm(HySack sack, const char *fn); HyPackage hy_sack_add_cmdline_package(HySack sack, const char *fn);
void hy_sack_load_rpm_repo(HySack sack); int hy_sack_count(HySack sack);
int hy_sack_load_yum_repo(HySack sack, HyRepo repo);
int hy_sack_load_filelists(HySack sack); /**
int hy_sack_load_presto(HySack sack); * Load RPMDB, the system package database.
int hy_sack_write_all_repos(HySack sack); *
int hy_sack_write_filelists(HySack sack); * @returns 0 on success, HY_E_IO on fatal error,
int hy_sack_write_presto(HySack sack); * HY_E_CACHE_WRITE on cache write error.
*/
int hy_sack_load_system_repo(HySack sack, HyRepo a_hrepo, int flags);
int hy_sack_load_yum_repo(HySack sack, HyRepo hrepo, int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_SACK_H */ #endif /* HY_SACK_H */
 End of changes. 5 change blocks. 
21 lines changed or deleted 21 lines changed or added


 types.h   types.h 
skipping to change at line 14 skipping to change at line 14
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef struct _HyRepo * HyRepo; typedef struct _HyRepo * HyRepo;
typedef struct _HyGoal * HyGoal; typedef struct _HyGoal * HyGoal;
typedef struct _HyPackage * HyPackage; typedef struct _HyPackage * HyPackage;
typedef struct _HyPackageDelta * HyPackageDelta; typedef struct _HyPackageDelta * HyPackageDelta;
typedef struct _HyPackageList * HyPackageList; typedef struct _HyPackageList * HyPackageList;
typedef struct _HyPackageListIter * HyPackageListIter; typedef struct _HyPackageListIter * HyPackageListIter;
typedef struct _HyPackageSet * HyPackageSet;
typedef struct _HyQuery * HyQuery; typedef struct _HyQuery * HyQuery;
typedef struct _HyReldep * HyReldep;
typedef struct _HyReldepList * HyReldepList;
typedef struct _HySack * HySack; typedef struct _HySack * HySack;
typedef struct _HySelector * HySelector;
typedef const unsigned char HyChecksum; typedef const unsigned char HyChecksum;
typedef int (*hy_solution_callback)(HyGoal goal, void *callback_data);
#define HY_SYSTEM_REPO_NAME "@System"
#define HY_SYSTEM_RPMDB "/var/lib/rpm/Packages"
#define HY_CMDLINE_REPO_NAME "@commandline"
#define HY_EXT_FILENAMES "-filenames"
#define HY_EXT_PRESTO "-presto"
#define HY_CHKSUM_MD5 1
#define HY_CHKSUM_SHA1 2
#define HY_CHKSUM_SHA256 3
enum _hy_key_name_e {
HY_PKG,
HY_PKG_ALL,
HY_PKG_ARCH,
HY_PKG_DESCRIPTION,
HY_PKG_EPOCH,
HY_PKG_EVR,
HY_PKG_FILE,
HY_PKG_NAME,
HY_PKG_OBSOLETES,
HY_PKG_PROVIDES,
HY_PKG_RELEASE,
HY_PKG_REPONAME,
HY_PKG_REQUIRES,
HY_PKG_SOURCERPM,
HY_PKG_SUMMARY,
HY_PKG_URL,
HY_PKG_VERSION
};
enum _hy_comparison_type_e {
/* part 1: flags that mix with all types */
HY_ICASE = 1 << 0,
HY_NOT = 1 << 1,
HY_COMPARISON_FLAG_MASK = HY_ICASE | HY_NOT,
/* part 2: comparison types that mix with each other */
HY_EQ = (1 << 8),
HY_LT = (1 << 9),
HY_GT = (1 << 10),
/* part 3: comparison types that only make sense for strings */
HY_SUBSTR = (1 << 11),
HY_GLOB = (1 << 12),
/* part 4: frequently used combinations */
HY_NEQ = HY_EQ | HY_NOT,
};
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_TYPES_H */ #endif /* HY_TYPES_H */
 End of changes. 4 change blocks. 
0 lines changed or deleted 55 lines changed or added


 util.h   util.h 
#ifndef HY_UTIL_H #ifndef HY_UTIL_H
#define HY_UTIL_H #define HY_UTIL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void *hy_free(void *mem); void *hy_free(void *mem);
const char *chksum_name(int chksum_type); const char *hy_chksum_name(int chksum_type);
char *chksum_str(const unsigned char *chksum, int type); int hy_chksum_type(const char *chksum_name);
char *hy_chksum_str(const unsigned char *chksum, int type);
int hy_split_nevra(const char *nevra, char **name, long int *epoch,
char **version, char **release, char **arch);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* HY_UTIL_H */ #endif /* HY_UTIL_H */
 End of changes. 1 change blocks. 
2 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/