mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Rename pmpkgreason_t to alpm_pkgreason_t
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9aab1440ca
commit
7ce674491b
@ -53,12 +53,12 @@ extern "C" {
|
||||
* Install reasons.
|
||||
* Why the package was installed.
|
||||
*/
|
||||
typedef enum _pmpkgreason_t {
|
||||
typedef enum _alpm_pkgreason_t {
|
||||
/** Explicitly requested by the user. */
|
||||
PM_PKG_REASON_EXPLICIT = 0,
|
||||
/** Installed as a dependency for another package. */
|
||||
PM_PKG_REASON_DEPEND = 1
|
||||
} pmpkgreason_t;
|
||||
} alpm_pkgreason_t;
|
||||
|
||||
/** Types of version constraints in dependency specs. */
|
||||
typedef enum _pmdepmod_t {
|
||||
@ -432,7 +432,7 @@ alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles);
|
||||
* @param reason the new install reason
|
||||
* @return 0 on success, -1 on error (pm_errno is set accordingly)
|
||||
*/
|
||||
int alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t reason);
|
||||
int alpm_db_set_pkgreason(pmdb_t *db, const char *name, alpm_pkgreason_t reason);
|
||||
|
||||
/** @} */
|
||||
|
||||
@ -567,7 +567,7 @@ off_t alpm_pkg_get_isize(pmpkg_t *pkg);
|
||||
* @param pkg a pointer to package
|
||||
* @return an enum member giving the install reason.
|
||||
*/
|
||||
pmpkgreason_t alpm_pkg_get_reason(pmpkg_t *pkg);
|
||||
alpm_pkgreason_t alpm_pkg_get_reason(pmpkg_t *pkg);
|
||||
|
||||
/** Returns the list of package licenses.
|
||||
* @param pkg a pointer to package
|
||||
|
@ -115,7 +115,7 @@ static off_t _cache_get_isize(pmpkg_t *pkg)
|
||||
return pkg->isize;
|
||||
}
|
||||
|
||||
static pmpkgreason_t _cache_get_reason(pmpkg_t *pkg)
|
||||
static alpm_pkgreason_t _cache_get_reason(pmpkg_t *pkg)
|
||||
{
|
||||
LAZY_LOAD(INFRQ_DESC, -1);
|
||||
return pkg->reason;
|
||||
@ -618,7 +618,7 @@ int _alpm_local_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
|
||||
if(fgets(line, sizeof(line), fp) == NULL) {
|
||||
goto error;
|
||||
}
|
||||
info->reason = (pmpkgreason_t)atol(_alpm_strtrim(line));
|
||||
info->reason = (alpm_pkgreason_t)atol(_alpm_strtrim(line));
|
||||
} else if(strcmp(line, "%SIZE%") == 0) {
|
||||
/* NOTE: the CSIZE and SIZE fields both share the "size" field
|
||||
* in the pkginfo_t struct. This can be done b/c CSIZE
|
||||
|
@ -268,7 +268,7 @@ alpm_list_t SYMEXPORT *alpm_db_search(pmdb_t *db, const alpm_list_t* needles)
|
||||
}
|
||||
|
||||
/** Set install reason for a package in db. */
|
||||
int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t reason)
|
||||
int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, alpm_pkgreason_t reason)
|
||||
{
|
||||
ASSERT(db != NULL, return -1);
|
||||
db->handle->pm_errno = 0;
|
||||
|
@ -95,7 +95,7 @@ static const char *_pkg_get_md5sum(pmpkg_t *pkg) { return pkg->md5sum; }
|
||||
static const char *_pkg_get_arch(pmpkg_t *pkg) { return pkg->arch; }
|
||||
static off_t _pkg_get_size(pmpkg_t *pkg) { return pkg->size; }
|
||||
static off_t _pkg_get_isize(pmpkg_t *pkg) { return pkg->isize; }
|
||||
static pmpkgreason_t _pkg_get_reason(pmpkg_t *pkg) { return pkg->reason; }
|
||||
static alpm_pkgreason_t _pkg_get_reason(pmpkg_t *pkg) { return pkg->reason; }
|
||||
static int _pkg_has_scriptlet(pmpkg_t *pkg) { return pkg->scriptlet; }
|
||||
|
||||
static alpm_list_t *_pkg_get_licenses(pmpkg_t *pkg) { return pkg->licenses; }
|
||||
@ -246,7 +246,7 @@ off_t SYMEXPORT alpm_pkg_get_isize(pmpkg_t *pkg)
|
||||
return pkg->ops->get_isize(pkg);
|
||||
}
|
||||
|
||||
pmpkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
|
||||
alpm_pkgreason_t SYMEXPORT alpm_pkg_get_reason(pmpkg_t *pkg)
|
||||
{
|
||||
ASSERT(pkg != NULL, return -1);
|
||||
pkg->handle->pm_errno = 0;
|
||||
|
@ -58,7 +58,7 @@ struct pkg_operations {
|
||||
const char *(*get_arch) (pmpkg_t *);
|
||||
off_t (*get_size) (pmpkg_t *);
|
||||
off_t (*get_isize) (pmpkg_t *);
|
||||
pmpkgreason_t (*get_reason) (pmpkg_t *);
|
||||
alpm_pkgreason_t (*get_reason) (pmpkg_t *);
|
||||
int (*has_scriptlet) (pmpkg_t *);
|
||||
|
||||
alpm_list_t *(*get_licenses) (pmpkg_t *);
|
||||
@ -110,7 +110,7 @@ struct __pmpkg_t {
|
||||
|
||||
int scriptlet;
|
||||
|
||||
pmpkgreason_t reason;
|
||||
alpm_pkgreason_t reason;
|
||||
pmdbinfrq_t infolevel;
|
||||
pmpkgfrom_t origin;
|
||||
/* origin == PKG_FROM_FILE, use pkg->origin_data.file
|
||||
|
@ -42,7 +42,7 @@ int pacman_database(alpm_list_t *targets)
|
||||
alpm_list_t *i;
|
||||
pmdb_t *db_local;
|
||||
int retval = 0;
|
||||
pmpkgreason_t reason;
|
||||
alpm_pkgreason_t reason;
|
||||
|
||||
if(targets == NULL) {
|
||||
pm_printf(PM_LOG_ERROR, _("no targets specified (use -h for help)\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user