aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2004-11-25 04:19:38 +0000
committerJason Woodward2004-11-25 04:19:38 +0000
commit84d9d1cf88bd4920b9d2bd1535a7cedeca977e6e (patch)
tree42cc24de7134fe58210442dea30bf11fba934ccc
parent4b0433207f873b8eeadf4af1f9e77878e4a27f59 (diff)
downloadslapt-get-84d9d1cf88bd4920b9d2bd1535a7cedeca977e6e.tar.gz
fixed bug in add_deps_to_trans() where check for exclude was catching on installed packages. installed always satisfies dependency, even if excluded (which should only mean excluded from upgrading).
-rw-r--r--ChangeLog3
-rw-r--r--src/package.c2
-rw-r--r--src/transaction.c12
3 files changed, 4 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 117cb5f..c57f85c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
0.9.9e Nov 24, 2004
+ * fixed bug in add_deps_to_trans() where check for exclude was catching
+ on installed packages. installed always satisfies dependency, even if
+ excluded (which should only mean excluded from upgrading).
* install make target now strips binary
* added pt_PT translation by Miguel Santinho
* updated documentation
diff --git a/src/package.c b/src/package.c
index 029e5b7..9ef427c 100644
--- a/src/package.c
+++ b/src/package.c
@@ -1093,7 +1093,7 @@ int get_pkg_dependencies(const rc_config *global_config,struct pkg_list *avail_p
}
/* if this pkg is excluded */
- if( is_excluded(global_config,tmp_pkg) == 1){
+ if( (is_excluded(global_config,tmp_pkg) == 1) && (global_config->ignore_dep == 0) ){
if( get_exact_pkg(installed_pkgs,tmp_pkg->name,tmp_pkg->version) == NULL ){
printf(_("%s, which is required by %s, is excluded\n"),tmp_pkg->name,pkg->name);
return -1;
diff --git a/src/transaction.c b/src/transaction.c
index f41c658..f30ef71 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -524,18 +524,6 @@ int add_deps_to_trans(const rc_config *global_config, transaction *tran, struct
}else{
- /*
- * however the installed version could be excluded,
- * in which case upgrades should be
- */
- if( (is_excluded(global_config,dep_installed) == 1) && (global_config->ignore_dep == 0) ){
- printf(_("%s, which is required by %s, is excluded\n"),dep_installed->name,pkg->name);
- add_exclude_to_transaction(tran,dep_installed);
- free(deps->pkgs);
- free(deps);
- return -1;
- }
-
/* add only if its a valid upgrade */
if(cmp_pkg_versions(dep_installed->version,deps->pkgs[c]->version) < 0 ){
if ( is_conflicted(tran,avail_pkgs,installed_pkgs,deps->pkgs[c]) == NULL )