summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-29 19:01:56 +0000
committerJason Woodward2005-01-29 19:01:56 +0000
commit5e8a216653e6fec0f27a8430f8dacfe3f0c2b435 (patch)
treedac5d209872a358cac99bc856ebb5f39c11b148e /src
parent533cf3f18310bf4c606463c143bc771fcb6323cb (diff)
downloadslapt-get-5e8a216653e6fec0f27a8430f8dacfe3f0c2b435.tar.gz
changed order of transaction, removes now happen first in case files in the packages to be removed are shared with those packages about to be installed or upgraded.
Diffstat (limited to 'src')
-rw-r--r--src/transaction.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/transaction.c b/src/transaction.c
index ee46251..27ed396 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -272,22 +272,18 @@ int handle_transaction(const rc_config *global_config, transaction_t *tran){
printf("\n");
- /* run transaction, install, upgrade, and remove */
- for(i = 0; i < tran->install_pkgs->pkg_count;i++){
- if( global_config->download_only == FALSE )
+ /* run transaction, remove, install, and upgrade */
+ if( global_config->download_only == FALSE ){
+ for(i = 0; i < tran->install_pkgs->pkg_count;i++){
if( install_pkg(global_config,tran->install_pkgs->pkgs[i]) == -1 ) exit(1);
- }
- for(i = 0; i < tran->upgrade_pkgs->pkg_count;i++){
- if( global_config->download_only == FALSE ){
+ }
+ for(i = 0; i < tran->upgrade_pkgs->pkg_count;i++){
if( upgrade_pkg( global_config,
tran->upgrade_pkgs->pkgs[i]->installed,
tran->upgrade_pkgs->pkgs[i]->upgrade
) == -1 ) exit(1);
}
-
- }
- for(i = 0; i < tran->remove_pkgs->pkg_count;i++){
- 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);
}
}