Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/alpm.h6
-rw-r--r--lib/libalpm/be_local.c4
-rw-r--r--lib/libalpm/be_package.c2
-rw-r--r--lib/libalpm/be_sync.c2
-rw-r--r--lib/libalpm/package.c18
-rw-r--r--lib/libalpm/sync.c12
6 files changed, 22 insertions, 22 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 2e666294..bb792cf3 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -59,9 +59,9 @@ typedef enum _alpm_pkgreason_t {
/** Location a package object was loaded from. */
typedef enum _alpm_pkgfrom_t {
- PKG_FROM_FILE = 1,
- PKG_FROM_LOCALDB,
- PKG_FROM_SYNCDB
+ ALPM_PKG_FROM_FILE = 1,
+ ALPM_PKG_FROM_LOCALDB,
+ ALPM_PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
/** Location a package object was loaded from. */
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 9090c815..39df15b0 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -448,7 +448,7 @@ static int local_db_populate(alpm_db_t *db)
continue;
}
- pkg->origin = PKG_FROM_LOCALDB;
+ pkg->origin = ALPM_PKG_FROM_LOCALDB;
pkg->origin_data.db = db;
pkg->ops = &local_pkg_ops;
pkg->handle = db->handle;
@@ -968,7 +968,7 @@ int _alpm_local_db_remove(alpm_db_t *db, alpm_pkg_t *info)
int SYMEXPORT alpm_pkg_set_reason(alpm_pkg_t *pkg, alpm_pkgreason_t reason)
{
ASSERT(pkg != NULL, return -1);
- ASSERT(pkg->origin == PKG_FROM_LOCALDB,
+ ASSERT(pkg->origin == ALPM_PKG_FROM_LOCALDB,
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
ASSERT(pkg->origin_data.db == pkg->handle->db_local,
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index ce3ad55d..bcb884f4 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -521,7 +521,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
CLOSE(fd);
/* internal fields for package struct */
- newpkg->origin = PKG_FROM_FILE;
+ newpkg->origin = ALPM_PKG_FROM_FILE;
newpkg->origin_data.file = strdup(pkgfile);
newpkg->ops = get_file_pkg_ops();
newpkg->handle = handle;
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 6af5aacd..9fadff54 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -357,7 +357,7 @@ static alpm_pkg_t *load_pkg_for_entry(alpm_db_t *db, const char *entryname,
pkg->version = pkgver;
pkg->name_hash = pkgname_hash;
- pkg->origin = PKG_FROM_SYNCDB;
+ pkg->origin = ALPM_PKG_FROM_SYNCDB;
pkg->origin_data.db = db;
pkg->ops = &default_pkg_ops;
pkg->ops->get_validation = _sync_get_validation;
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 6b648675..a1d75a75 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -46,7 +46,7 @@ int SYMEXPORT alpm_pkg_free(alpm_pkg_t *pkg)
ASSERT(pkg != NULL, return -1);
/* Only free packages loaded in user space */
- if(pkg->origin == PKG_FROM_FILE) {
+ if(pkg->origin == ALPM_PKG_FROM_FILE) {
_alpm_pkg_free(pkg);
}
@@ -62,7 +62,7 @@ int SYMEXPORT alpm_pkg_checkmd5sum(alpm_pkg_t *pkg)
ASSERT(pkg != NULL, return -1);
pkg->handle->pm_errno = 0;
/* We only inspect packages from sync repositories */
- ASSERT(pkg->origin == PKG_FROM_SYNCDB,
+ ASSERT(pkg->origin == ALPM_PKG_FROM_SYNCDB,
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
fpath = _alpm_filecache_find(pkg->handle, pkg->filename);
@@ -351,7 +351,7 @@ alpm_db_t SYMEXPORT *alpm_pkg_get_db(alpm_pkg_t *pkg)
{
/* Sanity checks */
ASSERT(pkg != NULL, return NULL);
- ASSERT(pkg->origin != PKG_FROM_FILE, return NULL);
+ ASSERT(pkg->origin != ALPM_PKG_FROM_FILE, return NULL);
pkg->handle->pm_errno = 0;
return pkg->origin_data.db;
@@ -418,7 +418,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(alpm_pkg_t *pkg)
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
- if(pkg->origin == PKG_FROM_FILE) {
+ if(pkg->origin == ALPM_PKG_FROM_FILE) {
/* The sane option; search locally for things that require this. */
find_requiredby(pkg, pkg->handle->db_local, &reqs);
} else {
@@ -554,7 +554,7 @@ int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr)
/* internal */
newpkg->infolevel = pkg->infolevel;
newpkg->origin = pkg->origin;
- if(newpkg->origin == PKG_FROM_FILE) {
+ if(newpkg->origin == ALPM_PKG_FROM_FILE) {
newpkg->origin_data.file = strdup(pkg->origin_data.file);
} else {
newpkg->origin_data.db = pkg->origin_data.db;
@@ -614,15 +614,15 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
alpm_list_free(pkg->delta_path);
alpm_list_free(pkg->removes);
- if(pkg->origin == PKG_FROM_FILE) {
+ if(pkg->origin == ALPM_PKG_FROM_FILE) {
FREE(pkg->origin_data.file);
}
FREE(pkg);
}
/* This function should be used when removing a target from upgrade/sync target list
- * Case 1: If pkg is a loaded package file (PKG_FROM_FILE), it will be freed.
- * Case 2: If pkg is a pkgcache entry (PKG_FROM_CACHE), it won't be freed,
+ * Case 1: If pkg is a loaded package file (ALPM_PKG_FROM_FILE), it will be freed.
+ * Case 2: If pkg is a pkgcache entry (ALPM_PKG_FROM_CACHE), it won't be freed,
* only the transaction specific fields of pkg will be freed.
*/
void _alpm_pkg_free_trans(alpm_pkg_t *pkg)
@@ -631,7 +631,7 @@ void _alpm_pkg_free_trans(alpm_pkg_t *pkg)
return;
}
- if(pkg->origin == PKG_FROM_FILE) {
+ if(pkg->origin == ALPM_PKG_FROM_FILE) {
_alpm_pkg_free(pkg);
return;
}
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index b43a61b7..66f7ed17 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -288,7 +288,7 @@ static int compute_download_size(alpm_pkg_t *newpkg)
alpm_handle_t *handle = newpkg->handle;
int ret = 0;
- if(newpkg->origin != PKG_FROM_SYNCDB) {
+ if(newpkg->origin != ALPM_PKG_FROM_SYNCDB) {
newpkg->infolevel |= INFRQ_DSIZE;
newpkg->download_size = 0;
return 0;
@@ -365,7 +365,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(i = trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
- from_sync += (spkg->origin == PKG_FROM_SYNCDB);
+ from_sync += (spkg->origin == ALPM_PKG_FROM_SYNCDB);
}
/* ensure all sync database are valid if we will be using them */
@@ -821,7 +821,7 @@ static int find_dl_candidates(alpm_db_t *repo, alpm_list_t **files, alpm_list_t
for(i = handle->trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
- if(spkg->origin != PKG_FROM_FILE && repo == spkg->origin_data.db) {
+ if(spkg->origin != ALPM_PKG_FROM_FILE && repo == spkg->origin_data.db) {
alpm_list_t *delta_path = spkg->delta_path;
if(!repo->servers) {
@@ -991,7 +991,7 @@ static int check_validity(alpm_handle_t *handle,
PROGRESS(handle, ALPM_PROGRESS_INTEGRITY_START, "", percent,
total, current);
- if(v.pkg->origin == PKG_FROM_FILE) {
+ if(v.pkg->origin == ALPM_PKG_FROM_FILE) {
continue; /* pkg_load() has been already called, this package is valid */
}
@@ -1067,7 +1067,7 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
PROGRESS(handle, ALPM_PROGRESS_LOAD_START, "", percent,
total, current);
- if(spkg->origin == PKG_FROM_FILE) {
+ if(spkg->origin == ALPM_PKG_FROM_FILE) {
continue; /* pkg_load() has been already called, this package is valid */
}
@@ -1137,7 +1137,7 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
* realistically if there are small and huge packages involved */
for(i = trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
- if(spkg->origin != PKG_FROM_FILE) {
+ if(spkg->origin != ALPM_PKG_FROM_FILE) {
total_bytes += spkg->size;
}
total++;