From d8bc610313749422bac74608e674e91852c7aeba Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 11 Aug 2009 12:19:00 +0200 Subject: [PATCH] xbps-bin: don't overwrite "automatic-install" obj in autoupdate. --HG-- extra : convert_revision : 3e3783b073d1daf3d38f68005ec6ec3aa8757841 --- bin/xbps-bin/install.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index db417880aba..9f2a0edf7a1 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -280,14 +280,14 @@ exec_transaction(struct transaction *trans) prop_object_t obj; const char *pkgname, *version, *instver, *filename; int rv = 0; - bool essential, isdep; + bool essential, isdep, autoinst; pkg_state_t state = 0; assert(trans != NULL); assert(trans->dict != NULL); assert(trans->iter != NULL); - essential = isdep = false; + essential = isdep = autoinst = false; /* * Show download/installed size for the transaction. */ @@ -376,6 +376,12 @@ exec_transaction(struct transaction *trans) /* * Register binary package. */ + if (trans->type == TRANS_ALL) { + prop_dictionary_get_bool(obj, "automatic-install", + &autoinst); + isdep = autoinst; + } + if ((rv = xbps_register_pkg(obj, isdep)) != 0) { printf("error: registering %s-%s! (%s)\n", pkgname, version, strerror(rv));