[pacman-dev] CVS update of pacman-lib/lib/libalpm (17 files)
Aaron Griffin
aaron at archlinux.org
Mon Feb 26 03:38:48 EST 2007
Date: Monday, February 26, 2007 @ 03:38:48
Author: aaron
Path: /home/cvs-pacman/pacman-lib/lib/libalpm
Modified: add.c (1.119 -> 1.120) alpm.c (1.119 -> 1.120)
alpm.h (1.77 -> 1.78) be_files.c (1.30 -> 1.31)
cache.c (1.34 -> 1.35) cache.h (1.10 -> 1.11) db.c (1.60 -> 1.61)
db.h (1.25 -> 1.26) deps.c (1.69 -> 1.70) group.c (1.14 -> 1.15)
package.c (1.77 -> 1.78) package.h (1.32 -> 1.33)
provide.c (1.10 -> 1.11) provide.h (1.5 -> 1.6)
remove.c (1.69 -> 1.70) sync.c (1.104 -> 1.105)
trans.c (1.37 -> 1.38)
* Enforce const char* params when using strings
* Unified some functions names "package" -> "pkg" for consistency
* Removed the goofy 'faketarget' stuff used for dep testing
* Renamed alpm_pkg_isin -> alpm_pkg_find
* Renamed alpm_db_readpkg -> alpm_db_get_pkg
------------+
add.c | 54 ------------------------------------------------------
alpm.c | 8 ++++----
alpm.h | 14 +++++++-------
be_files.c | 2 +-
cache.c | 6 +++---
cache.h | 4 ++--
db.c | 4 ++--
db.h | 6 +++---
deps.c | 16 ++++++++--------
group.c | 2 +-
package.c | 21 +++++++++++----------
package.h | 6 +++---
provide.c | 2 +-
provide.h | 2 +-
remove.c | 2 +-
sync.c | 8 ++++----
trans.c | 4 ++--
17 files changed, 54 insertions(+), 107 deletions(-)
Index: pacman-lib/lib/libalpm/add.c
diff -u pacman-lib/lib/libalpm/add.c:1.119 pacman-lib/lib/libalpm/add.c:1.120
--- pacman-lib/lib/libalpm/add.c:1.119 Wed Feb 21 23:42:59 2007
+++ pacman-lib/lib/libalpm/add.c Mon Feb 26 03:38:48 2007
@@ -58,55 +58,6 @@
#include "remove.h"
#include "handle.h"
-static int add_faketarget(pmtrans_t *trans, char *name)
-{
- char *ptr, *p;
- char *str = NULL;
- pmpkg_t *dummy = NULL;
-
- ALPM_LOG_FUNC;
-
- dummy = _alpm_pkg_new(NULL, NULL);
- if(dummy == NULL) {
- RET_ERR(PM_ERR_MEMORY, -1);
- }
-
- /* Format: field1=value1|field2=value2|...
- * Valid fields are "name", "version" and "depend"
- */
- str = strdup(name);
- ptr = str;
- while((p = strsep(&ptr, "|")) != NULL) {
- char *q;
- if(p[0] == 0) {
- continue;
- }
- q = strchr(p, '=');
- if(q == NULL) { /* not a valid token */
- continue;
- }
- if(strncmp("name", p, q-p) == 0) {
- STRNCPY(dummy->name, q+1, PKG_NAME_LEN);
- } else if(strncmp("version", p, q-p) == 0) {
- STRNCPY(dummy->version, q+1, PKG_VERSION_LEN);
- } else if(strncmp("depend", p, q-p) == 0) {
- dummy->depends = alpm_list_add(dummy->depends, strdup(q+1));
- } else {
- _alpm_log(PM_LOG_ERROR, _("could not parse token %s"), p);
- }
- }
- FREE(str);
- if(dummy->name[0] == 0 || dummy->version[0] == 0) {
- FREEPKG(dummy);
- RET_ERR(PM_ERR_PKG_INVALID_NAME, -1);
- }
-
- /* add the package to the transaction */
- trans->packages = alpm_list_add(trans->packages, dummy);
-
- return(0);
-}
-
int SYMHIDDEN _alpm_add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
{
pmpkg_t *info = NULL;
@@ -121,11 +72,6 @@
ASSERT(db != NULL, RET_ERR(PM_ERR_DB_NULL, -1));
ASSERT(name != NULL && strlen(name) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* Check if we need to add a fake target to the transaction. */
- if(strchr(name, '|')) {
- return(add_faketarget(trans, name));
- }
-
_alpm_log(PM_LOG_DEBUG, _("loading target '%s'"), name);
/* TODO FS#5120 we need a better way to check if a package is a valid package,
Index: pacman-lib/lib/libalpm/alpm.c
diff -u pacman-lib/lib/libalpm/alpm.c:1.119 pacman-lib/lib/libalpm/alpm.c:1.120
--- pacman-lib/lib/libalpm/alpm.c:1.119 Wed Feb 14 00:34:21 2007
+++ pacman-lib/lib/libalpm/alpm.c Mon Feb 26 03:38:48 2007
@@ -330,7 +330,7 @@
* @param name of the package
* @return the package entry on success, NULL on error
*/
-pmpkg_t SYMEXPORT *alpm_db_readpkg(pmdb_t *db, char *name)
+pmpkg_t SYMEXPORT *alpm_db_get_pkg(pmdb_t *db, const char *name)
{
ALPM_LOG_FUNC;
@@ -362,7 +362,7 @@
* @param name name of the package
* @return the list of packages on success, NULL on error
*/
-alpm_list_t SYMEXPORT *alpm_db_whatprovides(pmdb_t *db, char *name)
+alpm_list_t SYMEXPORT *alpm_db_whatprovides(pmdb_t *db, const char *name)
{
ALPM_LOG_FUNC;
@@ -379,7 +379,7 @@
* @param name of the group
* @return the groups entry on success, NULL on error
*/
-pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, char *name)
+pmgrp_t SYMEXPORT *alpm_db_readgrp(pmdb_t *db, const char *name)
{
ALPM_LOG_FUNC;
@@ -1153,7 +1153,7 @@
for(j = syncpkgs; j && !replace; j=j->next) {
sync = j->data;
if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_isin(spkg->name, sync->data)) {
+ if(_alpm_pkg_find(spkg->name, sync->data)) {
replace=1;
}
}
Index: pacman-lib/lib/libalpm/alpm.h
diff -u pacman-lib/lib/libalpm/alpm.h:1.77 pacman-lib/lib/libalpm/alpm.h:1.78
--- pacman-lib/lib/libalpm/alpm.h:1.77 Wed Feb 21 01:44:14 2007
+++ pacman-lib/lib/libalpm/alpm.h Mon Feb 26 03:38:48 2007
@@ -161,7 +161,7 @@
*/
/* Database registration callback */
-typedef void (*alpm_cb_db_register)(char *, pmdb_t *);
+typedef void (*alpm_cb_db_register)(const char *, pmdb_t *);
pmdb_t *alpm_db_register(char *treename);
int alpm_db_unregister(pmdb_t *db);
@@ -173,11 +173,11 @@
int alpm_db_update(int level, pmdb_t *db);
-pmpkg_t *alpm_db_readpkg(pmdb_t *db, char *name);
+pmpkg_t *alpm_db_get_pkg(pmdb_t *db, const char *name);
alpm_list_t *alpm_db_getpkgcache(pmdb_t *db);
-alpm_list_t *alpm_db_whatprovides(pmdb_t *db, char *name);
+alpm_list_t *alpm_db_whatprovides(pmdb_t *db, const char *name);
-pmgrp_t *alpm_db_readgrp(pmdb_t *db, char *name);
+pmgrp_t *alpm_db_readgrp(pmdb_t *db, const char *name);
alpm_list_t *alpm_db_getgrpcache(pmdb_t *db);
alpm_list_t *alpm_db_search(pmdb_t *db, alpm_list_t* needles);
@@ -242,7 +242,7 @@
* Groups
*/
const char *alpm_grp_get_name(pmgrp_t *grp);
-alpm_list_t *alpm_grp_get_packages(pmgrp_t *grp);
+alpm_list_t *alpm_grp_get_pkgs(pmgrp_t *grp);
/*
* Sync
@@ -256,7 +256,7 @@
} pmsynctype_t;
pmsynctype_t alpm_sync_get_type(pmsyncpkg_t *sync);
-pmpkg_t *alpm_sync_get_package(pmsyncpkg_t *sync);
+pmpkg_t *alpm_sync_get_pkg(pmsyncpkg_t *sync);
void *alpm_sync_get_data(pmsyncpkg_t *sync);
/*
@@ -348,7 +348,7 @@
pmtranstype_t alpm_trans_get_type();
unsigned int alpm_trans_get_flags();
alpm_list_t * alpm_trans_get_targets();
-alpm_list_t * alpm_trans_get_packages();
+alpm_list_t * alpm_trans_get_pkgs();
int alpm_trans_init(pmtranstype_t type, unsigned int flags,
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress cb_progress);
Index: pacman-lib/lib/libalpm/be_files.c
diff -u pacman-lib/lib/libalpm/be_files.c:1.30 pacman-lib/lib/libalpm/be_files.c:1.31
--- pacman-lib/lib/libalpm/be_files.c:1.30 Wed Feb 21 23:42:59 2007
+++ pacman-lib/lib/libalpm/be_files.c Mon Feb 26 03:38:48 2007
@@ -106,7 +106,7 @@
rewinddir(db->handle);
}
-pmpkg_t *_alpm_db_scan(pmdb_t *db, char *target, pmdbinfrq_t inforeq)
+pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target, pmdbinfrq_t inforeq)
{
struct dirent *ent = NULL;
struct stat sbuf;
Index: pacman-lib/lib/libalpm/cache.c
diff -u pacman-lib/lib/libalpm/cache.c:1.34 pacman-lib/lib/libalpm/cache.c:1.35
--- pacman-lib/lib/libalpm/cache.c:1.34 Thu Feb 22 01:36:05 2007
+++ pacman-lib/lib/libalpm/cache.c Mon Feb 26 03:38:48 2007
@@ -187,7 +187,7 @@
return(0);
}
-pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, char *target)
+pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target)
{
ALPM_LOG_FUNC;
@@ -201,7 +201,7 @@
return(NULL);
}
- return(_alpm_pkg_isin(target, pkgcache));
+ return(_alpm_pkg_find(target, pkgcache));
}
/* Returns a new group cache from db.
@@ -286,7 +286,7 @@
return(db->grpcache);
}
-pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, char *target)
+pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target)
{
alpm_list_t *i;
Index: pacman-lib/lib/libalpm/cache.h
diff -u pacman-lib/lib/libalpm/cache.h:1.10 pacman-lib/lib/libalpm/cache.h:1.11
--- pacman-lib/lib/libalpm/cache.h:1.10 Tue Jan 23 22:02:54 2007
+++ pacman-lib/lib/libalpm/cache.h Mon Feb 26 03:38:48 2007
@@ -33,12 +33,12 @@
int _alpm_db_remove_pkgfromcache(pmdb_t *db, pmpkg_t *pkg);
alpm_list_t *_alpm_db_get_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel);
int _alpm_db_ensure_pkgcache(pmdb_t *db, pmdbinfrq_t infolevel);
-pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, char *target);
+pmpkg_t *_alpm_db_get_pkgfromcache(pmdb_t *db, const char *target);
/* groups */
int _alpm_db_load_grpcache(pmdb_t *db);
void _alpm_db_free_grpcache(pmdb_t *db);
alpm_list_t *_alpm_db_get_grpcache(pmdb_t *db);
-pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, char *target);
+pmgrp_t *_alpm_db_get_grpfromcache(pmdb_t *db, const char *target);
#endif /* _ALPM_CACHE_H */
Index: pacman-lib/lib/libalpm/db.c
diff -u pacman-lib/lib/libalpm/db.c:1.60 pacman-lib/lib/libalpm/db.c:1.61
--- pacman-lib/lib/libalpm/db.c:1.60 Wed Feb 21 01:44:14 2007
+++ pacman-lib/lib/libalpm/db.c Mon Feb 26 03:38:48 2007
@@ -51,7 +51,7 @@
#include "cache.h"
#include "alpm.h"
-pmdb_t *_alpm_db_new(char *root, char* dbpath, char *treename)
+pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename)
{
pmdb_t *db;
@@ -150,7 +150,7 @@
return(ret);
}
-pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback)
+pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback)
{
struct stat buf;
pmdb_t *db;
Index: pacman-lib/lib/libalpm/db.h
diff -u pacman-lib/lib/libalpm/db.h:1.25 pacman-lib/lib/libalpm/db.h:1.26
--- pacman-lib/lib/libalpm/db.h:1.25 Wed Feb 21 03:34:36 2007
+++ pacman-lib/lib/libalpm/db.h Mon Feb 26 03:38:48 2007
@@ -47,18 +47,18 @@
};
/* db.c, database general calls */
-pmdb_t *_alpm_db_new(char *root, char *dbpath, char *treename);
+pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename);
void _alpm_db_free(void *data);
int _alpm_db_cmp(const void *db1, const void *db2);
alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles);
-pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback);
+pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback);
/* be.c, backend specific calls */
int _alpm_db_install(pmdb_t *db, const char *dbfile);
int _alpm_db_open(pmdb_t *db);
void _alpm_db_close(pmdb_t *db);
void _alpm_db_rewind(pmdb_t *db);
-pmpkg_t *_alpm_db_scan(pmdb_t *db, char *target, pmdbinfrq_t inforeq);
+pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target, pmdbinfrq_t inforeq);
int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_write(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq);
int _alpm_db_remove(pmdb_t *db, pmpkg_t *info);
Index: pacman-lib/lib/libalpm/deps.c
diff -u pacman-lib/lib/libalpm/deps.c:1.69 pacman-lib/lib/libalpm/deps.c:1.70
--- pacman-lib/lib/libalpm/deps.c:1.69 Wed Feb 21 03:34:36 2007
+++ pacman-lib/lib/libalpm/deps.c Mon Feb 26 03:38:48 2007
@@ -150,7 +150,7 @@
for(k = i->next; k; k = k->next) {
q = (pmpkg_t *)k->data;
if(!strcmp(dep.name, q->name)) {
- if(!_alpm_pkg_isin(q->name, tmptargs)) {
+ if(!_alpm_pkg_find(q->name, tmptargs)) {
change = 1;
tmptargs = alpm_list_add(tmptargs, q);
}
@@ -158,7 +158,7 @@
}
for(l = q->provides; l; l = l->next) {
if(!strcmp(dep.name, (char*)l->data)) {
- if(!_alpm_pkg_isin((char*)l->data, tmptargs)) {
+ if(!_alpm_pkg_find((char*)l->data, tmptargs)) {
change = 1;
tmptargs = alpm_list_add(tmptargs, q);
}
@@ -167,7 +167,7 @@
}
}
}
- if(!_alpm_pkg_isin(p->name, tmptargs)) {
+ if(!_alpm_pkg_find(p->name, tmptargs)) {
tmptargs = alpm_list_add(tmptargs, p);
}
}
@@ -231,7 +231,7 @@
/* hmmm... package isn't installed.. */
continue;
}
- if(_alpm_pkg_isin(p->name, packages)) {
+ if(_alpm_pkg_find(p->name, packages)) {
/* this package also in the upgrade list, so don't worry about it */
continue;
}
@@ -443,7 +443,7 @@
{
alpm_list_t *i;
- if(_alpm_pkg_isin(pkg->name, targets)) {
+ if(_alpm_pkg_find(pkg->name, targets)) {
return(0);
}
@@ -456,7 +456,7 @@
/* see if other packages need it */
for(i = alpm_pkg_get_requiredby(pkg); i; i = i->next) {
pmpkg_t *reqpkg = _alpm_db_get_pkgfromcache(db, i->data);
- if(reqpkg && !_alpm_pkg_isin(reqpkg->name, targets)) {
+ if(reqpkg && !_alpm_pkg_find(reqpkg->name, targets)) {
return(0);
}
}
@@ -606,14 +606,14 @@
pm_errno = PM_ERR_UNSATISFIED_DEPS;
goto error;
}
- if(_alpm_pkg_isin(sync->name, list)) {
+ if(_alpm_pkg_find(sync->name, list)) {
/* this dep is already in the target list */
_alpm_log(PM_LOG_DEBUG, _("dependency %s is already in the target list -- skipping"),
sync->name);
continue;
}
- if(!_alpm_pkg_isin(sync->name, trail)) {
+ if(!_alpm_pkg_find(sync->name, trail)) {
/* check pmo_ignorepkg and pmo_s_ignore to make sure we haven't pulled in
* something we're not supposed to.
*/
Index: pacman-lib/lib/libalpm/group.c
diff -u pacman-lib/lib/libalpm/group.c:1.14 pacman-lib/lib/libalpm/group.c:1.15
--- pacman-lib/lib/libalpm/group.c:1.14 Tue Jan 30 03:14:11 2007
+++ pacman-lib/lib/libalpm/group.c Mon Feb 26 03:38:48 2007
@@ -84,7 +84,7 @@
return grp->name;
}
-alpm_list_t SYMEXPORT *alpm_grp_get_packages(pmgrp_t *grp)
+alpm_list_t SYMEXPORT *alpm_grp_get_pkgs(pmgrp_t *grp)
{
ALPM_LOG_FUNC;
Index: pacman-lib/lib/libalpm/package.c
diff -u pacman-lib/lib/libalpm/package.c:1.77 pacman-lib/lib/libalpm/package.c:1.78
--- pacman-lib/lib/libalpm/package.c:1.77 Fri Feb 23 03:00:06 2007
+++ pacman-lib/lib/libalpm/package.c Mon Feb 26 03:38:48 2007
@@ -182,12 +182,12 @@
* Returns: 0 on success, 1 on error
*
*/
-static int parse_descfile(char *descfile, pmpkg_t *info)
+static int parse_descfile(const char *descfile, pmpkg_t *info)
{
FILE* fp = NULL;
char line[PATH_MAX];
- char* ptr = NULL;
- char* key = NULL;
+ char *ptr = NULL;
+ char *key = NULL;
int linenum = 0;
ALPM_LOG_FUNC;
@@ -278,7 +278,7 @@
return(0);
}
-pmpkg_t *_alpm_pkg_load(char *pkgfile)
+pmpkg_t *_alpm_pkg_load(const char *pkgfile)
{
char *expath;
int ret = ARCHIVE_OK;
@@ -453,7 +453,7 @@
/* Test for existence of a package in a alpm_list_t*
* of pmpkg_t*
*/
-pmpkg_t *_alpm_pkg_isin(char *needle, alpm_list_t *haystack)
+pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack)
{
alpm_list_t *lp;
@@ -473,9 +473,10 @@
return(NULL);
}
-int _alpm_pkg_splitname(char *target, char *name, char *version, int witharch)
+int _alpm_pkg_splitname(const char *target, char *name, char *version, int witharch)
{
char tmp[PKG_FULLNAME_LEN+7];
+ const char *t;
char *p, *q;
ALPM_LOG_FUNC;
@@ -485,12 +486,12 @@
}
/* trim path name (if any) */
- if((p = strrchr(target, '/')) == NULL) {
- p = target;
+ if((t = strrchr(target, '/')) == NULL) {
+ t = target;
} else {
- p++;
+ t++;
}
- STRNCPY(tmp, p, PKG_FULLNAME_LEN+7);
+ STRNCPY(tmp, t, PKG_FULLNAME_LEN+7);
/* trim file extension (if any) */
if((p = strstr(tmp, PM_EXT_PKG))) {
*p = '\0';
Index: pacman-lib/lib/libalpm/package.h
diff -u pacman-lib/lib/libalpm/package.h:1.32 pacman-lib/lib/libalpm/package.h:1.33
--- pacman-lib/lib/libalpm/package.h:1.32 Thu Feb 22 21:10:56 2007
+++ pacman-lib/lib/libalpm/package.h Mon Feb 26 03:38:48 2007
@@ -103,9 +103,9 @@
void _alpm_pkg_free(void *data);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
-pmpkg_t *_alpm_pkg_load(char *pkgfile);
-pmpkg_t *_alpm_pkg_isin(char *needle, alpm_list_t *haystack);
-int _alpm_pkg_splitname(char *target, char *name, char *version, int witharch);
+pmpkg_t *_alpm_pkg_load(const char *pkgfile);
+pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
+int _alpm_pkg_splitname(const char *target, char *name, char *version, int witharch);
int _alpm_pkg_istoonew(pmpkg_t *pkg);
void _alpm_pkg_update_requiredby(pmpkg_t *pkg);
Index: pacman-lib/lib/libalpm/provide.c
diff -u pacman-lib/lib/libalpm/provide.c:1.10 pacman-lib/lib/libalpm/provide.c:1.11
--- pacman-lib/lib/libalpm/provide.c:1.10 Tue Jan 30 03:14:11 2007
+++ pacman-lib/lib/libalpm/provide.c Mon Feb 26 03:38:48 2007
@@ -31,7 +31,7 @@
/* return a alpm_list_t of packages in "db" that provide "package"
*/
-alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, char *package)
+alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package)
{
alpm_list_t *pkgs = NULL;
alpm_list_t *lp;
Index: pacman-lib/lib/libalpm/provide.h
diff -u pacman-lib/lib/libalpm/provide.h:1.5 pacman-lib/lib/libalpm/provide.h:1.6
--- pacman-lib/lib/libalpm/provide.h:1.5 Fri Jan 19 04:28:45 2007
+++ pacman-lib/lib/libalpm/provide.h Mon Feb 26 03:38:48 2007
@@ -25,7 +25,7 @@
#include "alpm_list.h"
#include "config.h"
-alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, char *package);
+alpm_list_t *_alpm_db_whatprovides(pmdb_t *db, const char *package);
#endif /* _ALPM_PROVIDE_H */
Index: pacman-lib/lib/libalpm/remove.c
diff -u pacman-lib/lib/libalpm/remove.c:1.69 pacman-lib/lib/libalpm/remove.c:1.70
--- pacman-lib/lib/libalpm/remove.c:1.69 Wed Feb 21 01:44:15 2007
+++ pacman-lib/lib/libalpm/remove.c Mon Feb 26 03:38:48 2007
@@ -69,7 +69,7 @@
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(name != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- if(_alpm_pkg_isin(name, trans->packages)) {
+ if(_alpm_pkg_find(name, trans->packages)) {
RET_ERR(PM_ERR_TRANS_DUP_TARGET, -1);
}
Index: pacman-lib/lib/libalpm/sync.c
diff -u pacman-lib/lib/libalpm/sync.c:1.104 pacman-lib/lib/libalpm/sync.c:1.105
--- pacman-lib/lib/libalpm/sync.c:1.104 Fri Feb 23 02:53:25 2007
+++ pacman-lib/lib/libalpm/sync.c Mon Feb 26 03:38:48 2007
@@ -221,7 +221,7 @@
for(j = trans->packages; j && !replace; j=j->next) {
sync = j->data;
if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_isin(spkg->name, sync->data)) {
+ if(_alpm_pkg_find(spkg->name, sync->data)) {
replace=1;
}
}
@@ -501,7 +501,7 @@
for(j = trans->packages; j && !found; j = j->next) {
sync = j->data;
if(sync->type == PM_SYNC_TYPE_REPLACE) {
- if(_alpm_pkg_isin(miss->depend.name, sync->data)) {
+ if(_alpm_pkg_find(miss->depend.name, sync->data)) {
found = 1;
}
}
@@ -929,7 +929,7 @@
alpm_list_t *j;
for(j = sync->data; j; j = j->next) {
pmpkg_t *pkg = j->data;
- if(!_alpm_pkg_isin(pkg->name, tr->packages)) {
+ if(!_alpm_pkg_find(pkg->name, tr->packages)) {
if(_alpm_trans_addtarget(tr, pkg->name) == -1) {
goto error;
}
@@ -1072,7 +1072,7 @@
return sync->type;
}
-pmpkg_t SYMEXPORT *alpm_sync_get_package(pmsyncpkg_t *sync)
+pmpkg_t SYMEXPORT *alpm_sync_get_pkg(pmsyncpkg_t *sync)
{
/* Sanity checks */
ASSERT(sync != NULL, return(NULL));
Index: pacman-lib/lib/libalpm/trans.c
diff -u pacman-lib/lib/libalpm/trans.c:1.37 pacman-lib/lib/libalpm/trans.c:1.38
--- pacman-lib/lib/libalpm/trans.c:1.37 Wed Feb 21 03:34:37 2007
+++ pacman-lib/lib/libalpm/trans.c Mon Feb 26 03:38:48 2007
@@ -270,7 +270,7 @@
}
if(trans->packages && trans->type == PM_TRANS_TYPE_REMOVE) {
- if(_alpm_pkg_isin(dep.name, handle->trans->packages)) {
+ if(_alpm_pkg_find(dep.name, handle->trans->packages)) {
continue;
}
}
@@ -364,7 +364,7 @@
return handle->trans->targets;
}
-alpm_list_t SYMEXPORT * alpm_trans_get_packages()
+alpm_list_t SYMEXPORT * alpm_trans_get_pkgs()
{
/* Sanity checks */
ASSERT(handle != NULL, return(NULL));
More information about the pacman-dev
mailing list