summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-29 19:10:18 +0000
committerJason Woodward2005-01-29 19:10:18 +0000
commit753d692b5726724443ffd81e5c75586364c4401d (patch)
treedf5dc227bdd3582ba8741449e8a1a52d3028d17b /src
parent5e8a216653e6fec0f27a8430f8dacfe3f0c2b435 (diff)
downloadslapt-get-753d692b5726724443ffd81e5c75586364c4401d.tar.gz
make sure removes happen before installs and upgrades
Diffstat (limited to 'src')
-rw-r--r--src/transaction.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transaction.c b/src/transaction.c
index 27ed396..c7c4c4f 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -274,6 +274,9 @@ int handle_transaction(const rc_config *global_config, transaction_t *tran){
/* run transaction, remove, install, and upgrade */
if( global_config->download_only == FALSE ){
+ for(i = 0; i < tran->remove_pkgs->pkg_count;i++){
+ if( remove_pkg(global_config,tran->remove_pkgs->pkgs[i]) == -1 ) exit(1);
+ }
for(i = 0; i < tran->install_pkgs->pkg_count;i++){
if( install_pkg(global_config,tran->install_pkgs->pkgs[i]) == -1 ) exit(1);
}
@@ -283,9 +286,6 @@ int handle_transaction(const rc_config *global_config, transaction_t *tran){
tran->upgrade_pkgs->pkgs[i]->upgrade
) == -1 ) exit(1);
}
- for(i = 0; i < tran->remove_pkgs->pkg_count;i++){
- if( remove_pkg(global_config,tran->remove_pkgs->pkgs[i]) == -1 ) exit(1);
- }
}
printf(_("Done\n"));