summaryrefslogtreecommitdiffstats
path: root/src/pacman/deptest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/deptest.c')
-rw-r--r--src/pacman/deptest.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index f043c201..0d265c70 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -1,7 +1,7 @@
/*
* deptest.c
*
- * Copyright (c) 2006-2010 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -35,16 +35,24 @@
int pacman_deptest(alpm_list_t *targets)
{
alpm_list_t *i;
+ alpm_list_t *deps = NULL;
+ pmdb_t *localdb = alpm_option_get_localdb();
+
+ for(i = targets; i; i = alpm_list_next(i)) {
+ char *target = alpm_list_getdata(i);
+
+ if(!alpm_find_satisfier(alpm_db_get_pkgcache_list(localdb), target)) {
+ deps = alpm_list_add(deps, target);
+ }
+ }
- alpm_list_t *deps = alpm_deptest(alpm_option_get_localdb(), targets);
if(deps == NULL) {
return(0);
}
for(i = deps; i; i = alpm_list_next(i)) {
- const char *dep;
+ const char *dep = alpm_list_getdata(i);
- dep = alpm_list_getdata(i);
printf("%s\n", dep);
}
alpm_list_free(deps);