aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2008-12-08 00:41:46 +0000
committerJason Woodward2008-12-08 00:41:46 +0000
commit98292ed39b16bf8388699a6995ce769726b49048 (patch)
treecda0c49ad36ef18fb8fa2462855bf053d76e846b /src
parent22fb79096117fe9ad7926f69be58a2cd50e72672 (diff)
downloadslapt-get-98292ed39b16bf8388699a6995ce769726b49048.tar.gz
assign to installed_dep when looking at obsolete packages deps
Diffstat (limited to 'src')
-rw-r--r--src/package.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/package.c b/src/package.c
index 99fde42..b8e64f4 100644
--- a/src/package.c
+++ b/src/package.c
@@ -3379,11 +3379,12 @@ struct slapt_pkg_list *
deps = slapt_is_required_by(global_config,avail_pkgs, p);
for (c = 0; c < deps->pkg_count; ++c ) {
- slapt_pkg_info_t *dep = deps->pkgs[c];
+ slapt_pkg_info_t *dep = deps->pkgs[c];
+ slapt_pkg_info_t *installed_dep = slapt_get_exact_pkg(installed_pkgs, dep->name, dep->version);
/* if it is installed, we add it to the list */
- if ( slapt_get_exact_pkg(installed_pkgs,dep->name, dep->version) != NULL ) {
- slapt_add_pkg_to_pkg_list(obsolete,dep);
+ if (installed_dep != NULL) {
+ slapt_add_pkg_to_pkg_list(obsolete, installed_dep);
}
}