1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-08 12:28:00 -05:00

Rename pmpkgreason_t to alpm_pkgreason_t

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2011-06-28 13:54:04 +10:00
parent 9aab1440ca
commit 7ce674491b
6 changed files with 12 additions and 12 deletions

View File

@ -53,12 +53,12 @@ extern "C" {
* Install reasons. * Install reasons.
* Why the package was installed. * Why the package was installed.
*/ */
typedef enum _pmpkgreason_t { typedef enum _alpm_pkgreason_t {
/** Explicitly requested by the user. */ /** Explicitly requested by the user. */
PM_PKG_REASON_EXPLICIT = 0, PM_PKG_REASON_EXPLICIT = 0,
/** Installed as a dependency for another package. */ /** Installed as a dependency for another package. */
PM_PKG_REASON_DEPEND = 1 PM_PKG_REASON_DEPEND = 1
} pmpkgreason_t; } alpm_pkgreason_t;
/** Types of version constraints in dependency specs. */ /** Types of version constraints in dependency specs. */
typedef enum _pmdepmod_t { 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 * @param reason the new install reason
* @return 0 on success, -1 on error (pm_errno is set accordingly) * @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 * @param pkg a pointer to package
* @return an enum member giving the install reason. * @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. /** Returns the list of package licenses.
* @param pkg a pointer to package * @param pkg a pointer to package

View File

@ -115,7 +115,7 @@ static off_t _cache_get_isize(pmpkg_t *pkg)
return pkg->isize; 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); LAZY_LOAD(INFRQ_DESC, -1);
return pkg->reason; 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) { if(fgets(line, sizeof(line), fp) == NULL) {
goto error; 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) { } else if(strcmp(line, "%SIZE%") == 0) {
/* NOTE: the CSIZE and SIZE fields both share the "size" field /* NOTE: the CSIZE and SIZE fields both share the "size" field
* in the pkginfo_t struct. This can be done b/c CSIZE * in the pkginfo_t struct. This can be done b/c CSIZE

View File

@ -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. */ /** 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); ASSERT(db != NULL, return -1);
db->handle->pm_errno = 0; db->handle->pm_errno = 0;

View File

@ -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 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_size(pmpkg_t *pkg) { return pkg->size; }
static off_t _pkg_get_isize(pmpkg_t *pkg) { return pkg->isize; } 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 int _pkg_has_scriptlet(pmpkg_t *pkg) { return pkg->scriptlet; }
static alpm_list_t *_pkg_get_licenses(pmpkg_t *pkg) { return pkg->licenses; } 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); 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); ASSERT(pkg != NULL, return -1);
pkg->handle->pm_errno = 0; pkg->handle->pm_errno = 0;

View File

@ -58,7 +58,7 @@ struct pkg_operations {
const char *(*get_arch) (pmpkg_t *); const char *(*get_arch) (pmpkg_t *);
off_t (*get_size) (pmpkg_t *); off_t (*get_size) (pmpkg_t *);
off_t (*get_isize) (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 *); int (*has_scriptlet) (pmpkg_t *);
alpm_list_t *(*get_licenses) (pmpkg_t *); alpm_list_t *(*get_licenses) (pmpkg_t *);
@ -110,7 +110,7 @@ struct __pmpkg_t {
int scriptlet; int scriptlet;
pmpkgreason_t reason; alpm_pkgreason_t reason;
pmdbinfrq_t infolevel; pmdbinfrq_t infolevel;
pmpkgfrom_t origin; pmpkgfrom_t origin;
/* origin == PKG_FROM_FILE, use pkg->origin_data.file /* origin == PKG_FROM_FILE, use pkg->origin_data.file

View File

@ -42,7 +42,7 @@ int pacman_database(alpm_list_t *targets)
alpm_list_t *i; alpm_list_t *i;
pmdb_t *db_local; pmdb_t *db_local;
int retval = 0; int retval = 0;
pmpkgreason_t reason; alpm_pkgreason_t reason;
if(targets == NULL) { if(targets == NULL) {
pm_printf(PM_LOG_ERROR, _("no targets specified (use -h for help)\n")); pm_printf(PM_LOG_ERROR, _("no targets specified (use -h for help)\n"));