summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-11-12 19:40:08 -0600
committerDan McGee <dan@archlinux.org>2007-11-14 18:49:50 -0600
commit7219326dd4d01d7e49b8a40746f5495c1c329c9c (patch)
tree01cefb7c433105ba88850dc272ea7791d9954c0b /src/util
parentf5fcaf0b3c8d05e94d08d6357324cfa69d8ceae7 (diff)
downloadpacman-7219326dd4d01d7e49b8a40746f5495c1c329c9c.tar.xz
Remove REQUIREDBY usage from libalpm
Instead of using the often-busted REQUIREDBY entries in the pacman database, compute them each time they are required. This should help many things: 1. Simplify the codebase 2. Prevent future database corruption 3. Ensure when we do use requiredby, it is always correct 4. Shrink the pmpkg_t memory overhead Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/testdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 421a553c..c0f9d559 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -39,7 +39,7 @@ 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)
+/*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);
@@ -73,7 +73,7 @@ static void diffrqdby(const char *pkgname, alpm_list_t *oldrqdby, alpm_list_t *n
j = j->next;
}
}
-}
+}*/
static void cleanup(int signum) {
if(alpm_release() == -1) {
@@ -187,12 +187,12 @@ int main(int argc, char **argv)
}
/* check requiredby */
- for(i = alpm_db_getpkgcache(db); i; i = alpm_list_next(i)) {
+ /*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);
}