summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-04-23 08:28:13 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-04-23 08:28:13 +0000
commit348cb923c7cd03ae660c78b95adda8143350e6e9 (patch)
treeb11552235eb76be332c0ceeadc35cf8080f346cb /lib/libalpm
parent4fcec8f03ff790bfb23b826eee169bc9c0b00142 (diff)
downloadpacman-348cb923c7cd03ae660c78b95adda8143350e6e9.tar.xz
renamed list_is_ptrin() in list_is_in()
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.c2
-rw-r--r--lib/libalpm/deps.c12
-rw-r--r--lib/libalpm/list.c2
-rw-r--r--lib/libalpm/list.h2
-rw-r--r--lib/libalpm/sync.c9
5 files changed, 12 insertions, 15 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 08a6994b..bf73d649 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -233,7 +233,7 @@ int alpm_db_update(PM_DB *db, char *archive, char *ts)
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- if(!pm_list_is_ptrin(db, handle->dbs_sync)) {
+ if(!pm_list_is_in(db, handle->dbs_sync)) {
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
}
diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 88bb6251..4439ba8d 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -210,7 +210,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
STRNCPY(miss->target, p->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, depend.name, PKG_NAME_LEN);
STRNCPY(miss->depend.version, depend.version, PKG_VERSION_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
@@ -238,7 +238,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, dp->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
@@ -255,7 +255,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, a->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
@@ -274,7 +274,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, info->name, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
@@ -415,7 +415,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, depend.name, PKG_NAME_LEN);
STRNCPY(miss->depend.version, depend.version, PKG_VERSION_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
@@ -439,7 +439,7 @@ PMList *checkdeps(pmdb_t *db, unsigned char op, PMList *packages)
miss->depend.version[0] = '\0';
STRNCPY(miss->target, tp->name, PKG_NAME_LEN);
STRNCPY(miss->depend.name, (char *)j->data, PKG_NAME_LEN);
- if(!pm_list_is_ptrin(miss, baddeps)) {
+ if(!pm_list_is_in(miss, baddeps)) {
baddeps = pm_list_add(baddeps, miss);
} else {
FREE(miss);
diff --git a/lib/libalpm/list.c b/lib/libalpm/list.c
index b55a3900..056337da 100644
--- a/lib/libalpm/list.c
+++ b/lib/libalpm/list.c
@@ -217,7 +217,7 @@ int pm_list_count(PMList *list)
return(i);
}
-int pm_list_is_ptrin(void *needle, PMList *haystack)
+int pm_list_is_in(void *needle, PMList *haystack)
{
PMList *lp;
diff --git a/lib/libalpm/list.h b/lib/libalpm/list.h
index 9b7d0b62..307aff35 100644
--- a/lib/libalpm/list.h
+++ b/lib/libalpm/list.h
@@ -52,7 +52,7 @@ PMList *pm_list_add(PMList *list, void *data);
PMList *pm_list_add_sorted(PMList *list, void *data, pm_fn_cmp fn);
PMList* _alpm_list_remove(PMList* list, PMList* item);
int pm_list_count(PMList *list);
-int pm_list_is_ptrin(void *needle, PMList *haystack);
+int pm_list_is_in(void *needle, PMList *haystack);
PMList *pm_list_is_strin(char *needle, PMList *haystack);
PMList *pm_list_last(PMList *list);
PMList *_alpm_list_reverse(PMList *list);
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 10f77ef4..34e8acae 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -401,7 +401,7 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList **
continue;
}
/* make sure this package wasn't already removed from the final list */
- if(pm_list_is_ptrin(miss->target, exfinal)) {
+ if(pm_list_is_in(miss->target, exfinal)) {
continue;
}
@@ -455,7 +455,7 @@ int sync_prepare(pmtrans_t *trans, pmdb_t *db_local, PMList *dbs_sync, PMList **
we won't be breaking anything by removing them.
If a broken dep is detected, make sure it's not from a
package that's in our final (upgrade) list. */
- _alpm_log(PM_LOG_DEBUG, "checking dependencies of packages designated for removal");
+ /*_alpm_log(PM_LOG_DEBUG, "checking dependencies of packages designated for removal");*/
return(0);
@@ -547,13 +547,10 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local)
trans_free(tr);
/* propagate replaced packages' requiredby fields to their new owners */
- /* ORE
- won't work because if replaced packages are already removed, the sync(REPLACES)
- structures data field will point to unexisting data... */
_alpm_log(PM_LOG_FLOW1, "updating database for replaced packages dependencies");
for(i = trans->packages; i; i = i->next) {
pmsyncpkg_t *sync = i->data;
- if(sync->type == PM_SYNC_TYPE_REPLACE && sync->data) {
+ if(sync->type == PM_SYNC_TYPE_REPLACE) {
PMList *j;
pmpkg_t *new = db_get_pkgfromcache(db_local, sync->pkg->name);
for(j = sync->data; j; j = j->next) {