1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Prefix alpm_pkgreason_t members with ALPM

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2011-07-02 02:01:38 +10:00
parent cf1401a04d
commit eb39a9482b
7 changed files with 18 additions and 18 deletions

View File

@ -98,7 +98,7 @@ int SYMEXPORT alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
}
/* add the package to the transaction */
pkg->reason = PM_PKG_REASON_EXPLICIT;
pkg->reason = ALPM_PKG_REASON_EXPLICIT;
_alpm_log(handle, PM_LOG_DEBUG, "adding package %s-%s to the transaction add list\n",
pkgname, pkgver);
trans->add = alpm_list_add(trans->add, pkg);
@ -499,9 +499,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* we override any pre-set reason if we have alldeps or allexplicit set */
if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
newpkg->reason = PM_PKG_REASON_DEPEND;
newpkg->reason = ALPM_PKG_REASON_DEPEND;
} else if(trans->flags & PM_TRANS_FLAG_ALLEXPLICIT) {
newpkg->reason = PM_PKG_REASON_EXPLICIT;
newpkg->reason = ALPM_PKG_REASON_EXPLICIT;
}
if(oldpkg) {

View File

@ -55,9 +55,9 @@ extern "C" {
*/
typedef enum _alpm_pkgreason_t {
/** Explicitly requested by the user. */
PM_PKG_REASON_EXPLICIT = 0,
ALPM_PKG_REASON_EXPLICIT = 0,
/** Installed as a dependency for another package. */
PM_PKG_REASON_DEPEND = 1
ALPM_PKG_REASON_DEPEND = 1
} alpm_pkgreason_t;
/** Types of version constraints in dependency specs. */
@ -746,7 +746,7 @@ typedef enum _alpm_transflag_t {
/** Modify database but do not commit changes to the filesystem. */
PM_TRANS_FLAG_DBONLY = (1 << 6),
/* (1 << 7) flag can go here */
/** Use PM_PKG_REASON_DEPEND when installing packages. */
/** Use ALPM_PKG_REASON_DEPEND when installing packages. */
PM_TRANS_FLAG_ALLDEPS = (1 << 8),
/** Only download packages and do not actually install. */
PM_TRANS_FLAG_DOWNLOADONLY = (1 << 9),
@ -757,7 +757,7 @@ typedef enum _alpm_transflag_t {
/* (1 << 12) flag can go here */
/** Do not install a package if it is already installed and up to date. */
PM_TRANS_FLAG_NEEDED = (1 << 13),
/** Use PM_PKG_REASON_EXPLICIT when installing packages. */
/** Use ALPM_PKG_REASON_EXPLICIT when installing packages. */
PM_TRANS_FLAG_ALLEXPLICIT = (1 << 14),
/** Do not remove a package if it is needed by another one. */
PM_TRANS_FLAG_UNNEEDED = (1 << 15),

View File

@ -483,7 +483,7 @@ static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg, alpm_list_t *targe
if(!include_explicit) {
/* see if it was explicitly installed */
if(alpm_pkg_get_reason(pkg) == PM_PKG_REASON_EXPLICIT) {
if(alpm_pkg_get_reason(pkg) == ALPM_PKG_REASON_EXPLICIT) {
_alpm_log(db->handle, PM_LOG_DEBUG, "excluding %s -- explicitly installed\n",
alpm_pkg_get_name(pkg));
return 0;

View File

@ -182,8 +182,8 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
lpkg->name, tpkg->name);
tpkg->removes = alpm_list_add(tpkg->removes, lpkg);
/* check the to-be-replaced package's reason field */
if(alpm_pkg_get_reason(lpkg) == PM_PKG_REASON_EXPLICIT) {
tpkg->reason = PM_PKG_REASON_EXPLICIT;
if(alpm_pkg_get_reason(lpkg) == ALPM_PKG_REASON_EXPLICIT) {
tpkg->reason = ALPM_PKG_REASON_EXPLICIT;
}
} else {
/* add spkg to the target list */
@ -378,7 +378,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(i = resolved; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
if(!_alpm_pkg_find(trans->add, pkg->name)) {
pkg->reason = PM_PKG_REASON_DEPEND;
pkg->reason = ALPM_PKG_REASON_DEPEND;
}
}

View File

@ -50,9 +50,9 @@ int pacman_database(alpm_list_t *targets)
}
if(config->flags & PM_TRANS_FLAG_ALLDEPS) { /* --asdeps */
reason = PM_PKG_REASON_DEPEND;
reason = ALPM_PKG_REASON_DEPEND;
} else if(config->flags & PM_TRANS_FLAG_ALLEXPLICIT) { /* --asexplicit */
reason = PM_PKG_REASON_EXPLICIT;
reason = ALPM_PKG_REASON_EXPLICIT;
} else {
pm_printf(PM_LOG_ERROR, _("no install reason specified (use -h for help)\n"));
return 1;
@ -71,7 +71,7 @@ int pacman_database(alpm_list_t *targets)
pkgname, alpm_strerror(alpm_errno(config->handle)));
retval = 1;
} else {
if(reason == PM_PKG_REASON_DEPEND) {
if(reason == ALPM_PKG_REASON_DEPEND) {
printf(_("%s: install reason has been set to 'installed as dependency'\n"), pkgname);
} else {
printf(_("%s: install reason has been set to 'explicitly installed'\n"), pkgname);

View File

@ -70,10 +70,10 @@ void dump_pkg_full(alpm_pkg_t *pkg, enum pkg_from from, int extra)
}
switch((long)alpm_pkg_get_reason(pkg)) {
case PM_PKG_REASON_EXPLICIT:
case ALPM_PKG_REASON_EXPLICIT:
reason = _("Explicitly installed");
break;
case PM_PKG_REASON_DEPEND:
case ALPM_PKG_REASON_DEPEND:
reason = _("Installed as a dependency for another package");
break;
default:

View File

@ -370,12 +370,12 @@ static int filter(alpm_pkg_t *pkg)
{
/* check if this package was explicitly installed */
if(config->op_q_explicit &&
alpm_pkg_get_reason(pkg) != PM_PKG_REASON_EXPLICIT) {
alpm_pkg_get_reason(pkg) != ALPM_PKG_REASON_EXPLICIT) {
return 0;
}
/* check if this package was installed as a dependency */
if(config->op_q_deps &&
alpm_pkg_get_reason(pkg) != PM_PKG_REASON_DEPEND) {
alpm_pkg_get_reason(pkg) != ALPM_PKG_REASON_DEPEND) {
return 0;
}
/* check if this pkg isn't in a sync DB */