Fixes from frugalware: few 'typos' included while patching

Also re-added Judd's dependancy fix in libalpm/deps.c
This commit is contained in:
Aaron Griffin 2006-10-21 20:16:55 +00:00
parent df0dac10e5
commit 93311212bd
6 changed files with 33 additions and 16 deletions

View File

@ -17,7 +17,7 @@ EXTRA_DIST = \
TODO \
TODO.autoconf
check:
check: src/pacman
cd pactest; python pactest.py --test=tests/*.py -p ../src/pacman/pacman --debug=-1
tags:

View File

@ -10,7 +10,7 @@
/* Create casting functions */
%pointer_cast(char *, long *, void_to_long);
%pointer_cast(void *, long *, void_to_long);
%pointer_cast(void *, char *, void_to_char);
%pointer_cast(void *, unsigned long, void_to_unsigned_long);
%pointer_cast(void *, PM_LIST *, void_to_PM_LIST);

View File

@ -303,6 +303,7 @@ int alpm_db_setserver(pmdb_t *db, char *url)
/** Update a package database
* @param force if true, then forces the update, otherwise update only in case
* the database isn't up to date
* @param db pointer to the package database to update
* @return 0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up
* to date
@ -996,7 +997,7 @@ void *alpm_dep_getinfo(pmdepmissing_t *miss, unsigned char parm)
}
/** @} */
/** @defgroup alpm_dep File Conflicts Functions
/** @defgroup alpm_conflict File Conflicts Functions
* @brief Functions to get informations about a libalpm file conflict
* @{
*/

View File

@ -124,7 +124,6 @@ pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles)
} else if(retval) {
_alpm_log(PM_LOG_DEBUG, " search target '%s' matched '%s'", targ, haystack);
match = 1;
} else {
}
FREE(haystack);

View File

@ -307,11 +307,28 @@ pmlist_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, unsigned char op, pmlist
}
}
}
/* check other targets */
for(k = packages; k && !found; k = k->next) {
pmpkg_t *p = (pmpkg_t *)k->data;
/* see if the package names match OR if p provides depend.name */
if(!strcmp(p->name, depend.name) || _alpm_list_is_strin(depend.name, p->provides)) {
/* check database for provides matches */
if(!found) {
pmlist_t *m;
k = _alpm_db_whatprovides(db, depend.name);
for(m = k; m && !found; m = m->next) {
/* look for a match that isn't one of the packages we're trying
* to install. this way, if we match against a to-be-installed
* package, we'll defer to the NEW one, not the one already
* installed. */
pmpkg_t *p = m->data;
pmlist_t *n;
int skip = 0;
for(n = packages; n && !skip; n = n->next) {
pmpkg_t *ptp = n->data;
if(!strcmp(ptp->name, p->name)) {
skip = 1;
}
}
if(skip) {
continue;
}
if(depend.mod == PM_DEP_MOD_ANY) {
/* accept any version */
found = 1;
@ -334,13 +351,13 @@ pmlist_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, unsigned char op, pmlist
FREE(ver);
}
}
FREELISTPTR(k);
}
/* check database for provides matches */
if(!found){
k = _alpm_db_whatprovides(db, depend.name);
if(k) {
/* grab the first one (there should only really be one, anyway) */
pmpkg_t *p = k->data;
/* check other targets */
for(k = packages; k && !found; k = k->next) {
pmpkg_t *p = (pmpkg_t *)k->data;
/* see if the package names match OR if p provides depend.name */
if(!strcmp(p->name, depend.name) || _alpm_list_is_strin(depend.name, p->provides)) {
if(depend.mod == PM_DEP_MOD_ANY) {
/* accept any version */
found = 1;
@ -362,7 +379,6 @@ pmlist_t *_alpm_checkdeps(pmtrans_t *trans, pmdb_t *db, unsigned char op, pmlist
}
FREE(ver);
}
FREELISTPTR(k);
}
}
/* else if still not found... */

View File

@ -22,6 +22,7 @@
#define _ALPM_SERVER_H
#include "list.h"
#include <time.h>
#include <ftplib.h>
#define FREESERVER(p) \