On Mon, Jun 9, 2008 at 10:48 AM, Allan McRae <mcrae_allan@hotmail.com> wrote:
I think your version is the much cleaner way to do this. However, it still prints the warning messages ("forcing upgrade" & "is newer than") in _alpm_pkg_compare_versions when using --print-uris and --downloadonly.
On the other hand, I don't really like all these specific handling for these 2 options. If we don't want logging when these options are used, why not just disabling the logging altogether? Something like this maybe : diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 47ab4eb..90f2129 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -766,6 +766,10 @@ int pacman_sync(alpm_list_t *targets) { alpm_list_t *sync_dbs = NULL; + if(config->flags & (PM_TRANS_FLAG_DOWNLOADONLY | PM_TRANS_FLAG_PRINTURIS)) { + config->logmask = 0; + } + /* clean the cache */ if(config->op_s_clean) { int ret = 0;