summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-04-26 03:10:40 +0000
committerJason Woodward2005-04-26 03:10:40 +0000
commit3a7847b91dd0790aab25bad94d27470dec926e1e (patch)
tree76865e86aca09861d6734529ad45e295a9a73364
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.
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9395efd..d38f6a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
0.9.9k Apr 25, 2005
+ * when parsing meta entry for w/o conditionals, return newest installed version
+ instead of newest available by default, fall back to newest available other-
+ wise.
* free locally created pkg list in purge_old_cached_pkgs()
* added libcurl option CURLOPT_FOLLOWLOCATION so HTTP redirects are followed
* initialized source in sources list [fixing valgrind warning]
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 ){