summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-04 16:33:44 +0100
committerAurelien Foret <aurelien@archlinux.org>2006-03-04 16:33:44 +0100
commit1bd8f57a183db0b9be503eeff3027c4b8d65627d (patch)
tree0ef7184196f10b36a281fff8ae969db7fa1ba395
parent297c5284b6364c94c2ea2b8911a912a3bfa2ce1e (diff)
downloadpacman-1bd8f57a183db0b9be503eeff3027c4b8d65627d.tar.gz
pacman-1bd8f57a183db0b9be503eeff3027c4b8d65627d.tar.xz
- changed flags type from char to int
- downloadonly implies FLAG_NOCONFLICTS
-rw-r--r--lib/libalpm/alpm.c2
-rw-r--r--lib/libalpm/alpm.h2
-rw-r--r--lib/libalpm/trans.c2
-rw-r--r--lib/libalpm/trans.h4
-rw-r--r--src/pacman/conf.h2
-rw-r--r--src/pacman/pacman.c5
6 files changed, 10 insertions, 7 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 897ed8f3..e0370948 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -695,7 +695,7 @@ void *alpm_trans_getinfo(unsigned char parm)
* @param conv conversation callback function pointer
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_trans_init(unsigned char type, unsigned char flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv)
+int alpm_trans_init(unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv)
{
/* Sanity checks */
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 9443849d..18a1712b 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -262,7 +262,7 @@ enum {
};
void *alpm_trans_getinfo(unsigned char parm);
-int alpm_trans_init(unsigned char type, unsigned char flags, alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv);
+int alpm_trans_init(unsigned char type, unsigned int flags, alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv);
int alpm_trans_sysupgrade(void);
int alpm_trans_addtarget(char *target);
int alpm_trans_prepare(PM_LIST **data);
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index b515894b..ba1f2337 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -82,7 +82,7 @@ void _alpm_trans_free(void *data)
free(trans);
}
-int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned char flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv)
+int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv)
{
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h
index bddfbf9c..38c068b6 100644
--- a/lib/libalpm/trans.h
+++ b/lib/libalpm/trans.h
@@ -32,7 +32,7 @@ enum {
typedef struct __pmtrans_t {
unsigned char type;
- unsigned char flags;
+ unsigned int flags;
unsigned char state;
PMList *targets; /* PMList of (char *) */
PMList *packages; /* PMList of (pmpkg_t *) or (pmsyncpkg_t *) */
@@ -63,7 +63,7 @@ do { \
pmtrans_t *_alpm_trans_new(void);
void _alpm_trans_free(void *data);
-int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned char flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv);
+int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv);
int _alpm_trans_sysupgrade(pmtrans_t *trans);
int _alpm_trans_addtarget(pmtrans_t *trans, char *target);
int _alpm_trans_prepare(pmtrans_t *trans, PMList **data);
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index fdd4b20a..319c75f8 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -52,7 +52,7 @@ typedef struct __config_t {
unsigned short op_s_search;
unsigned short op_s_upgrade;
unsigned short group;
- unsigned char flags;
+ unsigned int flags;
unsigned short debug;
/* configuration file option */
char *proxyhost;
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 18422e39..3d62ee69 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -394,7 +394,10 @@ int parseargs(int argc, char *argv[])
break;
case 'u': config->op_s_upgrade = 1; break;
case 'v': config->verbose++; break;
- case 'w': config->op_s_downloadonly = 1; break;
+ case 'w':
+ config->op_s_downloadonly = 1;
+ config->flags |= PM_TRANS_FLAG_NOCONFLICTS;
+ break;
case 'y': config->op_s_sync++; break;
case '?': return(1);
default: return(1);