summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2010-01-11 23:23:48 -0500
committerJason Woodward2010-01-11 23:23:48 -0500
commitb8e3a6401c877f4eab57f690bedafeb4d6d5bc06 (patch)
treeecb03176130b3f6857c0c4d0d00b6af7e72c88f2
parentbfcab4d93af1b4b75c8326e2741b8bb1c303cda2 (diff)
downloadgslapt-b8e3a6401c877f4eab57f690bedafeb4d6d5bc06.tar.gz
updated handling of conflicts from command line package names
-rw-r--r--ChangeLog1
-rw-r--r--src/main.c10
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6305265..e5e6d68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
0.5.2a Jan 11, 2010
* free several package lists that were never freed
+ * updated handling of conflicts from command line package names
0.5.2a Oct 17, 2009
* use slapt_disk_space_check from libslapt
diff --git a/src/main.c b/src/main.c
index 3384fc8..4e2c810 100644
--- a/src/main.c
+++ b/src/main.c
@@ -196,11 +196,15 @@ int main (int argc, char *argv[]) {
}
} else {
if (slapt_add_deps_to_trans(global_config,trans,all,installed,p) == 0) {
- slapt_pkg_info_t *conflict_p;
+ struct slapt_pkg_list *conflicts;
slapt_add_install_to_transaction(trans,p);
- if ( (conflict_p = slapt_is_conflicted(trans,all,installed,p)) != NULL) {
- slapt_add_remove_to_transaction(trans,conflict_p);
+ if ( conflicts->pkg_count > 0) {
+ unsigned int cindex = 0;
+ for (cindex = 0; cindex < conflicts->pkg_count; cindex++) {
+ slapt_add_remove_to_transaction(trans,conflicts->pkgs[cindex]);
+ }
}
+ slapt_free_pkg_list(conflicts);
} else {
exit(1);
}