summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-02-06 19:02:19 +0000
committerJason Woodward2005-02-06 19:02:19 +0000
commitc8f9232d4fc7498514d79b91b4e458a978ddfd65 (patch)
tree30cc198d083c2f34bd314cf94103adc1959e4faf /src
parent01e76778ec62a5b77b4b23b23a71c4ecaa8fc219 (diff)
downloadslapt-get-c8f9232d4fc7498514d79b91b4e458a978ddfd65.tar.gz
fixed bug when specifying specific versions of dependencies, thanks NIkkou (nibbana80 at wp dot pl)
Diffstat (limited to 'src')
-rw-r--r--src/package.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/package.c b/src/package.c
index 1826a75..28bf93c 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1318,11 +1318,11 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
return newest_installed_pkg;
/* if "<" */
if( strstr(tmp_pkg_cond,"<") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,newest_installed_pkg->version) > 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,newest_installed_pkg->version) < 0 )
return newest_installed_pkg;
/* if ">" */
if( strstr(tmp_pkg_cond,">") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,newest_installed_pkg->version) < 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,newest_installed_pkg->version) > 0 )
return newest_installed_pkg;
}
for(i = 0; i < installed_pkgs->pkg_count; i++){
@@ -1335,11 +1335,11 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
return installed_pkgs->pkgs[i];
/* if "<" */
if( strstr(tmp_pkg_cond,"<") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,installed_pkgs->pkgs[i]->version) > 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,installed_pkgs->pkgs[i]->version) < 0 )
return installed_pkgs->pkgs[i];
/* if ">" */
if( strstr(tmp_pkg_cond,">") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,installed_pkgs->pkgs[i]->version) < 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,installed_pkgs->pkgs[i]->version) > 0 )
return installed_pkgs->pkgs[i];
}
@@ -1354,11 +1354,11 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
return newest_avail_pkg;
/* if "<" */
if( strstr(tmp_pkg_cond,"<") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,newest_avail_pkg->version) > 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,newest_avail_pkg->version) < 0 )
return newest_avail_pkg;
/* if ">" */
if( strstr(tmp_pkg_cond,">") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,newest_avail_pkg->version) < 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,newest_avail_pkg->version) > 0 )
return newest_avail_pkg;
}
@@ -1373,11 +1373,11 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
return avail_pkgs->pkgs[i];
/* if "<" */
if( strstr(tmp_pkg_cond,"<") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,avail_pkgs->pkgs[i]->version) > 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,avail_pkgs->pkgs[i]->version) < 0 )
return avail_pkgs->pkgs[i];
/* if ">" */
if( strstr(tmp_pkg_cond,">") != NULL )
- if( cmp_pkg_versions(tmp_pkg_ver,avail_pkgs->pkgs[i]->version) < 0 )
+ if( cmp_pkg_versions(tmp_pkg_ver,avail_pkgs->pkgs[i]->version) > 0 )
return avail_pkgs->pkgs[i];
}