summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c4
-rw-r--r--src/pacman/query.c4
-rw-r--r--src/util/testdb.c8
3 files changed, 10 insertions, 6 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index caaed462..84cdb204 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -82,7 +82,9 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
list_display(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg));
/* Only applicable if installed */
if(level > 0) {
- list_display(_("Required By :"), alpm_pkg_get_requiredby(pkg));
+ alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg);
+ list_display(_("Required By :"), requiredby);
+ FREELIST(requiredby);
}
list_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg));
list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg));
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 9ede00ab..b6814259 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -248,9 +248,11 @@ static int is_foreign(pmpkg_t *pkg)
static int is_orphan(pmpkg_t *pkg)
{
- if(alpm_pkg_get_requiredby(pkg) == NULL) {
+ alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg);
+ if(requiredby == NULL) {
return(1);
}
+ FREELIST(requiredby);
return(0);
}
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);
}