From acdbc4bc1a5d3bba52e853d3ce08c7e723de1f7e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 11 Aug 2009 19:23:48 +0200 Subject: [PATCH] xbps-bin: simplify even more previous commits. --HG-- extra : convert_revision : 88633d61b4ec42812467fa071035d888927013c4 --- bin/xbps-bin/install.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index a8c6e7add34..a250075fc61 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -35,18 +35,11 @@ #include #include "defs.h" -enum { - TRANS_ONE, - TRANS_ALL -}; - struct transaction { prop_dictionary_t dict; prop_object_iterator_t iter; const char *originpkgname; - int type; bool force; - bool update; }; static void cleanup(int); @@ -289,8 +282,6 @@ xbps_install_pkg(const char *pkg, bool force, bool update) } trans->force = force; - trans->update = update; - trans->type = TRANS_ONE; rv = exec_transaction(trans); prop_object_iterator_release(trans->iter); @@ -350,7 +341,7 @@ exec_transaction(struct transaction *trans) prop_dictionary_get_cstring_nocopy(obj, "filename", &filename); prop_dictionary_get_cstring_nocopy(obj, "trans-action", &tract); - if ((trans->type == TRANS_ONE) && + if (trans->originpkgname && strcmp(trans->originpkgname, pkgname)) isdep = true; @@ -523,8 +514,6 @@ xbps_autoupdate_pkgs(bool force) } trans->force = force; - trans->update = true; - trans->type = TRANS_ALL; rv = exec_transaction(trans); prop_object_iterator_release(trans->iter);