summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-04-26 03:10:40 +0000
committerJason Woodward2005-04-26 03:10:40 +0000
commit3a7847b91dd0790aab25bad94d27470dec926e1e (patch)
tree76865e86aca09861d6734529ad45e295a9a73364 /src
parent122659202fd2185594fc806ced3671c748f557a1 (diff)
downloadslapt-get-3a7847b91dd0790aab25bad94d27470dec926e1e.tar.gz
when parsing meta entry for w/o conditionals, return newest installed version instead of newest available by default, fall back to newest available otherwise.
Diffstat (limited to 'src')
-rw-r--r--src/package.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/package.c b/src/package.c
index 6b2ab38..75c3e2e 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1285,14 +1285,14 @@ static pkg_info_t *parse_meta_entry(struct pkg_list *avail_pkgs,struct pkg_list
#if DEBUG == 1
printf("no conditional\n");
#endif
- if( newest_avail_pkg != NULL ){
- free_regex(&parse_dep_regex);
- return newest_avail_pkg;
- }
if( newest_installed_pkg != NULL ){
free_regex(&parse_dep_regex);
return newest_installed_pkg;
}
+ if( newest_avail_pkg != NULL ){
+ free_regex(&parse_dep_regex);
+ return newest_avail_pkg;
+ }
}
if( (parse_dep_regex.pmatch[2].rm_eo - parse_dep_regex.pmatch[2].rm_so) > 3 ){