summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.c
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2007-10-04 04:02:36 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2007-10-04 04:02:36 +0200
commit52e7e6d74733f7a431376a9e528c4fe4d3732068 (patch)
treee21405be433b04b9280c1abf4836e98cab603d14 /src/pacman/util.c
parent4453ce155c2f2c5d48e45269250ac0bab52ac63f (diff)
downloadpacman-52e7e6d74733f7a431376a9e528c4fe4d3732068.tar.gz
pacman-52e7e6d74733f7a431376a9e528c4fe4d3732068.tar.xz
needs_transaction adjustments
I just moved the root path check out of needs_transaction, and put it directly in pacman.c . I think this part is alright. For the other problems, I thought about doing the transaction first, in a new sync trans function, which will init and release a transaction. And then doing the commands like -Ss / -Sl / -Sg / -Si. The problem is that for commands like -Sys / -Syl / etc, only the refresh part of the transaction should be done. So I had to introduce an ugly sync_only hack. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 4cb93156..d82b5769 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -51,11 +51,8 @@ int needs_transaction()
if((config->op == PM_OP_SYNC && !config->op_s_sync &&
(config->op_s_search || config->group || config->op_q_list || config->op_q_info
|| config->flags & PM_TRANS_FLAG_PRINTURIS))
- || config->op == PM_OP_DEPTEST
- || (strcmp(alpm_option_get_root(), "/") != 0)) {
+ || config->op == PM_OP_DEPTEST) {
/* special case: PM_OP_SYNC can be used w/ config->op_s_search by any user */
- /* special case: ignore root user check if -r is specified, fall back on
- * normal FS checking */
return(0);
} else {
return(1);