summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-02 02:01:38 +1000
committerAllan McRae <allan@archlinux.org>2011-07-02 02:01:38 +1000
commiteb39a9482b711d58a6c12840800f2372dee0c120 (patch)
tree0323b71b83042b3e3d66d70c94e40dbb4de35f5f
parentcf1401a04d5179c89af6460b812e171cc2da19f0 (diff)
Prefix alpm_pkgreason_t members with ALPM
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/add.c6
-rw-r--r--lib/libalpm/alpm.h8
-rw-r--r--lib/libalpm/deps.c2
-rw-r--r--lib/libalpm/sync.c6
-rw-r--r--src/pacman/database.c6
-rw-r--r--src/pacman/package.c4
-rw-r--r--src/pacman/query.c4
7 files changed, 18 insertions, 18 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 702e4d63..4eca6332 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -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) {
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 76564271..e8e15205 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -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),
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 6ca79c34..8c8307fb 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -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;
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 8f038400..5114309d 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -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;
}
}
diff --git a/src/pacman/database.c b/src/pacman/database.c
index b7490cea..d39ccf78 100644
--- a/src/pacman/database.c
+++ b/src/pacman/database.c
@@ -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);
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 6b480873..1c4e9766 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -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:
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 826c2262..6500c2da 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -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 */