summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-12 21:28:13 -0600
committerDan McGee <dan@archlinux.org>2007-11-14 18:49:51 -0600
commit8757398a7e3132166a2e20605c02dfdc2abc3d1d (patch)
treee1674f2c5f2c769fc04471d240f772a39c39a32b /src/util
parentceb870655ec5c5efdd694328d0c4b8c98be99ebe (diff)
testdb: remove requiredby checking
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/testdb.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/util/testdb.c b/src/util/testdb.c
index c0f9d559..d559bd7b 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -39,42 +39,6 @@ int str_cmp(const void *s1, const void *s2)
return(strcmp(s1, s2));
}
-/*static void diffrqdby(const char *pkgname, alpm_list_t *oldrqdby, alpm_list_t *newrqdby)
-{
- oldrqdby = alpm_list_msort(oldrqdby, alpm_list_count(oldrqdby), str_cmp);
- newrqdby = alpm_list_msort(newrqdby, alpm_list_count(newrqdby), str_cmp);
-
- alpm_list_t *i = oldrqdby;
- alpm_list_t *j = newrqdby;
-
- while(i || j) {
- char *s1 = NULL;
- char *s2 = NULL;
- int n;
- if(i && !j) {
- n = -1;
- } else if(!i && j) {
- n = 1;
- } else {
- s1 = i->data;
- s2 = j->data;
- n = strcmp(s1, s2);
- }
- if(n < 0) {
- s1 = i->data;
- printf("wrong requiredby for %s : %s\n", pkgname, s1);
- i = i->next;
- } else if (n > 0) {
- s2 = j->data;
- printf("missing requiredby for %s : %s\n", pkgname, s2);
- j = j->next;
- } else {
- i = i->next;
- j = j->next;
- }
- }
-}*/
-
static void cleanup(int signum) {
if(alpm_release() == -1) {
fprintf(stderr, "error releasing alpm: %s\n", alpm_strerrorlast());
@@ -186,13 +150,5 @@ int main(int argc, char **argv)
free(depstring);
}
- /* check requiredby */
- /*for(i = alpm_db_getpkgcache(db); i; i = alpm_list_next(i)) {
- pmpkg_t *pkg = alpm_list_getdata(i);
- const char *pkgname = alpm_pkg_get_name(pkg);
- alpm_list_t *rqdby = alpm_pkg_compute_requiredby(pkg);
- diffrqdby(pkgname, alpm_pkg_get_requiredby(pkg), rqdby);
- }*/
-
cleanup(retval);
}